allow skip of npm build if you're using npm link
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Tue, 23 Sep 2014 14:45:48 +0000 (10:45 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Tue, 23 Sep 2014 14:45:48 +0000 (10:45 -0400)
scripts/build_app.js
scripts/lib/build_all.js

index f15d6ef..67f8897 100755 (executable)
@@ -23,6 +23,7 @@ regexp:true, undef:true, strict:true, trailing:true, white:true */
     .option('-f, --frozen', 'Apply frozen scripts for first-time foundation extension installs.')
     .option('-i, --initialize', 'Initialize database. Must be used with the -b or -s flag.')
     .option('-k, --keepsql', 'Do not delete the temporary sql files that represent the payload of the build.')
+    .option('-n, --npmdev', 'Build an npm-linked extension without using the npm registry.')
     .option('-p, --populate', 'Populate data.')
     .option('-q, --quick', 'Quicken install by not dropping the views pre-emptively.')
     .option('-s, --source [/path/to/source_data.sql]', 'Location of source data. Must be used with the -i flag.')
@@ -39,6 +40,7 @@ regexp:true, undef:true, strict:true, trailing:true, white:true */
     frozen: program.frozen,
     initialize: program.initialize,
     keepSql: program.keepsql,
+    npmDev: program.npmdev,
     populateData: program.populate,
     source: program.source,
     unregister: program.unregister,
index 469fbd6..6e02709 100644 (file)
@@ -56,6 +56,9 @@ var _ = require('underscore'),
 
       },
       function (done) {
+        if (specs[0].npmDev) {
+          return;
+        }
         // step 1: npm install extension if necessary
         // an alternate approach would be only npm install these
         // extensions on an npm install.
@@ -134,6 +137,7 @@ var _ = require('underscore'),
             extensions: paths,
             database: database,
             keepSql: options.keepSql,
+            npmDev: options.npmDev,
             populateData: options.populateData,
             wipeViews: options.wipeViews,
             clientOnly: options.clientOnly,
@@ -195,6 +199,7 @@ var _ = require('underscore'),
       }
       buildSpecs.initialize = true;
       buildSpecs.keepSql = options.keepSql;
+      buildSpecs.npmDev = options.npmDev;
       buildSpecs.populateData = options.populateData;
       buildSpecs.wipeViews = options.wipeViews;
       buildSpecs.clientOnly = options.clientOnly;
@@ -214,6 +219,7 @@ var _ = require('underscore'),
         return {
           database: database,
           frozen: options.frozen,
+          npmDev: options.npmDev,
           keepSql: options.keepSql,
           populateData: options.populateData,
           wipeViews: options.wipeViews,