How to use the post-robot/globals.__POST_ROBOT__ function in post-robot

To help you get started, we’ve selected a few post-robot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paypal / paypal-checkout-components / globals.js View on Github external
/* eslint import/no-commonjs: off, flowtype/require-valid-file-annotation: off, flowtype/require-return-type: off */

const postRobotGlobals = require('post-robot/globals');
const zoidGlobals = require('zoid/globals');

module.exports = {
    
    __ZOID__: {
        ...zoidGlobals.__ZOID__,
        __DEFAULT_CONTAINER__: true,
        __DEFAULT_PRERENDER__: true,
        __FRAMEWORK_SUPPORT__: true
    },
    
    __POST_ROBOT__: {
        ...postRobotGlobals.__POST_ROBOT__,
        __IE_POPUP_SUPPORT__: false
    },

    __PAYPAL_CHECKOUT__: {
        __REMEMBERED_FUNDING__: [],
        __URI__:                {
            __CHECKOUT__:    '/checkoutnow',
            __BUTTONS__:     '/smart/buttons',
            __MENU__:        '/smart/menu',
            __MODAL__:        '/smart/modal',
            __CARD_FIELDS__: '/smart/card-fields',
            __NATIVE__:      '/smart/checkout/native'
        }
    }
};
github krakenjs / zoid / globals.js View on Github external
/* @flow */
/* eslint import/no-commonjs: off */

const postRobotGlobals = require('post-robot/globals');

const pkg = require('./package.json');

const formatVersion = (version) => {
    return version.replace(/[^\d]+/g, '_');
};

module.exports = {
    __POST_ROBOT__: {
        ...postRobotGlobals.__POST_ROBOT__,
        __AUTO_SETUP__: false
    },
    __ZOID__: {
        __VERSION__:           formatVersion(pkg.version),
        __GLOBAL_KEY__:        `__zoid_${ formatVersion(pkg.version) }__`,
        __POPUP_SUPPORT__:     true,
        __FRAMEWORK_SUPPORT__: false,
        __DEFAULT_CONTAINER__: true,
        __DEFAULT_PRERENDER__: true
    }
};