Skip to content

Commit

Permalink
Add scripts/verify-package-dependencies.js
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Aug 18, 2018
1 parent e57d8ba commit 974ba40
Show file tree
Hide file tree
Showing 11 changed files with 1,547 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public
locales/zz-ZZ
nodes/core/locales/zz-ZZ
!packages/node_modules
packages/node_modules/@node-red/editor/public
packages/node_modules/@node-red/editor-client/public
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ matrix:
before_script:
- npm install -g istanbul coveralls
- node_js: "8"
- node_js: "6"
- node_js: "4"
17 changes: 13 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ module.exports = function(grunt) {
nodemon: {
/* uses .nodemonignore */
dev: {
script: 'red.js',
script: 'packages/node_modules/node-red/red.js',
options: {
args: nodemonArgs,
ext: 'js,html,json',
watch: [
'red','nodes'
'packages/node_modules'
]
}
}
Expand Down Expand Up @@ -491,6 +491,15 @@ module.exports = function(grunt) {
}
});

grunt.registerTask('verifyPackageDependencies', function() {
var verifyDependencies = require("./scripts/verify-package-dependencies.js");
var failures = verifyDependencies();
if (failures.length > 0) {
failures.forEach(f => grunt.log.error(f));
grunt.fail.fatal("Failed to verify package dependencies");
}
});

grunt.registerTask('setDevEnv',
'Sets NODE_ENV=development so non-minified assets are used',
function () {
Expand All @@ -499,7 +508,7 @@ module.exports = function(grunt) {

grunt.registerTask('default',
'Builds editor content then runs code style checks and unit tests on all components',
['build','jshint:editor','mocha_istanbul:all']);
['build','verifyPackageDependencies','jshint:editor','mocha_istanbul:all']);

grunt.registerTask('test-core',
'Runs code style check and unit tests on core runtime code',
Expand Down Expand Up @@ -527,7 +536,7 @@ module.exports = function(grunt) {

grunt.registerTask('release',
'Create distribution zip file',
['build','clean:release','copy:release','chmod:release','compress:release']);
['build','verifyPackageDependencies','clean:release','copy:release','chmod:release','compress:release']);

grunt.registerTask('coverage',
'Run Istanbul code test coverage task',
Expand Down
2 changes: 1 addition & 1 deletion jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"source": {
"include": [
"./red/runtime-api"
"./packages/node_modules/@node-red/runtime/lib/api"
]
},
"templates": {
Expand Down
1 change: 0 additions & 1 deletion lib/.gitignore

This file was deleted.

Loading

0 comments on commit 974ba40

Please sign in to comment.