Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5bc4578d7 | |||
2a87fc839d | |||
149e0cbc9e | |||
3b69350ce2 | |||
ea793f9556 | |||
5266fcd3df |
9
index.js
9
index.js
@ -21,12 +21,19 @@ plugins.gulp.task("indexTS", function () {
|
|||||||
});
|
});
|
||||||
plugins.gulp.task("indexTS", function () {
|
plugins.gulp.task("indexTS", function () {
|
||||||
plugins.gulp.src(paths.indexTS)
|
plugins.gulp.src(paths.indexTS)
|
||||||
|
.pipe(plugins.gulpTypeScript({
|
||||||
|
out: "index.js"
|
||||||
|
}))
|
||||||
|
.pipe(plugins.gulp.dest(paths.cwd));
|
||||||
|
});
|
||||||
|
plugins.gulp.task("testTS", function () {
|
||||||
|
plugins.gulp.src(paths.testTS)
|
||||||
.pipe(plugins.gulpTypeScript({
|
.pipe(plugins.gulpTypeScript({
|
||||||
out: "test.js"
|
out: "test.js"
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd));
|
.pipe(plugins.gulp.dest(paths.cwd));
|
||||||
});
|
});
|
||||||
plugins.gulp.task("default", [], function () {
|
plugins.gulp.task("default", ["indexTS", "testTS"], function () {
|
||||||
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||||
});
|
});
|
||||||
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "0.0.5",
|
"version": "1.0.0",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"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)"
|
"testm": "(cd test/ && npm update && npm test)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
3
test/index.js
Normal file
3
test/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
(function () {
|
||||||
|
console.log("test");
|
||||||
|
}());
|
21
test/node_modules/npmts/LICENSE
generated
vendored
21
test/node_modules/npmts/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 Push.Rocks
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
42
test/node_modules/npmts/package.json
generated
vendored
42
test/node_modules/npmts/package.json
generated
vendored
@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "npmts",
|
|
||||||
"version": "0.0.4",
|
|
||||||
"description": "write npm modules with TypeScript",
|
|
||||||
"main": "index.js",
|
|
||||||
"bin": {
|
|
||||||
"npmts": "index.js"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "(cd compile && node compile.js)",
|
|
||||||
"testm": "(cd test/ && npm update && npm test)"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/pushrocks/npmts.git"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"TypeScript",
|
|
||||||
"Declaration"
|
|
||||||
],
|
|
||||||
"author": {
|
|
||||||
"name": "Lossless Digital UG",
|
|
||||||
"url": "haftungsbeschraenkt"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/pushrocks/npmts/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/pushrocks/npmts#readme",
|
|
||||||
"dependencies": {
|
|
||||||
"beautylog": "^2.0.2",
|
|
||||||
"gulp": "^3.9.0",
|
|
||||||
"gulp-insert": "^0.5.0",
|
|
||||||
"gulp-typescript": "^2.10.0",
|
|
||||||
"smartcli": "0.0.11"
|
|
||||||
},
|
|
||||||
"gitHead": "71f8d14ee96af237e658b400e3bdaa33fdff7785",
|
|
||||||
"readme": "ERROR: No README data found!",
|
|
||||||
"_id": "npmts@0.0.4",
|
|
||||||
"_shasum": "fe9f1bec27aba50fd16f45c3c7053072c860dcd6",
|
|
||||||
"_from": "npmts@0.0.4"
|
|
||||||
}
|
|
@ -19,12 +19,19 @@ plugins.gulp.task("indexTS", function () {
|
|||||||
});
|
});
|
||||||
plugins.gulp.task("indexTS", function () {
|
plugins.gulp.task("indexTS", function () {
|
||||||
plugins.gulp.src(paths.indexTS)
|
plugins.gulp.src(paths.indexTS)
|
||||||
|
.pipe(plugins.gulpTypeScript({
|
||||||
|
out: "index.js"
|
||||||
|
}))
|
||||||
|
.pipe(plugins.gulp.dest(paths.cwd));
|
||||||
|
});
|
||||||
|
plugins.gulp.task("testTS", function () {
|
||||||
|
plugins.gulp.src(paths.testTS)
|
||||||
.pipe(plugins.gulpTypeScript({
|
.pipe(plugins.gulpTypeScript({
|
||||||
out: "test.js"
|
out: "test.js"
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd));
|
.pipe(plugins.gulp.dest(paths.cwd));
|
||||||
});
|
});
|
||||||
plugins.gulp.task("default", [], function () {
|
plugins.gulp.task("default", ["indexTS", "testTS"], function () {
|
||||||
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||||
});
|
});
|
||||||
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||||
|
@ -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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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,EAAC,QAAQ,CAAC,EAAC;IAC9C,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"}
|
10
ts/index.ts
10
ts/index.ts
@ -22,13 +22,21 @@ plugins.gulp.task("indexTS", function(){
|
|||||||
|
|
||||||
plugins.gulp.task("indexTS", function(){
|
plugins.gulp.task("indexTS", function(){
|
||||||
plugins.gulp.src(paths.indexTS)
|
plugins.gulp.src(paths.indexTS)
|
||||||
|
.pipe(plugins.gulpTypeScript({
|
||||||
|
out: "index.js"
|
||||||
|
}))
|
||||||
|
.pipe(plugins.gulp.dest(paths.cwd))
|
||||||
|
});
|
||||||
|
|
||||||
|
plugins.gulp.task("testTS", function(){
|
||||||
|
plugins.gulp.src(paths.testTS)
|
||||||
.pipe(plugins.gulpTypeScript({
|
.pipe(plugins.gulpTypeScript({
|
||||||
out: "test.js"
|
out: "test.js"
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd))
|
.pipe(plugins.gulp.dest(paths.cwd))
|
||||||
});
|
});
|
||||||
|
|
||||||
plugins.gulp.task("default",[],function(){
|
plugins.gulp.task("default",["indexTS","testTS"],function(){
|
||||||
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
plugins.beautylog.success("TypeScript for this module was compiled successfully.");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user