From 39cdd591f16c2b8a6101087894ce1cc42c41bcda Mon Sep 17 00:00:00 2001 From: Joan Leon Date: Thu, 4 Aug 2016 17:01:47 +0200 Subject: [PATCH] Added phoenix task --- README.md | 4 ++++ scripts/init.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index aac5d0b0f18..67621a4490f 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,10 @@ It correctly bundles React in production mode and optimizes the build for the be The build is minified and the filenames include the hashes.
Your app is ready to be deployed! +### `npm run phoenix` + +Remove folder `node_modules` and reinstall all dependencies. + ## How Do I…? The generated project will include a guide in its README.
diff --git a/scripts/init.js b/scripts/init.js index 50cc9d25ba7..6eb781c47af 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -33,6 +33,8 @@ module.exports = function(appPath, appName, verbose, originalDirectory) { appPackage.scripts[command] = 'react-scripts ' + command; }); + appPackage.scripts['phoenix'] = 'rm -rf node_modules && npm install'; + // explicitly specify ESLint config path for editor plugins appPackage.eslintConfig = { extends: './node_modules/react-scripts/config/eslint.js',