Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
ea793f9556 | |||
5266fcd3df | |||
39b7fe99c7 | |||
e1419d85cc | |||
71f8d14ee9 | |||
d539aef414 | |||
a1146e4c79 | |||
6e053fc4c6 | |||
2dffae4872 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.c9/
|
.c9/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
test/node_modules
|
@ -1,6 +1,7 @@
|
|||||||
// import gulp
|
// import gulp
|
||||||
var gulp = require("gulp");
|
var gulp = require("gulp");
|
||||||
var gulpTypescript = require("gulp-typescript");
|
var gulpTypescript = require("gulp-typescript");
|
||||||
|
var gulpInsert = require("gulp-insert");
|
||||||
var plugins = {
|
var plugins = {
|
||||||
beautylog: require("beautylog")
|
beautylog: require("beautylog")
|
||||||
};
|
};
|
||||||
@ -9,10 +10,11 @@ plugins.beautylog.log('now compiling the mojo.io gulp tasks');
|
|||||||
|
|
||||||
gulp.task('indexTS', function() {
|
gulp.task('indexTS', function() {
|
||||||
var stream = gulp.src('../ts/index.ts')
|
var stream = gulp.src('../ts/index.ts')
|
||||||
.pipe(gulpTypescript({
|
.pipe(gulpTypescript({
|
||||||
out: "index.js"
|
out: "index.js"
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest("../"));
|
.pipe(gulpInsert.prepend('#!/usr/bin/env node\n\n'))
|
||||||
|
.pipe(gulp.dest("../"));
|
||||||
return stream;
|
return stream;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
6
index.js
6
index.js
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
/// <reference path="./typings/tsd.d.ts" />
|
/// <reference path="./typings/tsd.d.ts" />
|
||||||
var plugins = {
|
var plugins = {
|
||||||
beautylog: require("beautylog"),
|
beautylog: require("beautylog"),
|
||||||
@ -24,3 +26,7 @@ plugins.gulp.task("indexTS", function () {
|
|||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd));
|
.pipe(plugins.gulp.dest(paths.cwd));
|
||||||
});
|
});
|
||||||
|
plugins.gulp.task("default", ["indexTS"], function () {
|
||||||
|
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||||
|
});
|
||||||
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "0.0.1",
|
"version": "0.0.6",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"npmts": "index.js"
|
"npmts": "index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(cd compile && node compile.js)"
|
"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)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -26,6 +28,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"beautylog": "^2.0.2",
|
"beautylog": "^2.0.2",
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
|
"gulp-insert": "^0.5.0",
|
||||||
"gulp-typescript": "^2.10.0",
|
"gulp-typescript": "^2.10.0",
|
||||||
"smartcli": "0.0.11"
|
"smartcli": "0.0.11"
|
||||||
}
|
}
|
||||||
|
23
test/node_modules/npmts/package.json
generated
vendored
23
test/node_modules/npmts/package.json
generated
vendored
@ -1,10 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "0.0.0",
|
"version": "0.0.5",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
"bin": {
|
||||||
|
"npmts": "index.js"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npmts"
|
"test": "(cd compile && node compile.js)",
|
||||||
|
"testm": "(cd test/ && npm update && npm test)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -23,9 +27,16 @@
|
|||||||
"url": "https://github.com/pushrocks/npmts/issues"
|
"url": "https://github.com/pushrocks/npmts/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/npmts#readme",
|
"homepage": "https://github.com/pushrocks/npmts#readme",
|
||||||
"gitHead": "1699d259b46348a712c638a4fc76a2579e0ecfd9",
|
"dependencies": {
|
||||||
|
"beautylog": "^2.0.2",
|
||||||
|
"gulp": "^3.9.0",
|
||||||
|
"gulp-insert": "^0.5.0",
|
||||||
|
"gulp-typescript": "^2.10.0",
|
||||||
|
"smartcli": "0.0.11"
|
||||||
|
},
|
||||||
|
"gitHead": "39b7fe99c7ba1d5299c4a7d61f1dad52ee0fb561",
|
||||||
"readme": "ERROR: No README data found!",
|
"readme": "ERROR: No README data found!",
|
||||||
"_id": "npmts@0.0.0",
|
"_id": "npmts@0.0.5",
|
||||||
"_shasum": "9baf3fb8c432625908c5f6a545e93e95ea0bd2c4",
|
"_shasum": "f38b99c06a047aec650770b891c588b1cec03db0",
|
||||||
"_from": "npmts@latest"
|
"_from": "npmts@0.0.5"
|
||||||
}
|
}
|
||||||
|
4
test/ts/index.js
Normal file
4
test/ts/index.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
(function () {
|
||||||
|
console.log("test");
|
||||||
|
}());
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
test/ts/index.js.map
Normal file
1
test/ts/index.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,CAAC;IACG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACvB,CAAC,EAAE,CAAC,CAAC"}
|
@ -24,4 +24,8 @@ plugins.gulp.task("indexTS", function () {
|
|||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd));
|
.pipe(plugins.gulp.dest(paths.cwd));
|
||||||
});
|
});
|
||||||
|
plugins.gulp.task("default", ["indexTS"], function () {
|
||||||
|
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||||
|
});
|
||||||
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,IAAI,OAAO,GAAG;IACV,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC,iBAAiB,CAAC;IAC1C,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC;CAChC,CAAC;AAEF,IAAI,KAAK,GAAO,EAAE,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;AAC5C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC,aAAa,CAAC,CAAC;AAC3D,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAC,YAAY,CAAC,CAAC;AAEzD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;IACzB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,C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,IAAI,CAAC,SAAS,EAAE;IACzB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;SAC1B,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QACzB,GAAG,EAAE,UAAU;KAClB,CAAC,CAAC;SACF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;IACzB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;SAC1B,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QACzB,GAAG,EAAE,SAAS;KACjB,CAAC,CAAC;SACF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,CAAC,SAAS,CAAC,EAAC;IACrC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,uDAAuD,CAAC,CAAC;AACtF,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
@ -26,4 +26,10 @@ plugins.gulp.task("indexTS", function(){
|
|||||||
out: "test.js"
|
out: "test.js"
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd))
|
.pipe(plugins.gulp.dest(paths.cwd))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
plugins.gulp.task("default",["indexTS"],function(){
|
||||||
|
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||||
|
});
|
||||||
|
|
||||||
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
Reference in New Issue
Block a user