Permalink
Browse files

add config for include all

  • Loading branch information...
1 parent 61b52bb commit 89d99de19d9488c86d1f877f25c3230ce954c8f9 @lepture lepture committed Apr 23, 2013
Showing with 15 additions and 7 deletions.
  1. +14 −4 bin/spm-build
  2. +0 −2 index.js
  3. +1 −1 lib/config.js
View
@@ -7,12 +7,13 @@ commander.usage('[options]');
commander.version(require('../package').version)
commander
- .option('-I, --input-directory <dir>', 'input directory: [src]')
- .option('-O, --output-directory <dir>', 'output directory: [dist]')
+ .option('-I, --input-directory [dir]', 'input directory: [src]')
+ .option('-O, --output-directory [dir]', 'output directory: [dist]')
.option('-v, --verbose', 'show more logs')
.option('-q, --quiet', 'show less logs')
.option('-f, --force', 'force to build')
- .option('--encoding <encoding>', 'file encoding: [utf8]')
+ .option('--include [keyword]', 'include option for concat task: [relative]')
+ .option('--encoding [encoding]', 'file encoding: [utf8]')
.option('--no-color', 'disable colorful print');
@@ -37,4 +38,13 @@ commander.parse(process.argv);
// run install
console.log();
-runner(commander);
+var config = {};
+config.src = commander.inputDirectory || 'src';
+config.dest = commander.outputDirectory || 'dist';
+config.quiet = commander.quiet;
+config.force = commander.force;
+config.verbose = commander.verbose;
+config.include = commander.include || 'relative';
+config.encoding = commander.encoding;
+config.color = commander.color;
+runner(config);
View
@@ -88,8 +88,6 @@ function parseOptions(options) {
var globalpath = path.join(spmrc.get('user.home'), '.spm', 'sea-modules');
options.paths.push(globalpath);
- options.src = options.inputDirectory || 'src';
- options.dest = options.outputDirectory || 'dist';
return options;
}
View
@@ -230,7 +230,7 @@ function distConfig(options, pkg) {
});
// for concat
- options.include = 'relative';
+ options.include = grunt.option('include') || 'relative';
return {
concat: {
// options should have css2js

0 comments on commit 89d99de

Please sign in to comment.