Compare commits

...

4 Commits

Author SHA1 Message Date
8efa67a4ff 3.3.2 2016-02-25 08:39:48 +01:00
f7304f59a5 add optional docs publishing 2016-02-25 08:39:38 +01:00
070385867e 3.3.1 2016-02-25 08:26:32 +01:00
e429eb8ae0 fix cli call 2016-02-25 08:26:00 +01:00
18 changed files with 19 additions and 33 deletions

View File

@ -2,5 +2,6 @@
support support
compile compile
test/ test/
docs/
examples examples
.gitignore .gitignore

2
assets/cli.js Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env node
var index = require("./index.js");

View File

@ -4,7 +4,6 @@ var plugins = {
gulp: require("gulp"), gulp: require("gulp"),
g:{ g:{
typescript: require("gulp-typescript"), typescript: require("gulp-typescript"),
header: require("gulp-header"),
typings:require("gulp-typings") typings:require("gulp-typings")
}, },
mergeStream: require("merge2"), mergeStream: require("merge2"),
@ -25,7 +24,7 @@ plugins.gulp.task("typings",function(){
return stream; return stream;
}); });
plugins.gulp.task("indexTS",["typings"], function() { plugins.gulp.task("TS",["typings"], function() {
var stream = plugins.gulp.src([ var stream = plugins.gulp.src([
plugins.path.join(paths.packageBase,'ts/**/*.ts'), plugins.path.join(paths.packageBase,'ts/**/*.ts'),
"!" + plugins.path.join(paths.packageBase,'ts/typings/**/*.d.ts') "!" + plugins.path.join(paths.packageBase,'ts/typings/**/*.d.ts')
@ -34,12 +33,16 @@ plugins.gulp.task("indexTS",["typings"], function() {
target:"ES5", target:"ES5",
module:"commonjs" module:"commonjs"
})) }))
.pipe(plugins.g.header('#!/usr/bin/env node\n\n'))
.pipe(plugins.gulp.dest(plugins.path.join(paths.packageBase, 'dist/'))); .pipe(plugins.gulp.dest(plugins.path.join(paths.packageBase, 'dist/')));
return stream; 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'); plugins.beautylog.success('Typescript compiled');
}); });

3
dist/cli.js vendored
View File

@ -1,3 +1,2 @@
#!/usr/bin/env node #!/usr/bin/env node
var index = require("./index.js");
/// <reference path="./typings/main.d.ts" />

2
dist/index.js vendored
View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
console.log("**** starting NPMTS ****"); console.log("**** starting NPMTS ****");
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");

2
dist/npmts.cli.js vendored
View File

@ -1,3 +1 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />

View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");

View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");

4
dist/npmts.jsdoc.js vendored
View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
@ -34,7 +32,7 @@ var publishDocs = function (configArg) {
+ "&& git push --force --quiet " + "&& git push --force --quiet "
+ "\"" + gitUrl + "\" " + "\"" + gitUrl + "\" "
+ "master:gh-pages " + "> /dev/null 2>&1"; + "master:gh-pages " + "> /dev/null 2>&1";
if (plugins.smartenv.getEnv().isTravis) { if (plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish) {
plugins.beautylog.log("now publishing docs to GitHub"); plugins.beautylog.log("now publishing docs to GitHub");
if (!plugins.shelljs.which('git')) { if (!plugins.shelljs.which('git')) {
plugins.beautylog.error('Git is not installed'); plugins.beautylog.error('Git is not installed');

View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
exports.run = function (configArg) { exports.run = function (configArg) {

2
dist/npmts.paths.js vendored
View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = {}; var paths = {};

View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = { var plugins = {
beautylog: require("beautylog"), beautylog: require("beautylog"),

View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var NpmtsConfigFile = require("./npmts.configfile"); var NpmtsConfigFile = require("./npmts.configfile");
var NpmtsOptions = require("./npmts.options"); var NpmtsOptions = require("./npmts.options");

2
dist/npmts.tests.js vendored
View File

@ -1,5 +1,3 @@
#!/usr/bin/env node
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");

View File

@ -1,6 +1,6 @@
{ {
"name": "npmts", "name": "npmts",
"version": "3.3.0", "version": "3.3.2",
"description": "write npm modules with TypeScript", "description": "write npm modules with TypeScript",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
@ -49,7 +49,6 @@
"typings": "^0.6.8" "typings": "^0.6.8"
}, },
"devDependencies": { "devDependencies": {
"gulp-header": "^1.7.1",
"gulp-typings": "^1.1.0" "gulp-typings": "^1.1.0"
} }
} }

View File

@ -9,5 +9,8 @@
"./subts2/", "./subts2/",
"./customdir" "./customdir"
], ],
"coveralls":true "coveralls":true,
"docs": {
"publish":true
}
} }

View File

@ -1 +0,0 @@
/// <reference path="./typings/main.d.ts" />

View File

@ -39,8 +39,8 @@ var publishDocs = function(configArg){
+ "\"" + gitUrl + "\" " + "\"" + gitUrl + "\" "
+ "master:gh-pages " + "> /dev/null 2>&1"; + "master:gh-pages " + "> /dev/null 2>&1";
if(plugins.smartenv.getEnv().isTravis){ if(plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish){
plugins.beautylog.log("now publishing docs to GitHub") plugins.beautylog.log("now publishing docs to GitHub");
if (!plugins.shelljs.which('git')) { if (!plugins.shelljs.which('git')) {
plugins.beautylog.error('Git is not installed'); plugins.beautylog.error('Git is not installed');
plugins.shelljs.exit(1); plugins.shelljs.exit(1);