Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
8efa67a4ff | |||
f7304f59a5 | |||
070385867e | |||
e429eb8ae0 | |||
6045174edb | |||
08dcdb2c9f | |||
44aa92c83c |
@ -2,5 +2,6 @@
|
||||
support
|
||||
compile
|
||||
test/
|
||||
docs/
|
||||
examples
|
||||
.gitignore
|
@ -12,4 +12,4 @@ deploy:
|
||||
repo: pushrocks/npmts
|
||||
env:
|
||||
global:
|
||||
secure: dsyzaiCghJroEC6MK6PHq/IBRC/PjnHO+ucdiX73E7mdYV7wQvnqnd9+81vyqwdtSiIYM8VaO73PNJ3NkBRX5ANDU+WwVywxQqsRZoEeNxhTbU0/RFSa3jEJBcFTMwUC19vtlnKJ+j0FgU+ywFZ8ae7pky0SNGHpu9FLOqRNLy9nHkFrivcok4DHy/tz3WCJQdXDi+NJ4Thst96qbN99RnbHMfS4Z7TilAUEeeLre3NuYBWcZDYSrPLwuDs8BI1zct42YelBeL0EkAhp3WWoUUIOvOyjhrU0RhGyLWueIigPVYGD5xu4b1AfC7nMXNMmmMcDtGmeN/XBcFtEPeiSd8tocq26QS6pSvQ8xe1dDB9xdxfVAk9omXtZLsKIzuZ5lD7cZMSrEAW3ZMjHFAx4M2PKUmsoiJrU11tdxKHAknxNYTMVrUbtKBpu1weV+LSZOecOwV3l6s/azgSp97OVIn6Cr/AwoYTA+oWhuxdYf1f0Sq3KYckDw+57nG8cLUL+mZdvY81yHau+3xgSAwfjWgYgyeoZyCUz/QU1HCk4khJGsLc/bgyj3iCKv3S9IT5wUYkgRS+7+NGgG+PEaMZ2Ud2h0o6s7MXvW2aFb5IZ4+Jz51rH49sPUd4qBmYu2LwHCCdrwJeuvUZVoP61xHmnX4dpig3HJGuTh+Ihz8GQnqA=
|
||||
secure: kPKBMnEKoC+K5dXpl11NhuK3LSp0c0fRO60Akj3QeQBjUWnVAcF0Ht30c31y0lnJaMEzXhmUIKdR7RQnlmw5be4TYGINzY7FD3Dcv7o+HO1ZQrkpMWSu46jF6ZJer9moGjZ8e0rX8wZyB9SqsXYlwWRzqvxfOVxQfTvU3BEnJKHbhq+R5JMJ8dwLBPNTJKMWKq85KNsjo3ap0BjxdBUoRLzvrn31VOPH30BkvmLGc5YiIz5QmITll/T2wmQKYTNT2qDlEJ729B8pYa3eNlCNi89AxsLDGCmEoJAVrPsyw5g+gAyBqZ1GRULy83UJbELUq7cse3MRLMSwCAm4f0INRAuqcyiKYJ4+LHd0NwKrFQ/dQ0pvyBTbbEjNemXaakkWH7S6F03UvF+u+tiQ7C97XH0CRsseGlm36zCkAClEhtWVWA4U0Q5c6zqRAAOYOI0xquXalRKPTJe7fCYewp2eqmlp8drt8MxancyKI/ynXNoR5vGFzDTSRoPjTlaYQPmbiH4+Nd5+6Qoj94PEIqghebIPDQo3C7vWts4WGccux5b2q524UgB63hjJQA6+GQOo1q4RibouS6WScn8/tW/ZOEP+sNhDfkeiZUIjye+Q3PyzonGHefgSQ8wBbsc8LOX0cKUcEFWr14nhdQ9ZeW+hrSSF04TbM4zGJPGcKhmT2UU=
|
||||
|
2
assets/cli.js
Normal file
2
assets/cli.js
Normal file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
var index = require("./index.js");
|
@ -4,7 +4,7 @@ var plugins = {
|
||||
gulp: require("gulp"),
|
||||
g:{
|
||||
typescript: require("gulp-typescript"),
|
||||
header: require("gulp-header")
|
||||
typings:require("gulp-typings")
|
||||
},
|
||||
mergeStream: require("merge2"),
|
||||
path: require("path")
|
||||
@ -18,7 +18,13 @@ paths = {
|
||||
|
||||
plugins.beautylog.log('now compiling NPMTS');
|
||||
|
||||
plugins.gulp.task('indexTS', function() {
|
||||
plugins.gulp.task("typings",function(){
|
||||
var stream = plugins.gulp.src(plugins.path.join(paths.packageBase,"ts/typings.json"))
|
||||
.pipe(plugins.g.typings());
|
||||
return stream;
|
||||
});
|
||||
|
||||
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')
|
||||
@ -27,12 +33,16 @@ plugins.gulp.task('indexTS', 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');
|
||||
});
|
||||
|
||||
|
3
dist/cli.js
vendored
3
dist/cli.js
vendored
@ -1,3 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var index = require("./index.js");
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
console.log("**** starting NPMTS ****");
|
||||
var plugins = require("./npmts.plugins");
|
||||
|
2
dist/npmts.cli.js
vendored
2
dist/npmts.cli.js
vendored
@ -1,3 +1 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
|
2
dist/npmts.compile.js
vendored
2
dist/npmts.compile.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = require("./npmts.paths");
|
||||
|
2
dist/npmts.configfile.js
vendored
2
dist/npmts.configfile.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = require("./npmts.paths");
|
||||
|
19
dist/npmts.jsdoc.js
vendored
19
dist/npmts.jsdoc.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = require("./npmts.paths");
|
||||
@ -26,17 +24,15 @@ var publishDocs = function (configArg) {
|
||||
}).git.httpsUrl;
|
||||
var deployScript = ""
|
||||
+ "cd " + paths.docsDir + " "
|
||||
+ "&& git init "
|
||||
+ "&& git config user.name \"TRAVIS CI\" "
|
||||
+ "&& git config user.email \"travis@shipzone.io\" "
|
||||
+ "&& git add . "
|
||||
+ "&& git commit -m \"Deploy to GitHub Pages\" "
|
||||
+ "&& git init " + "> /dev/null 2>&1 "
|
||||
+ "&& git config user.name \"TRAVIS CI\" " + "> /dev/null 2>&1 "
|
||||
+ "&& git config user.email \"travis@shipzone.io\" " + "> /dev/null 2>&1 "
|
||||
+ "&& git add . " + "> /dev/null 2>&1 "
|
||||
+ "&& git commit -m \"Deploy to GitHub Pages\" " + "> /dev/null 2>&1 "
|
||||
+ "&& git push --force --quiet "
|
||||
+ "\"" + gitUrl + "\" "
|
||||
+ "master:gh-pages "
|
||||
+ "> /dev/null 2>&1";
|
||||
console.log(deployScript);
|
||||
if (plugins.smartenv.getEnv().isTravis) {
|
||||
+ "master:gh-pages " + "> /dev/null 2>&1";
|
||||
if (plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish) {
|
||||
plugins.beautylog.log("now publishing docs to GitHub");
|
||||
if (!plugins.shelljs.which('git')) {
|
||||
plugins.beautylog.error('Git is not installed');
|
||||
@ -46,6 +42,7 @@ var publishDocs = function (configArg) {
|
||||
plugins.beautylog.error('Error: Git failed');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
plugins.beautylog.success("Docs have been deployed to GitHub");
|
||||
done.resolve(configArg);
|
||||
}
|
||||
else {
|
||||
|
2
dist/npmts.options.js
vendored
2
dist/npmts.options.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
exports.run = function (configArg) {
|
||||
|
2
dist/npmts.paths.js
vendored
2
dist/npmts.paths.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = {};
|
||||
|
2
dist/npmts.plugins.js
vendored
2
dist/npmts.plugins.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = {
|
||||
beautylog: require("beautylog"),
|
||||
|
2
dist/npmts.promisechain.js
vendored
2
dist/npmts.promisechain.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var NpmtsConfigFile = require("./npmts.configfile");
|
||||
var NpmtsOptions = require("./npmts.options");
|
||||
|
2
dist/npmts.tests.js
vendored
2
dist/npmts.tests.js
vendored
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = require("./npmts.paths");
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npmts",
|
||||
"version": "3.2.2",
|
||||
"version": "3.3.2",
|
||||
"description": "write npm modules with TypeScript",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@ -49,6 +49,6 @@
|
||||
"typings": "^0.6.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-header": "^1.7.1"
|
||||
"gulp-typings": "^1.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -9,5 +9,8 @@
|
||||
"./subts2/",
|
||||
"./customdir"
|
||||
],
|
||||
"coveralls":true
|
||||
"coveralls":true,
|
||||
"docs": {
|
||||
"publish":true
|
||||
}
|
||||
}
|
@ -30,19 +30,17 @@ var publishDocs = function(configArg){
|
||||
|
||||
var deployScript = ""
|
||||
+ "cd " + paths.docsDir + " "
|
||||
+ "&& git init "
|
||||
+ "&& git config user.name \"TRAVIS CI\" "
|
||||
+ "&& git config user.email \"travis@shipzone.io\" "
|
||||
+ "&& git add . "
|
||||
+ "&& git commit -m \"Deploy to GitHub Pages\" "
|
||||
+ "&& git init " + "> /dev/null 2>&1 "
|
||||
+ "&& git config user.name \"TRAVIS CI\" " + "> /dev/null 2>&1 "
|
||||
+ "&& git config user.email \"travis@shipzone.io\" " + "> /dev/null 2>&1 "
|
||||
+ "&& git add . " + "> /dev/null 2>&1 "
|
||||
+ "&& git commit -m \"Deploy to GitHub Pages\" " + "> /dev/null 2>&1 "
|
||||
+ "&& git push --force --quiet "
|
||||
+ "\"" + gitUrl + "\" "
|
||||
+ "master:gh-pages "
|
||||
+ "> /dev/null 2>&1";
|
||||
console.log(deployScript);
|
||||
+ "master:gh-pages " + "> /dev/null 2>&1";
|
||||
|
||||
if(plugins.smartenv.getEnv().isTravis){
|
||||
plugins.beautylog.log("now publishing docs to GitHub")
|
||||
if(plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish){
|
||||
plugins.beautylog.log("now publishing docs to GitHub");
|
||||
if (!plugins.shelljs.which('git')) {
|
||||
plugins.beautylog.error('Git is not installed');
|
||||
plugins.shelljs.exit(1);
|
||||
@ -50,6 +48,7 @@ var publishDocs = function(configArg){
|
||||
plugins.beautylog.error('Error: Git failed');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
plugins.beautylog.success("Docs have been deployed to GitHub");
|
||||
done.resolve(configArg);
|
||||
} else {
|
||||
done.resolve(configArg);
|
||||
|
Reference in New Issue
Block a user