Add dogfood configs to website
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
"clean": "shx rm -f public/bundle*",
|
"clean": "shx rm -f public/bundle*",
|
||||||
"lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'",
|
"lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'",
|
||||||
"watch": "webpack-dev-server --content-base public --https",
|
"watch": "webpack-dev-server --content-base public --https",
|
||||||
|
"deploy_dogfood": "npm run build; aws s3 sync ./public/. s3://dogfood-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
|
||||||
"deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
|
"deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
|
||||||
"deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers"
|
"deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers"
|
||||||
},
|
},
|
||||||
|
@@ -35,7 +35,7 @@ import 'less/all.less';
|
|||||||
// At the same time webpack statically parses for System.import() to determine bundle chunk split points
|
// At the same time webpack statically parses for System.import() to determine bundle chunk split points
|
||||||
// so each lazy import needs it's own `System.import()` declaration.
|
// so each lazy import needs it's own `System.import()` declaration.
|
||||||
const LazyPortal =
|
const LazyPortal =
|
||||||
utils.isDevelopment() || utils.isStaging()
|
utils.isDevelopment() || utils.isStaging() || utils.isDogfood()
|
||||||
? createLazyComponent('Portal', async () =>
|
? createLazyComponent('Portal', async () =>
|
||||||
System.import<any>(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
|
System.import<any>(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
|
||||||
)
|
)
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { Environments, OutdatedWrappedEtherByNetworkId, PublicNodeUrlsByNetworkId } from 'ts/types';
|
import { Environments, OutdatedWrappedEtherByNetworkId, PublicNodeUrlsByNetworkId } from 'ts/types';
|
||||||
|
import { utils } from 'ts/utils/utils';
|
||||||
|
|
||||||
const BASE_URL = window.location.origin;
|
const BASE_URL = window.location.origin;
|
||||||
const isDevelopment = _.includes(
|
const isDevelopment = _.includes(
|
||||||
@@ -10,13 +11,16 @@ const INFURA_API_KEY = 'T5WSC8cautR4KXyYgsRs';
|
|||||||
|
|
||||||
export const configs = {
|
export const configs = {
|
||||||
AMOUNT_DISPLAY_PRECSION: 5,
|
AMOUNT_DISPLAY_PRECSION: 5,
|
||||||
BACKEND_BASE_URL: 'https://website-api.0xproject.com',
|
BACKEND_BASE_URL: utils.isDogfood()
|
||||||
|
? 'http://ec2-52-91-181-85.compute-1.amazonaws.com'
|
||||||
|
: 'https://website-api.0xproject.com',
|
||||||
BASE_URL,
|
BASE_URL,
|
||||||
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
|
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
|
||||||
DEFAULT_DERIVATION_PATH: `44'/60'/0'`,
|
DEFAULT_DERIVATION_PATH: `44'/60'/0'`,
|
||||||
// WARNING: ZRX & WETH MUST always be default trackedTokens
|
// WARNING: ZRX & WETH MUST always be default trackedTokens
|
||||||
DEFAULT_TRACKED_TOKEN_SYMBOLS: ['WETH', 'ZRX'],
|
DEFAULT_TRACKED_TOKEN_SYMBOLS: ['WETH', 'ZRX'],
|
||||||
DOMAIN_STAGING: 'staging-0xproject.s3-website-us-east-1.amazonaws.com',
|
DOMAIN_STAGING: 'staging-0xproject.s3-website-us-east-1.amazonaws.com',
|
||||||
|
DOMAIN_DOGFOOD: 'dogfood-0xproject.s3-website-us-east-1.amazonaws.com',
|
||||||
DOMAIN_DEVELOPMENT: '0xproject.localhost:3572',
|
DOMAIN_DEVELOPMENT: '0xproject.localhost:3572',
|
||||||
DOMAIN_PRODUCTION: '0xproject.com',
|
DOMAIN_PRODUCTION: '0xproject.com',
|
||||||
ENVIRONMENT: isDevelopment ? Environments.DEVELOPMENT : Environments.PRODUCTION,
|
ENVIRONMENT: isDevelopment ? Environments.DEVELOPMENT : Environments.PRODUCTION,
|
||||||
|
@@ -308,4 +308,7 @@ export const utils = {
|
|||||||
isStaging(): boolean {
|
isStaging(): boolean {
|
||||||
return _.includes(window.location.href, configs.DOMAIN_STAGING);
|
return _.includes(window.location.href, configs.DOMAIN_STAGING);
|
||||||
},
|
},
|
||||||
|
isDogfood(): boolean {
|
||||||
|
return _.includes(window.location.href, configs.DOMAIN_DOGFOOD);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user