Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from Financial-Times/make-npm-checks-skippable
Browse files Browse the repository at this point in the history
Allow skipping of npm checks
  • Loading branch information
matthew-andrews committed Jun 24, 2015
2 parents 207230a + fc3ba52 commit 2f6f1cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bin/next-build-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,15 @@ program
program
.command('verify')
.option('--skip-layout-checks', 'run verify checks when the application doesn\'t have customer facing html pages')
.option('--skip-npm-checks', 'skip npm dependency checks')
.option('-l, --layout [type]', 'Only check dependencies whose templates are needed in this layout')
.description('internally calls origami-build-tools verify with some Next specific configuration (use only for APPLICATIONS. Front End components should continue to use origami-build-tools verify)')
.action(function(opts) {
verify({ skipLayoutChecks: opts.skipLayoutChecks, layout: opts.layout }).catch(exit);
verify({
skipLayoutChecks: opts.skipLayoutChecks,
skipNpmChecks: opts.skipNpmChecks,
layout: opts.layout
}).catch(exit);
});

program
Expand Down
6 changes: 4 additions & 2 deletions tasks/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ function obtVerify() {

module.exports = function(opts) {
var checks = [
obtVerify(),
verifyNpmDeps()
obtVerify()
];
if (!opts.skipNpmChecks) {
verifyNpmDeps();
}

if (!opts.skipLayoutChecks) {
checks.push(verifyLayoutDeps({ layout: opts.layout }));
Expand Down

0 comments on commit 2f6f1cb

Please sign in to comment.