From e429eb8ae0e4e48fe2082dbfa8c28008aff02ecc Mon Sep 17 00:00:00 2001 From: PhilKunz Date: Thu, 25 Feb 2016 08:26:00 +0100 Subject: [PATCH] fix cli call --- assets/cli.js | 2 ++ compile/compile.js | 11 +++++++---- dist/cli.js | 3 +-- dist/index.js | 2 -- dist/npmts.cli.js | 2 -- dist/npmts.compile.js | 2 -- dist/npmts.configfile.js | 2 -- dist/npmts.jsdoc.js | 2 -- dist/npmts.options.js | 2 -- dist/npmts.paths.js | 2 -- dist/npmts.plugins.js | 2 -- dist/npmts.promisechain.js | 2 -- dist/npmts.tests.js | 2 -- package.json | 1 - ts/cli.ts | 1 - 15 files changed, 10 insertions(+), 28 deletions(-) create mode 100644 assets/cli.js delete mode 100644 ts/cli.ts diff --git a/assets/cli.js b/assets/cli.js new file mode 100644 index 0000000..9ab44a7 --- /dev/null +++ b/assets/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +var index = require("./index.js"); \ No newline at end of file diff --git a/compile/compile.js b/compile/compile.js index 6525eef..306ef6a 100644 --- a/compile/compile.js +++ b/compile/compile.js @@ -4,7 +4,6 @@ var plugins = { gulp: require("gulp"), g:{ typescript: require("gulp-typescript"), - header: require("gulp-header"), typings:require("gulp-typings") }, mergeStream: require("merge2"), @@ -25,7 +24,7 @@ plugins.gulp.task("typings",function(){ return stream; }); -plugins.gulp.task("indexTS",["typings"], function() { +plugins.gulp.task("TS",["typings"], function() { var stream = plugins.gulp.src([ plugins.path.join(paths.packageBase,'ts/**/*.ts'), "!" + plugins.path.join(paths.packageBase,'ts/typings/**/*.d.ts') @@ -34,12 +33,16 @@ plugins.gulp.task("indexTS",["typings"], function() { target:"ES5", module:"commonjs" })) - .pipe(plugins.g.header('#!/usr/bin/env node\n\n')) .pipe(plugins.gulp.dest(plugins.path.join(paths.packageBase, 'dist/'))); return stream; }); -plugins.gulp.task('default',['indexTS'], function() { +plugins.gulp.task("CLI",function(){ + var stream = plugins.gulp.src(plugins.path.join(paths.packageBase,"assets/cli.js")) + .pipe(plugins.gulp.dest(plugins.path.join(paths.packageBase, 'dist/'))) +}); + +plugins.gulp.task('default',['TS',"CLI"], function() { plugins.beautylog.success('Typescript compiled'); }); diff --git a/dist/cli.js b/dist/cli.js index 37b7ed1..9ab44a7 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -1,3 +1,2 @@ #!/usr/bin/env node - -/// +var index = require("./index.js"); \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index e1ed86f..227a781 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// console.log("**** starting NPMTS ****"); var plugins = require("./npmts.plugins"); diff --git a/dist/npmts.cli.js b/dist/npmts.cli.js index 37b7ed1..7f65af0 100644 --- a/dist/npmts.cli.js +++ b/dist/npmts.cli.js @@ -1,3 +1 @@ -#!/usr/bin/env node - /// diff --git a/dist/npmts.compile.js b/dist/npmts.compile.js index 5f076cc..5eb6ed7 100644 --- a/dist/npmts.compile.js +++ b/dist/npmts.compile.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); diff --git a/dist/npmts.configfile.js b/dist/npmts.configfile.js index 4909f76..4180514 100644 --- a/dist/npmts.configfile.js +++ b/dist/npmts.configfile.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); diff --git a/dist/npmts.jsdoc.js b/dist/npmts.jsdoc.js index 91bcc87..a68b628 100644 --- a/dist/npmts.jsdoc.js +++ b/dist/npmts.jsdoc.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); diff --git a/dist/npmts.options.js b/dist/npmts.options.js index 674d873..2bbc84a 100644 --- a/dist/npmts.options.js +++ b/dist/npmts.options.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = require("./npmts.plugins"); exports.run = function (configArg) { diff --git a/dist/npmts.paths.js b/dist/npmts.paths.js index 0792fcf..3aff933 100644 --- a/dist/npmts.paths.js +++ b/dist/npmts.paths.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = require("./npmts.plugins"); var paths = {}; diff --git a/dist/npmts.plugins.js b/dist/npmts.plugins.js index aeafe45..5388802 100644 --- a/dist/npmts.plugins.js +++ b/dist/npmts.plugins.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = { beautylog: require("beautylog"), diff --git a/dist/npmts.promisechain.js b/dist/npmts.promisechain.js index f484069..f55b4c4 100644 --- a/dist/npmts.promisechain.js +++ b/dist/npmts.promisechain.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var NpmtsConfigFile = require("./npmts.configfile"); var NpmtsOptions = require("./npmts.options"); diff --git a/dist/npmts.tests.js b/dist/npmts.tests.js index d90bbdc..ec928d9 100644 --- a/dist/npmts.tests.js +++ b/dist/npmts.tests.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); diff --git a/package.json b/package.json index 0810545..a9d7465 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "typings": "^0.6.8" }, "devDependencies": { - "gulp-header": "^1.7.1", "gulp-typings": "^1.1.0" } } diff --git a/ts/cli.ts b/ts/cli.ts deleted file mode 100644 index 17f6a8b..0000000 --- a/ts/cli.ts +++ /dev/null @@ -1 +0,0 @@ -/// \ No newline at end of file