feat: add dotenv to make env dependencies more explicit
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "domain": "0x-instant-dogfood",
 | 
					    "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",
 | 
					    "upload_directory": "public",
 | 
				
			||||||
    "index_key": "index.html",
 | 
					    "index_key": "index.html",
 | 
				
			||||||
    "error_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=
 | 
				
			||||||
							
								
								
									
										3
									
								
								packages/instant/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								packages/instant/.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,4 @@
 | 
				
			|||||||
public/instant.js
 | 
					public/instant.js
 | 
				
			||||||
public/instant.js.map
 | 
					public/instant.js.map
 | 
				
			||||||
umd/*
 | 
					umd/*
 | 
				
			||||||
 | 
					.env
 | 
				
			||||||
@@ -2,4 +2,5 @@
 | 
				
			|||||||
*
 | 
					*
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
!lib/**/*
 | 
					!lib/**/*
 | 
				
			||||||
!umd/**/*
 | 
					!umd/**/*
 | 
				
			||||||
 | 
					.env
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "domain": "instant.0xproject.com",
 | 
					    "domain": "instant.0xproject.com",
 | 
				
			||||||
    "build_command": "yarn build --env.discharge_target=production",
 | 
					    "build_command": "dotenv yarn build --env.discharge_target=production",
 | 
				
			||||||
    "upload_directory": "umd",
 | 
					    "upload_directory": "umd",
 | 
				
			||||||
    "index_key": "instant.js",
 | 
					    "index_key": "instant.js",
 | 
				
			||||||
    "error_key": "404.html",
 | 
					    "error_key": "404.html",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "domain": "0x-instant-staging",
 | 
					    "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",
 | 
					    "upload_directory": "public",
 | 
				
			||||||
    "index_key": "index.html",
 | 
					    "index_key": "index.html",
 | 
				
			||||||
    "error_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
 | 
					## 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.
 | 
					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
 | 
					To build and deploy the bundle run
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,6 @@
 | 
				
			|||||||
    "private": true,
 | 
					    "private": true,
 | 
				
			||||||
    "description": "0x Instant React Component",
 | 
					    "description": "0x Instant React Component",
 | 
				
			||||||
    "main": "umd/instant.js",
 | 
					    "main": "umd/instant.js",
 | 
				
			||||||
    "private": true,
 | 
					 | 
				
			||||||
    "scripts": {
 | 
					    "scripts": {
 | 
				
			||||||
        "build": "webpack --mode production",
 | 
					        "build": "webpack --mode production",
 | 
				
			||||||
        "build:ci": "yarn build",
 | 
					        "build:ci": "yarn build",
 | 
				
			||||||
@@ -25,7 +24,10 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "config": {
 | 
					    "config": {
 | 
				
			||||||
        "postpublish": {
 | 
					        "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": {
 | 
					    "repository": {
 | 
				
			||||||
@@ -75,6 +77,7 @@
 | 
				
			|||||||
        "@types/redux": "^3.6.0",
 | 
					        "@types/redux": "^3.6.0",
 | 
				
			||||||
        "@types/styled-components": "^4.0.1",
 | 
					        "@types/styled-components": "^4.0.1",
 | 
				
			||||||
        "awesome-typescript-loader": "^5.2.1",
 | 
					        "awesome-typescript-loader": "^5.2.1",
 | 
				
			||||||
 | 
					        "dotenv-cli": "^1.4.0",
 | 
				
			||||||
        "enzyme": "^3.6.0",
 | 
					        "enzyme": "^3.6.0",
 | 
				
			||||||
        "enzyme-adapter-react-16": "^1.5.0",
 | 
					        "enzyme-adapter-react-16": "^1.5.0",
 | 
				
			||||||
        "ip": "^1.1.5",
 | 
					        "ip": "^1.1.5",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								yarn.lock
									
									
									
									
									
								
							@@ -4505,7 +4505,7 @@ cross-fetch@^2.1.0:
 | 
				
			|||||||
    node-fetch "2.1.1"
 | 
					    node-fetch "2.1.1"
 | 
				
			||||||
    whatwg-fetch "2.0.3"
 | 
					    whatwg-fetch "2.0.3"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cross-spawn@^4:
 | 
					cross-spawn@^4, cross-spawn@^4.0.0:
 | 
				
			||||||
  version "4.0.2"
 | 
					  version "4.0.2"
 | 
				
			||||||
  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
 | 
					  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
 | 
				
			||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
@@ -5270,6 +5270,14 @@ dot-prop@^4.1.0, dot-prop@^4.2.0:
 | 
				
			|||||||
  dependencies:
 | 
					  dependencies:
 | 
				
			||||||
    is-obj "^1.0.0"
 | 
					    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:
 | 
					dotenv@^4.0.0:
 | 
				
			||||||
  version "4.0.0"
 | 
					  version "4.0.0"
 | 
				
			||||||
  resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"
 | 
					  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-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default"
 | 
				
			||||||
    ethereumjs-util "^5.2.0"
 | 
					    ethereumjs-util "^5.2.0"
 | 
				
			||||||
    ethereumjs-vm "2.3.5"
 | 
					    ethereumjs-vm "2.3.5"
 | 
				
			||||||
    ethereumjs-wallet "0.6.0"
 | 
					    ethereumjs-wallet "~0.6.0"
 | 
				
			||||||
    fake-merkle-patricia-tree "~1.0.1"
 | 
					    fake-merkle-patricia-tree "~1.0.1"
 | 
				
			||||||
    heap "~0.2.6"
 | 
					    heap "~0.2.6"
 | 
				
			||||||
    js-scrypt "^0.2.0"
 | 
					    js-scrypt "^0.2.0"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user