Skip to content

Commit

Permalink
Fix packaging issue for node.js v6 (fixes juice-shop#223)
Browse files Browse the repository at this point in the history
- move `bower` modules from dev to prod dependencies
- move all `grunt` modules from dev to prod dependencies
- include all `node_modules/**` into packages
- during CI delete `node_modules` then reinstall with `--production` before packaging
  • Loading branch information
bkimminich committed Oct 16, 2016
1 parent 46bb28b commit 6b091b2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 32 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ notifications:
on_success: change
on_failure: always
on_start: never
before_deploy: grunt package
before_deploy:
- rm -rf node_modules
- npm install --production
- grunt package
deploy:
- provider: heroku
api_key:
Expand Down
23 changes: 1 addition & 22 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,7 @@ module.exports = function (grunt) {
'lib/*.js',
'models/*.js',
'routes/*.js',
'node_modules/body-parser/**',
'node_modules/colors/**',
'node_modules/cookie-parser/**',
'node_modules/cors/**',
'node_modules/errorhandler/**',
'node_modules/express/**',
'node_modules/express-jwt/**',
'node_modules/glob/**',
'node_modules/hashids/**',
'node_modules/helmet/**',
'node_modules/jsonwebtoken/**',
'node_modules/morgan/**',
'node_modules/multer/**',
'node_modules/pdfkit/**',
'node_modules/sanitize-html/**',
'node_modules/sequelize/**',
'node_modules/sequelize-restful/**',
'node_modules/serve-favicon/**',
'node_modules/serve-index/**',
'node_modules/socket.io/**',
'node_modules/sqlite3/**',
'node_modules/z85/**'
'node_modules/**'
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ install:
- node --version && npm --version
- if exist node_modules rd /Q /S node_modules # workaround for npm install bug missing module dependencies
- npm cache clean
- npm install
- npm install --production
- node_modules\.bin\grunt package
build: off
test: off
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@
],
"dependencies": {
"body-parser": "~1.15",
"bower": "~1.7",
"colors": "~1.1",
"cookie-parser": "~1.4",
"cors": "~2.8",
"errorhandler": "~1.4",
"express": "~4.14",
"express-jwt": "~5.1",
"glob": "~5.0",
"grunt": "~1.0",
"grunt-angular-templates": "~1.1",
"grunt-cli": "~1.2",
"grunt-contrib-clean": "~1.0",
"grunt-contrib-compress": "~1.3",
"grunt-contrib-concat": "~1.0",
"grunt-contrib-uglify": "~2.0",
"hashids": "~1.1",
"helmet": "~2.3",
"jsonwebtoken": "~7.1",
Expand All @@ -46,18 +54,10 @@
"z85": "~0.0"
},
"devDependencies": {
"bower": "~1.7",
"codeclimate-test-reporter": "~0.4",
"cross-spawn": "~4.0",
"form-data": "~1.0",
"frisby": "~0.8",
"grunt": "~1.0",
"grunt-angular-templates": "~1.1",
"grunt-cli": "~1.2",
"grunt-contrib-clean": "~1.0",
"grunt-contrib-compress": "~1.3",
"grunt-contrib-concat": "~1.0",
"grunt-contrib-uglify": "~2.0",
"http-server": "~0.9",
"istanbul": "~0.4",
"jasmine-node": "~1.14",
Expand Down

0 comments on commit 6b091b2

Please sign in to comment.