Compare commits

...

4 Commits

Author SHA1 Message Date
f83eb035c2 1.0.12 2016-01-25 21:20:28 +01:00
359e844c69 update plugins 2016-01-25 21:20:17 +01:00
6b40cfd954 1.0.11 2016-01-25 20:52:42 +01:00
8f13dbef9f fix issue with CI detection 2016-01-25 20:52:29 +01:00
8 changed files with 22 additions and 48 deletions

5
index.d.ts vendored
View File

@ -4,7 +4,6 @@ declare module NpmtsPlugins {
beautylog: any; beautylog: any;
gulp: any; gulp: any;
g: { g: {
if: any;
insert: any; insert: any;
sequence: any; sequence: any;
tsd: any; tsd: any;
@ -18,9 +17,6 @@ declare module NpmtsPlugins {
declare module NpmtsPaths { declare module NpmtsPaths {
var init: () => any; var init: () => any;
} }
declare module NpmtsInfo {
var init: () => void;
}
declare module NpmtsDefault { declare module NpmtsDefault {
var init: () => void; var init: () => void;
} }
@ -28,7 +24,6 @@ declare var plugins: {
beautylog: any; beautylog: any;
gulp: any; gulp: any;
g: { g: {
if: any;
insert: any; insert: any;
sequence: any; sequence: any;
tsd: any; tsd: any;

View File

@ -8,7 +8,6 @@ var NpmtsPlugins;
beautylog: require("beautylog"), beautylog: require("beautylog"),
gulp: require("gulp"), gulp: require("gulp"),
g: { g: {
if: require("gulp-if"),
insert: require("gulp-insert"), insert: require("gulp-insert"),
sequence: require("gulp-sequence"), sequence: require("gulp-sequence"),
tsd: require("gulp-tsd"), tsd: require("gulp-tsd"),
@ -34,30 +33,23 @@ var NpmtsPaths;
return paths; return paths;
}; };
})(NpmtsPaths || (NpmtsPaths = {})); })(NpmtsPaths || (NpmtsPaths = {}));
/// <reference path="./index.ts" />
var NpmtsInfo;
(function (NpmtsInfo) {
NpmtsInfo.init = function () {
if (process.env.TRAVIS) {
plugins.beautylog.warn("We are on TRAVIS. Typings will not be installed due to GitHub API restrictions.");
plugins.beautylog.log("Make sure the repo tracks ting directories");
}
else {
plugins.beautylog.log("We are on a dev machine. Typings will be installed prior to TypeScript compilation.");
}
};
})(NpmtsInfo || (NpmtsInfo = {}));
/// <reference path="./index.ts" /> /// <reference path="./index.ts" />
/// <reference path="./index.ts" /> /// <reference path="./index.ts" />
var NpmtsDefault; var NpmtsDefault;
(function (NpmtsDefault) { (function (NpmtsDefault) {
NpmtsDefault.init = function () { NpmtsDefault.init = function () {
plugins.gulp.task("defaultTsd", function (cb) { plugins.gulp.task("defaultTsd", function (cb) {
plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue); if (!process.env.TRAVIS) {
plugins.g.if(process.env.TRAVIS, plugins.g.tsd({ plugins.g.tsd({
command: 'reinstall', command: 'reinstall',
config: paths.tsd config: paths.tsd
}, cb)); }, cb);
plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue);
}
else {
plugins.beautylog.warn("We are on TRAVIS. Typings will not be installed due to GitHub API restrictions.");
plugins.beautylog.log("Make sure the repo tracks " + "typings".blue + " directories");
}
}); });
plugins.gulp.task("defaultIndexTS", function () { plugins.gulp.task("defaultIndexTS", function () {
plugins.beautylog.log("now compiling" + " ts/index.ts".blue); plugins.beautylog.log("now compiling" + " ts/index.ts".blue);
@ -95,10 +87,9 @@ var NpmtsDefault;
/// <reference path="./npmts.plugins.ts" /> /// <reference path="./npmts.plugins.ts" />
/// <reference path="./npmts.cli.ts" /> /// <reference path="./npmts.cli.ts" />
/// <reference path="./npmts.paths.ts" /> /// <reference path="./npmts.paths.ts" />
/// <reference path="./npmts.info.ts" /> /// <reference path="./npmts.options.ts" />
/// <reference path="./npmts.custom.ts" /> /// <reference path="./npmts.custom.ts" />
/// <reference path="./npmts.default.ts" /> /// <reference path="./npmts.default.ts" />
var plugins = NpmtsPlugins.init(); var plugins = NpmtsPlugins.init();
var paths = NpmtsPaths.init(); var paths = NpmtsPaths.init();
NpmtsInfo.init();
NpmtsDefault.init(); NpmtsDefault.init();

View File

@ -1,6 +1,6 @@
{ {
"name": "npmts", "name": "npmts",
"version": "1.0.10", "version": "1.0.12",
"description": "write npm modules with TypeScript", "description": "write npm modules with TypeScript",
"main": "index.js", "main": "index.js",
"typings": "./index.d.ts", "typings": "./index.d.ts",
@ -29,7 +29,6 @@
"dependencies": { "dependencies": {
"beautylog": "2.0.2", "beautylog": "2.0.2",
"gulp": "3.9.0", "gulp": "3.9.0",
"gulp-if": "^2.0.0",
"gulp-insert": "0.5.0", "gulp-insert": "0.5.0",
"gulp-sequence": "^0.4.4", "gulp-sequence": "^0.4.4",
"gulp-tsd": "^0.1.0", "gulp-tsd": "^0.1.0",

View File

@ -2,11 +2,10 @@
/// <reference path="./npmts.plugins.ts" /> /// <reference path="./npmts.plugins.ts" />
/// <reference path="./npmts.cli.ts" /> /// <reference path="./npmts.cli.ts" />
/// <reference path="./npmts.paths.ts" /> /// <reference path="./npmts.paths.ts" />
/// <reference path="./npmts.info.ts" /> /// <reference path="./npmts.options.ts" />
/// <reference path="./npmts.custom.ts" /> /// <reference path="./npmts.custom.ts" />
/// <reference path="./npmts.default.ts" /> /// <reference path="./npmts.default.ts" />
var plugins = NpmtsPlugins.init(); var plugins = NpmtsPlugins.init();
var paths = NpmtsPaths.init(); var paths = NpmtsPaths.init();
NpmtsInfo.init();
NpmtsDefault.init(); NpmtsDefault.init();

View File

@ -3,14 +3,17 @@
module NpmtsDefault { module NpmtsDefault {
export var init = function() { export var init = function() {
plugins.gulp.task("defaultTsd",function(cb){ plugins.gulp.task("defaultTsd",function(cb){
plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue); if(!process.env.TRAVIS) {
plugins.g.if(process.env.TRAVIS,
plugins.g.tsd({ plugins.g.tsd({
command: 'reinstall', command: 'reinstall',
config: paths.tsd config: paths.tsd
}, cb) }, cb);
) plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue);
; } else {
plugins.beautylog.warn("We are on TRAVIS. Typings will not be installed due to GitHub API restrictions.");
plugins.beautylog.log("Make sure the repo tracks " + "typings".blue + " directories")
}
}); });

View File

@ -1,12 +0,0 @@
/// <reference path="./index.ts" />
module NpmtsInfo {
export var init = function(){
if(process.env.TRAVIS){
plugins.beautylog.warn("We are on TRAVIS. Typings will not be installed due to GitHub API restrictions.");
plugins.beautylog.log("Make sure the repo tracks ting directories")
} else {
plugins.beautylog.log("We are on a dev machine. Typings will be installed prior to TypeScript compilation.");
}
}
}

0
ts/npmts.options.ts Normal file
View File

View File

@ -5,7 +5,6 @@ module NpmtsPlugins {
beautylog: require("beautylog"), beautylog: require("beautylog"),
gulp: require("gulp"), gulp: require("gulp"),
g: { g: {
if: require("gulp-if"),
insert: require("gulp-insert"), insert: require("gulp-insert"),
sequence: require("gulp-sequence"), sequence: require("gulp-sequence"),
tsd: require("gulp-tsd"), tsd: require("gulp-tsd"),