Last active
October 28, 2020 08:31
-
-
Save michchan/3de35bc278044e6e6096a2f2aa769d97 to your computer and use it in GitHub Desktop.
Useful npm scripts setup on package.json for Node/TypeScript/React projects
This file contains 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
Show hidden characters
{ | |
// React / Node project | |
"clearbuildcache": "rm -rf ./build", | |
// source-map-explorer | |
"analyze": "source-map-explorer 'build/static/js/*.js'", | |
// Eslint | |
"eslint": "eslint --ext .js,.jsx,.ts,.tsx .", | |
"eslint:fix": "npm run eslint -- --fix", | |
// Stylelint | |
"stylelint": "stylelint 'src/**/*.{js,jsx,ts,tsx}'", | |
// Typescript | |
"watch": "tsc -- --watch --noemit", | |
// React | |
// Disable eslint on development with Create React App, | |
// say when the project is too large to make the reloading so slow. | |
"start": "REACT_APP_DEV_DISABLE_ESLINT=true react-scripts start", | |
// For AWS CDK | |
"deploy": "cdk deploy FundPriceMonitorBackendStack --require-approval never", | |
"template": "npm run build && cdk synth --no-staging > template.yaml", | |
"invoke": "npm run template && sam local invoke", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment