diff --git a/.gitignore b/.gitignore
index e5c68e3..e563cdd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
.idea/
.c9/
node_modules/
-test/node_modules
\ No newline at end of file
+test/node_modules
+ts/*.js
+ts/*.js.map
\ No newline at end of file
diff --git a/package.json b/package.json
index c793dfe..ec16501 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"scripts": {
"test": "(cd compile && node compile.js)",
"release": "(git add -A && git commit -m 'update' && git push origin master && npm version patch && npm publish)",
- "testm": "(cd test/ && npm update && npm test)"
+ "testm": "(cd test/ && node ../index.js)"
},
"repository": {
"type": "git",
@@ -30,6 +30,8 @@
"beautylog": "2.0.2",
"gulp": "3.9.0",
"gulp-insert": "0.5.0",
+ "gulp-sequence": "^0.4.4",
+ "gulp-tsd": "^0.1.0",
"gulp-typescript": "2.10.0",
"merge2": "0.3.6",
"smartcli": "0.0.11"
diff --git a/test/index.d.ts b/test/index.d.ts
deleted file mode 100644
index e69de29..0000000
diff --git a/test/index.js b/test/index.js
deleted file mode 100644
index 0ce6740..0000000
--- a/test/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env node
-
-(function () {
- console.log("test");
-}());
diff --git a/ts/index.js b/ts/index.js
deleted file mode 100644
index 289fae7..0000000
--- a/ts/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-///
-///
-///
-///
-///
-///
-var plugins = NpmtsPlugins.init();
-var paths = NpmtsPaths.init();
-NpmtsDefault.init();
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/ts/index.js.map b/ts/index.js.map
deleted file mode 100644
index e95d0a2..0000000
--- a/ts/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,2CAA2C;AAC3C,uCAAuC;AACvC,yCAAyC;AACzC,0CAA0C;AAC1C,2CAA2C;AAE3C,IAAI,OAAO,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;AAClC,IAAI,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;AAC9B,YAAY,CAAC,IAAI,EAAE,CAAC"}
\ No newline at end of file
diff --git a/ts/npmts.cli.js b/ts/npmts.cli.js
deleted file mode 100644
index 60e1753..0000000
--- a/ts/npmts.cli.js
+++ /dev/null
@@ -1,2 +0,0 @@
-///
-//# sourceMappingURL=npmts.cli.js.map
\ No newline at end of file
diff --git a/ts/npmts.cli.js.map b/ts/npmts.cli.js.map
deleted file mode 100644
index 7886c5f..0000000
--- a/ts/npmts.cli.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npmts.cli.js","sourceRoot":"","sources":["npmts.cli.ts"],"names":[],"mappings":"AAAA,mCAAmC"}
\ No newline at end of file
diff --git a/ts/npmts.custom.js b/ts/npmts.custom.js
deleted file mode 100644
index 25c4599..0000000
--- a/ts/npmts.custom.js
+++ /dev/null
@@ -1,2 +0,0 @@
-///
-//# sourceMappingURL=npmts.custom.js.map
\ No newline at end of file
diff --git a/ts/npmts.custom.js.map b/ts/npmts.custom.js.map
deleted file mode 100644
index 42cbea9..0000000
--- a/ts/npmts.custom.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npmts.custom.js","sourceRoot":"","sources":["npmts.custom.ts"],"names":[],"mappings":"AAAA,mCAAmC"}
\ No newline at end of file
diff --git a/ts/npmts.default.js b/ts/npmts.default.js
deleted file mode 100644
index 710c9ef..0000000
--- a/ts/npmts.default.js
+++ /dev/null
@@ -1,31 +0,0 @@
-///
-var NpmtsDefault;
-(function (NpmtsDefault) {
- NpmtsDefault.init = function () {
- plugins.gulp.task("indexTS", function () {
- var tsResult = plugins.gulp.src(paths.indexTS)
- .pipe(plugins.g.typescript({
- out: "index.js",
- declaration: true
- }));
- return plugins.mergeStream([
- tsResult.dts.pipe(plugins.gulp.dest(paths.cwd)),
- tsResult.js
- .pipe(plugins.g.insert.prepend('#!/usr/bin/env node\n\n'))
- .pipe(plugins.gulp.dest(paths.cwd))
- ]);
- });
- plugins.gulp.task("testTS", function () {
- plugins.gulp.src(paths.testTS)
- .pipe(plugins.g.typescript({
- out: "test.js"
- }))
- .pipe(plugins.gulp.dest(paths.cwd));
- });
- plugins.gulp.task("default", ["indexTS", "testTS"], function () {
- plugins.beautylog.success("TypeScript for this module was compiled successfully.");
- });
- plugins.gulp.start.apply(plugins.gulp, ['default']);
- };
-})(NpmtsDefault || (NpmtsDefault = {}));
-//# sourceMappingURL=npmts.default.js.map
\ No newline at end of file
diff --git a/ts/npmts.default.js.map b/ts/npmts.default.js.map
deleted file mode 100644
index 4f1dd16..0000000
--- a/ts/npmts.default.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npmts.default.js","sourceRoot":"","sources":["npmts.default.ts"],"names":["NpmtsDefault"],"mappings":"AAAA,mCAAmC;AAEnC,IAAO,YAAY,CA+BlB;AA/BD,WAAO,YAAY,EAAC,CAAC;IACNA,iBAAIA,GAAGA;QACd,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACzB,IAAI,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;iBACzC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;gBACvB,GAAG,EAAC,UAAU;gBACd,WAAW,EAAC,IAAI;aACnB,CAAC,CAAC,CAAC;YAER,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;gBACvB,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC/C,QAAQ,CAAC,EAAE;qBACN,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;qBACzD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC1C,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACxB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;iBACzB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;gBACvB,GAAG,EAAE,SAAS;aACjB,CAAC,CAAC;iBACF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,CAAC,SAAS,EAAC,QAAQ,CAAC,EAAC;YAC7C,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,uDAAuD,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACxD,CAAC,CAAAA;AACLA,CAACA,EA/BM,YAAY,KAAZ,YAAY,QA+BlB"}
\ No newline at end of file
diff --git a/ts/npmts.default.ts b/ts/npmts.default.ts
index 77defeb..528994d 100644
--- a/ts/npmts.default.ts
+++ b/ts/npmts.default.ts
@@ -2,7 +2,15 @@
module NpmtsDefault {
export var init = function() {
- plugins.gulp.task("indexTS", function(){
+ plugins.gulp.task("defaultTsd",function(cb){
+ plugins.g.tsd({
+ command: 'reinstall',
+ config: paths.tsd
+ }, cb);
+ });
+
+
+ plugins.gulp.task("defaultIndexTS", function(){
var tsResult = plugins.gulp.src(paths.indexTS)
.pipe(plugins.g.typescript({
out:"index.js",
@@ -17,7 +25,7 @@ module NpmtsDefault {
]);
});
- plugins.gulp.task("testTS", function(){
+ plugins.gulp.task("defaultTestTS", function(){
plugins.gulp.src(paths.testTS)
.pipe(plugins.g.typescript({
out: "test.js"
@@ -25,7 +33,8 @@ module NpmtsDefault {
.pipe(plugins.gulp.dest(paths.cwd))
});
- plugins.gulp.task("default",["indexTS","testTS"],function(){
+ plugins.gulp.task("default",function(cb){
+ plugins.g.sequence("defaultTsd","defaultIndexTS","defaultTestTS");
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
});
diff --git a/ts/npmts.paths.js b/ts/npmts.paths.js
deleted file mode 100644
index af6b6f2..0000000
--- a/ts/npmts.paths.js
+++ /dev/null
@@ -1,12 +0,0 @@
-///
-var NpmtsPaths;
-(function (NpmtsPaths) {
- NpmtsPaths.init = function () {
- var paths = {};
- paths.cwd = plugins.smartcli.get.cwd().path;
- paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
- paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");
- return paths;
- };
-})(NpmtsPaths || (NpmtsPaths = {}));
-//# sourceMappingURL=npmts.paths.js.map
\ No newline at end of file
diff --git a/ts/npmts.paths.js.map b/ts/npmts.paths.js.map
deleted file mode 100644
index 506d544..0000000
--- a/ts/npmts.paths.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npmts.paths.js","sourceRoot":"","sources":["npmts.paths.ts"],"names":["NpmtsPaths"],"mappings":"AAAA,mCAAmC;AACnC,IAAO,UAAU,CAQhB;AARD,WAAO,UAAU,EAAC,CAAC;IACJA,eAAIA,GAAGA;QACd,IAAI,KAAK,GAAO,EAAE,CAAC;QACnB,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QAC5C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC,aAAa,CAAC,CAAC;QAC3D,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC,YAAY,CAAC,CAAC;QACzD,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC,CAAAA;AACLA,CAACA,EARM,UAAU,KAAV,UAAU,QAQhB"}
\ No newline at end of file
diff --git a/ts/npmts.plugins.js b/ts/npmts.plugins.js
deleted file mode 100644
index eb4e752..0000000
--- a/ts/npmts.plugins.js
+++ /dev/null
@@ -1,19 +0,0 @@
-///
-var NpmtsPlugins;
-(function (NpmtsPlugins) {
- NpmtsPlugins.init = function () {
- var plugins = {
- beautylog: require("beautylog"),
- gulp: require("gulp"),
- g: {
- typescript: require("gulp-typescript"),
- insert: require("gulp-insert")
- },
- mergeStream: require("merge2"),
- path: require("path"),
- smartcli: require("smartcli")
- };
- return plugins;
- };
-})(NpmtsPlugins || (NpmtsPlugins = {}));
-//# sourceMappingURL=npmts.plugins.js.map
\ No newline at end of file
diff --git a/ts/npmts.plugins.js.map b/ts/npmts.plugins.js.map
deleted file mode 100644
index c2fffde..0000000
--- a/ts/npmts.plugins.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npmts.plugins.js","sourceRoot":"","sources":["npmts.plugins.ts"],"names":["NpmtsPlugins"],"mappings":"AAAA,mCAAmC;AACnC,IAAO,YAAY,CAelB;AAfD,WAAO,YAAY,EAAC,CAAC;IACNA,iBAAIA,GAAGA;QACd,IAAI,OAAO,GAAG;YACV,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC;YAC/B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;YACrB,CAAC,EAAE;gBACC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC;gBACtC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC;aACjC;YACD,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC;YAC9B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC;SAChC,CAAC;QACF,MAAM,CAAC,OAAO,CAAC;IACnB,CAAC,CAAAA;AACLA,CAACA,EAfM,YAAY,KAAZ,YAAY,QAelB"}
\ No newline at end of file
diff --git a/ts/npmts.plugins.ts b/ts/npmts.plugins.ts
index ed0be13..2ee6713 100644
--- a/ts/npmts.plugins.ts
+++ b/ts/npmts.plugins.ts
@@ -5,8 +5,11 @@ module NpmtsPlugins {
beautylog: require("beautylog"),
gulp: require("gulp"),
g: {
- typescript: require("gulp-typescript"),
- insert: require("gulp-insert")
+ insert: require("gulp-insert"),
+ sequence: require("gulp-sequence"),
+ tsd: require("gulp-tsd"),
+ typescript: require("gulp-typescript")
+
},
mergeStream: require("merge2"),
path: require("path"),