feat: add dotenv to make env dependencies more explicit
This commit is contained in:
parent
502e9c7be4
commit
937235c4fd
@ -1,6 +1,6 @@
|
||||
{
|
||||
"domain": "0x-instant-dogfood",
|
||||
"build_command": "WEBPACK_OUTPUT_PATH=public yarn build --env.discharge_target=dogfood",
|
||||
"build_command": "WEBPACK_OUTPUT_PATH=public dotenv yarn build --env.discharge_target=dogfood",
|
||||
"upload_directory": "public",
|
||||
"index_key": "index.html",
|
||||
"error_key": "index.html",
|
||||
|
4
packages/instant/.env_example
Normal file
4
packages/instant/.env_example
Normal file
@ -0,0 +1,4 @@
|
||||
INSTANT_ROLLBAR_PUBLISH_TOKEN=
|
||||
INSTANT_ROLLBAR_CLIENT_TOKEN=
|
||||
INSTANT_HEAP_ANALYTICS_ID_PRODUCTION=
|
||||
INSTANT_HEAP_ANALYTICS_ID_DEVELOPMENT=
|
1
packages/instant/.gitignore
vendored
1
packages/instant/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
public/instant.js
|
||||
public/instant.js.map
|
||||
umd/*
|
||||
.env
|
@ -3,3 +3,4 @@
|
||||
*/
|
||||
!lib/**/*
|
||||
!umd/**/*
|
||||
.env
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"domain": "instant.0xproject.com",
|
||||
"build_command": "yarn build --env.discharge_target=production",
|
||||
"build_command": "dotenv yarn build --env.discharge_target=production",
|
||||
"upload_directory": "umd",
|
||||
"index_key": "instant.js",
|
||||
"error_key": "404.html",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"domain": "0x-instant-staging",
|
||||
"build_command": "WEBPACK_OUTPUT_PATH=public yarn build --env.discharge_target=staging",
|
||||
"build_command": "dotenv WEBPACK_OUTPUT_PATH=public yarn build --env.discharge_target=staging",
|
||||
"upload_directory": "public",
|
||||
"index_key": "index.html",
|
||||
"error_key": "index.html",
|
||||
|
@ -20,6 +20,8 @@ The package is available as a UMD module named `zeroExInstant` at https://instan
|
||||
|
||||
## Deploying
|
||||
|
||||
To run any of the following commands you need to configure your `.env` file. There is an example `.env_example` file to show you what values are required.
|
||||
|
||||
You can deploy a work-in-progress version of 0x Instant at http://0x-instant-dogfood.s3-website-us-east-1.amazonaws.com/instant.js for easy sharing.
|
||||
|
||||
To build and deploy the bundle run
|
||||
|
@ -7,7 +7,6 @@
|
||||
"private": true,
|
||||
"description": "0x Instant React Component",
|
||||
"main": "umd/instant.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "webpack --mode production",
|
||||
"build:ci": "yarn build",
|
||||
@ -25,7 +24,10 @@
|
||||
},
|
||||
"config": {
|
||||
"postpublish": {
|
||||
"assets": ["packages/instant/umd/instant.js", "packages/instant/umd/instant.js.map"]
|
||||
"assets": [
|
||||
"packages/instant/umd/instant.js",
|
||||
"packages/instant/umd/instant.js.map"
|
||||
]
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
@ -75,6 +77,7 @@
|
||||
"@types/redux": "^3.6.0",
|
||||
"@types/styled-components": "^4.0.1",
|
||||
"awesome-typescript-loader": "^5.2.1",
|
||||
"dotenv-cli": "^1.4.0",
|
||||
"enzyme": "^3.6.0",
|
||||
"enzyme-adapter-react-16": "^1.5.0",
|
||||
"ip": "^1.1.5",
|
||||
|
12
yarn.lock
12
yarn.lock
@ -4505,7 +4505,7 @@ cross-fetch@^2.1.0:
|
||||
node-fetch "2.1.1"
|
||||
whatwg-fetch "2.0.3"
|
||||
|
||||
cross-spawn@^4:
|
||||
cross-spawn@^4, cross-spawn@^4.0.0:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
|
||||
dependencies:
|
||||
@ -5270,6 +5270,14 @@ dot-prop@^4.1.0, dot-prop@^4.2.0:
|
||||
dependencies:
|
||||
is-obj "^1.0.0"
|
||||
|
||||
dotenv-cli@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-1.4.0.tgz#e8e80830ed88b48a03b5eb7ec26147ca717f7409"
|
||||
dependencies:
|
||||
cross-spawn "^4.0.0"
|
||||
dotenv "^4.0.0"
|
||||
minimist "^1.1.3"
|
||||
|
||||
dotenv@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"
|
||||
@ -6778,7 +6786,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep:
|
||||
ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default"
|
||||
ethereumjs-util "^5.2.0"
|
||||
ethereumjs-vm "2.3.5"
|
||||
ethereumjs-wallet "0.6.0"
|
||||
ethereumjs-wallet "~0.6.0"
|
||||
fake-merkle-patricia-tree "~1.0.1"
|
||||
heap "~0.2.6"
|
||||
js-scrypt "^0.2.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user