mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Do not use npm-shrinkwrap.json when packaging npm dependencies.
This avoids downloading a huge amount of things that are only needed in development. It will reduce the package size, and certainly improve the reliability of the packaging process (i.e. less ECONNREFUSED when downloading phantomjs and such). This commit also updates the NodeJS buildpack, and forces the use of the HTTP npm registry for better performance and reliability when packaging.
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
https://github.com/heroku/heroku-buildpack-nodejs.git#v58
|
||||
https://github.com/heroku/heroku-buildpack-nodejs.git#v71
|
||||
https://github.com/pkgr/heroku-buildpack-ruby.git#universal
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
registry = 'http://registry.npmjs.org/'
|
||||
@@ -6,5 +6,10 @@ sed -i "s|config.serve_static_assets = false|config.serve_static_assets = true|"
|
||||
|
||||
cp -f packaging/conf/000-establish-connection.rb config/initializers/
|
||||
|
||||
# Specific npmrc used for packaging
|
||||
cp -f packaging/.npmrc .npmrc
|
||||
# Install dependencies from package.json
|
||||
rm -f frontend/npm-shrinkwrap.json
|
||||
|
||||
# replace every occurrence of _APP_NAME_ with the corresponding application name we're packaging
|
||||
find packaging/ -type f -print0 | xargs -0 sed -i "s|_APP_NAME_|${APP_NAME}|"
|
||||
|
||||
Reference in New Issue
Block a user