Created
August 16, 2017 17:17
-
-
Save jayair/44da884d4e9e2557cb79709769a7b6db to your computer and use it in GitHub Desktop.
Dev & Prod setup for CRA package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "DemoApp", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
}, | |
"devDependencies": { | |
}, | |
"scripts": { | |
"start": "REACT_APP_STAGE=staging react-scripts start", | |
"build": "react-scripts build", | |
"test": "react-scripts test --env=jsdom", | |
"predeploy": "REACT_APP_STAGE=staging npm run build", | |
"deploy": "aws s3 sync build/ s3://S3_DEV_BUCKET", | |
"postdeploy": "aws cloudfront create-invalidation --distribution-id CF_DEV_DISTRIBUTION --paths '/*'", | |
"predeploy-prod": "REACT_APP_STAGE=production npm run build", | |
"deploy-prod": "aws s3 sync build/ s3://S3_PROD_BUCKET", | |
"postdeploy-prod": "aws cloudfront create-invalidation --distribution-id CF_PROD_DISTRIBUTION --paths '/*'", | |
"eject": "react-scripts eject" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment