From: Peter Haight Date: Wed, 31 Dec 2014 02:04:16 +0000 (-0800) Subject: Fixed drush and node_modules/*.info file conflict X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b18e61e0fd0f186b136ca43237336c9f592b8a52;p=civicrm-core.git Fixed drush and node_modules/*.info file conflict Tim noticed that drush doesn't work when node_modules directory exists. People say that it's because of the *.info files that some things have in node_modules and suggested adding a line to the npm postinstall script to remove any *.info files from there because they aren't really needed to run stuff. Because we are already doing brower install in the postinstall script, I broke the postinstall stuff into a separate script and put both things in there. --- diff --git a/bin/npm_postinstall.sh b/bin/npm_postinstall.sh new file mode 100644 index 0000000000..9308d36442 --- /dev/null +++ b/bin/npm_postinstall.sh @@ -0,0 +1,2 @@ +find node_modules/ -name '*.info' -type f -delete +node node_modules/bower/bin/bower install diff --git a/package.json b/package.json index 386b8cca18..51a99add26 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "karma-jasmine": "~0.3.2" }, "scripts": { - "postinstall": "node node_modules/bower/bin/bower install", + "postinstall": "bash bin/npm_postinstall.sh", "test": "node node_modules/karma/bin/karma start tests/karma.conf.js" } }