Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d8ce3f227 | |||
de4bbaed9f | |||
7d18e92ff1 | |||
634763c03f | |||
3352165436 | |||
6c57a4703f | |||
822734e545 | |||
8dcbe98c60 | |||
2fbcb58078 | |||
362f8d5388 | |||
8fb4a60fb3 | |||
7c6b5afd5f | |||
f83eb035c2 | |||
359e844c69 | |||
6b40cfd954 | |||
8f13dbef9f |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.c9/
|
.c9/
|
||||||
node_modules/
|
node_modules/
|
||||||
test/node_modules
|
test/**/node_modules/
|
||||||
|
test/**/typings/
|
||||||
ts/*.js
|
ts/*.js
|
||||||
ts/*.js.map
|
ts/*.js.map
|
@ -1,6 +1,6 @@
|
|||||||
.idea/
|
.idea/
|
||||||
support
|
support
|
||||||
compile
|
compile
|
||||||
test
|
test/
|
||||||
examples
|
examples
|
||||||
.gitignore
|
.gitignore
|
19
README.md
19
README.md
@ -37,8 +37,23 @@ the TypeScript Compiler will use the declaration file to resolve typings.
|
|||||||
|
|
||||||
|
|
||||||
### Custom behaviour
|
### Custom behaviour
|
||||||
We are currently building support for custom behaviour with a super simple config file.
|
NPMTS looks for an npmts.json at the root of your package.
|
||||||
Check back soon.
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mode":"custom",
|
||||||
|
"ts":{
|
||||||
|
"./customdir/custom.ts":"./customcompiled.js"
|
||||||
|
},
|
||||||
|
"typings":[
|
||||||
|
"./customdir"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* **mode** can be "default" or "custom"
|
||||||
|
* **ts** You can list as many TypeScript files as you like. The key represents the source TypeScript file, the value the output file.
|
||||||
|
* **typings** is an array of all direcories that have a typings.json present. Uses the new typings tool from npm.
|
||||||
|
|
||||||
## Readme for Devs
|
## Readme for Devs
|
||||||
There is a [README-dev.md](README-dev.md) in the repo.
|
There is a [README-dev.md](README-dev.md) in the repo.
|
||||||
|
@ -11,7 +11,7 @@ var plugins = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
plugins.beautylog.log('now compiling the mojo.io gulp tasks');
|
plugins.beautylog.log('now compiling NPMTS');
|
||||||
|
|
||||||
plugins.gulp.task('indexTS', function() {
|
plugins.gulp.task('indexTS', function() {
|
||||||
var tsResult = plugins.gulp.src('../ts/index.ts')
|
var tsResult = plugins.gulp.src('../ts/index.ts')
|
||||||
|
33
index.d.ts
vendored
33
index.d.ts
vendored
@ -1,41 +1,58 @@
|
|||||||
/// <reference path="../ts/typings/tsd.d.ts" />
|
/// <reference path="../ts/typings/main.d.ts" />
|
||||||
declare module NpmtsPlugins {
|
declare module NpmtsPlugins {
|
||||||
var init: () => {
|
var init: () => {
|
||||||
beautylog: any;
|
beautylog: any;
|
||||||
|
fs: any;
|
||||||
gulp: any;
|
gulp: any;
|
||||||
g: {
|
g: {
|
||||||
if: any;
|
|
||||||
insert: any;
|
insert: any;
|
||||||
sequence: any;
|
sequence: any;
|
||||||
tsd: any;
|
|
||||||
typescript: any;
|
typescript: any;
|
||||||
};
|
};
|
||||||
mergeStream: any;
|
mergeStream: any;
|
||||||
|
mocha: any;
|
||||||
path: any;
|
path: any;
|
||||||
|
q: any;
|
||||||
smartcli: any;
|
smartcli: any;
|
||||||
|
smartfile: any;
|
||||||
|
typings: any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module NpmtsPaths {
|
declare module NpmtsPaths {
|
||||||
var init: () => any;
|
var init: () => any;
|
||||||
}
|
}
|
||||||
declare module NpmtsInfo {
|
declare module NpmtsOptions {
|
||||||
var init: () => void;
|
var config: any;
|
||||||
|
var run: () => any;
|
||||||
|
}
|
||||||
|
declare module NpmtsCustom {
|
||||||
|
var run: () => any;
|
||||||
}
|
}
|
||||||
declare module NpmtsDefault {
|
declare module NpmtsDefault {
|
||||||
var init: () => void;
|
var run: () => any;
|
||||||
|
}
|
||||||
|
declare module NpmtsTests {
|
||||||
|
var run: () => any;
|
||||||
|
}
|
||||||
|
declare module NpmtsPromisechain {
|
||||||
|
var init: () => any;
|
||||||
}
|
}
|
||||||
declare var plugins: {
|
declare var plugins: {
|
||||||
beautylog: any;
|
beautylog: any;
|
||||||
|
fs: any;
|
||||||
gulp: any;
|
gulp: any;
|
||||||
g: {
|
g: {
|
||||||
if: any;
|
|
||||||
insert: any;
|
insert: any;
|
||||||
sequence: any;
|
sequence: any;
|
||||||
tsd: any;
|
|
||||||
typescript: any;
|
typescript: any;
|
||||||
};
|
};
|
||||||
mergeStream: any;
|
mergeStream: any;
|
||||||
|
mocha: any;
|
||||||
path: any;
|
path: any;
|
||||||
|
q: any;
|
||||||
smartcli: any;
|
smartcli: any;
|
||||||
|
smartfile: any;
|
||||||
|
typings: any;
|
||||||
};
|
};
|
||||||
declare var paths: any;
|
declare var paths: any;
|
||||||
|
declare var promisechain: any;
|
||||||
|
179
index.js
179
index.js
@ -6,17 +6,20 @@ var NpmtsPlugins;
|
|||||||
NpmtsPlugins.init = function () {
|
NpmtsPlugins.init = function () {
|
||||||
var plugins = {
|
var plugins = {
|
||||||
beautylog: require("beautylog"),
|
beautylog: require("beautylog"),
|
||||||
|
fs: require("fs-extra"),
|
||||||
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"),
|
|
||||||
typescript: require("gulp-typescript")
|
typescript: require("gulp-typescript")
|
||||||
},
|
},
|
||||||
mergeStream: require("merge2"),
|
mergeStream: require("merge2"),
|
||||||
|
mocha: require("mocha"),
|
||||||
path: require("path"),
|
path: require("path"),
|
||||||
smartcli: require("smartcli")
|
q: require("q"),
|
||||||
|
smartcli: require("smartcli"),
|
||||||
|
smartfile: require("smartfile"),
|
||||||
|
typings: require("typings")
|
||||||
};
|
};
|
||||||
return plugins;
|
return plugins;
|
||||||
};
|
};
|
||||||
@ -28,42 +31,120 @@ var NpmtsPaths;
|
|||||||
NpmtsPaths.init = function () {
|
NpmtsPaths.init = function () {
|
||||||
var paths = {};
|
var paths = {};
|
||||||
paths.cwd = plugins.smartcli.get.cwd().path;
|
paths.cwd = plugins.smartcli.get.cwd().path;
|
||||||
paths.tsd = plugins.path.join(paths.cwd, "ts/tsd.json");
|
paths.tsDir = plugins.path.join(paths.cwd, "ts/");
|
||||||
paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
|
paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
|
||||||
paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");
|
paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");
|
||||||
|
paths.testDir = plugins.path.join(paths.cwd, "test/");
|
||||||
return paths;
|
return paths;
|
||||||
};
|
};
|
||||||
})(NpmtsPaths || (NpmtsPaths = {}));
|
})(NpmtsPaths || (NpmtsPaths = {}));
|
||||||
/// <reference path="./index.ts" />
|
/// <reference path="./index.ts" />
|
||||||
var NpmtsInfo;
|
var NpmtsOptions;
|
||||||
(function (NpmtsInfo) {
|
(function (NpmtsOptions) {
|
||||||
NpmtsInfo.init = function () {
|
NpmtsOptions.config = {};
|
||||||
if (process.env.TRAVIS) {
|
NpmtsOptions.run = function () {
|
||||||
plugins.beautylog.warn("We are on TRAVIS. Typings will not be installed due to GitHub API restrictions.");
|
var done = plugins.q.defer();
|
||||||
plugins.beautylog.log("Make sure the repo tracks ting directories");
|
var configPath = plugins.path.join(paths.cwd, "npmts.json");
|
||||||
|
if (plugins.smartfile.checks.fileExistsSync(configPath)) {
|
||||||
|
plugins.beautylog.info("npmts.json".blue + " config file found!");
|
||||||
|
NpmtsOptions.config = plugins.smartfile.readFileToObject(configPath);
|
||||||
|
switch (NpmtsOptions.config.mode) {
|
||||||
|
case "default":
|
||||||
|
plugins.beautylog.log("mode is " + NpmtsOptions.config.mode.yellow);
|
||||||
|
done.resolve();
|
||||||
|
break;
|
||||||
|
case "custom":
|
||||||
|
plugins.beautylog.log("mode is " + NpmtsOptions.config.mode.yellow);
|
||||||
|
done.resolve();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
plugins.beautylog.error("mode " + NpmtsOptions.config.mode.yellow + " not recognised!".red);
|
||||||
|
}
|
||||||
|
;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plugins.beautylog.log("We are on a dev machine. Typings will be installed prior to TypeScript compilation.");
|
plugins.beautylog.log("no config file found: so mode is " + "default".yellow);
|
||||||
|
NpmtsOptions.config.mode = "default";
|
||||||
|
done.resolve();
|
||||||
}
|
}
|
||||||
|
;
|
||||||
|
return done.promise;
|
||||||
};
|
};
|
||||||
})(NpmtsInfo || (NpmtsInfo = {}));
|
})(NpmtsOptions || (NpmtsOptions = {}));
|
||||||
/// <reference path="./index.ts" />
|
/// <reference path="./index.ts" />
|
||||||
|
var NpmtsCustom;
|
||||||
|
(function (NpmtsCustom) {
|
||||||
|
NpmtsCustom.run = function () {
|
||||||
|
var done = plugins.q.defer();
|
||||||
|
var config = NpmtsOptions.config;
|
||||||
|
if (config.mode === "custom") {
|
||||||
|
plugins.beautylog.log("now running custom tasks");
|
||||||
|
var moduleStream = plugins.mergeStream({ end: false });
|
||||||
|
/* -------------------------------------------------
|
||||||
|
* ----------- first install typings ---------------
|
||||||
|
* ----------------------------------------------- */
|
||||||
|
var typingsDone = plugins.q.defer();
|
||||||
|
var checkTypingsDone = function (indexArg, compareArray) {
|
||||||
|
if ((indexArg + 1) == compareArray.length) {
|
||||||
|
plugins.beautylog.success("custom typings installed successfully");
|
||||||
|
typingsDone.resolve();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
for (var key in config.typings) {
|
||||||
|
plugins.beautylog.log("now installing " + "typings.json".yellow + " from " + config.typings[key].blue);
|
||||||
|
plugins.typings.install({ production: false, cwd: plugins.path.join(paths.cwd, config.typings[key]) })
|
||||||
|
.then(function () {
|
||||||
|
checkTypingsDone(key, config.typings);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/* -------------------------------------------------
|
||||||
|
* ----------- second compile TS -------------------
|
||||||
|
* ----------------------------------------------- */
|
||||||
|
typingsDone.promise.then(function () {
|
||||||
|
for (var key in config.ts) {
|
||||||
|
plugins.beautylog.log("now compiling" + key.blue);
|
||||||
|
var tsStream = plugins.gulp.src(plugins.path.join(paths.cwd, key))
|
||||||
|
.pipe(plugins.g.typescript({
|
||||||
|
out: plugins.path.basename(config.ts[key]),
|
||||||
|
declaration: true
|
||||||
|
}));
|
||||||
|
var stream = plugins.mergeStream([
|
||||||
|
tsStream.dts.pipe(plugins.gulp.dest(paths.cwd)),
|
||||||
|
tsStream.js
|
||||||
|
.pipe(plugins.g.insert.prepend('#!/usr/bin/env node\n\n'))
|
||||||
|
.pipe(plugins.gulp.dest(plugins.path.dirname(plugins.path.join(paths.cwd, config.ts[key]))))
|
||||||
|
]);
|
||||||
|
moduleStream.add(stream);
|
||||||
|
}
|
||||||
|
moduleStream.on("queueDrain", function () {
|
||||||
|
plugins.beautylog.success("custom TypeScript installed successfully");
|
||||||
|
moduleStream.on("finish", function () {
|
||||||
|
done.resolve();
|
||||||
|
});
|
||||||
|
moduleStream.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
})(NpmtsCustom || (NpmtsCustom = {}));
|
||||||
/// <reference path="./index.ts" />
|
/// <reference path="./index.ts" />
|
||||||
var NpmtsDefault;
|
var NpmtsDefault;
|
||||||
(function (NpmtsDefault) {
|
(function (NpmtsDefault) {
|
||||||
NpmtsDefault.init = function () {
|
NpmtsDefault.run = function () {
|
||||||
plugins.gulp.task("defaultTsd", function (cb) {
|
var done = plugins.q.defer();
|
||||||
plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue);
|
plugins.gulp.task("defaultTypings", function (cb) {
|
||||||
plugins.g.if(process.env.TRAVIS, plugins.g.tsd({
|
plugins.beautylog.log("now installing default typings");
|
||||||
command: 'reinstall',
|
plugins.typings.install({ production: false, cwd: paths.tsDir })
|
||||||
config: paths.tsd
|
.then(function () {
|
||||||
}, cb));
|
cb();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
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);
|
||||||
var tsResult = plugins.gulp.src(paths.indexTS)
|
var tsResult = plugins.gulp.src(paths.indexTS)
|
||||||
.pipe(plugins.g.typescript({
|
.pipe(plugins.g.typescript({
|
||||||
out: "index.js",
|
out: "./index.js",
|
||||||
declaration: true
|
declaration: true
|
||||||
}));
|
}));
|
||||||
return plugins.mergeStream([
|
return plugins.mergeStream([
|
||||||
@ -75,30 +156,70 @@ var NpmtsDefault;
|
|||||||
});
|
});
|
||||||
plugins.gulp.task("defaultTestTS", function () {
|
plugins.gulp.task("defaultTestTS", function () {
|
||||||
plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
|
plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
|
||||||
plugins.gulp.src(paths.testTS)
|
var stream = plugins.gulp.src(paths.testTS)
|
||||||
.pipe(plugins.g.typescript({
|
.pipe(plugins.g.typescript({
|
||||||
out: "test.js"
|
out: "test.js"
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd));
|
.pipe(plugins.gulp.dest(paths.testDir));
|
||||||
|
return stream;
|
||||||
});
|
});
|
||||||
plugins.gulp.task("defaultCleanup", function (cb) {
|
plugins.gulp.task("defaultCleanup", function (cb) {
|
||||||
plugins.beautylog.success("TypeScript for this module compiled successfully.");
|
plugins.beautylog.success("default TypeScript for this module compiled successfully.");
|
||||||
|
done.resolve();
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
plugins.gulp.task("default", function (cb) {
|
plugins.gulp.task("default", function (cb) {
|
||||||
plugins.g.sequence("defaultTsd", "defaultIndexTS", "defaultTestTS", "defaultCleanup", cb);
|
if (NpmtsOptions.config.mode == "default") {
|
||||||
|
plugins.g.sequence("defaultTypings", "defaultIndexTS", "defaultTestTS", "defaultCleanup", cb);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cb();
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||||
|
return done.promise;
|
||||||
};
|
};
|
||||||
})(NpmtsDefault || (NpmtsDefault = {}));
|
})(NpmtsDefault || (NpmtsDefault = {}));
|
||||||
/// <reference path="./typings/tsd.d.ts" />
|
/// <reference path="./index.ts" />
|
||||||
|
var NpmtsTests;
|
||||||
|
(function (NpmtsTests) {
|
||||||
|
NpmtsTests.run = function () {
|
||||||
|
var done = plugins.q.defer();
|
||||||
|
plugins.fs.ensureDirSync(paths.testDir); //make sure that mocha has a directory to look for tests
|
||||||
|
plugins.beautylog.info("Now running mocha tests");
|
||||||
|
var mocha = new plugins.mocha(); // Instantiate a Mocha instance.
|
||||||
|
mocha.addFile(plugins.path.join(paths.testDir, "test.js"));
|
||||||
|
mocha.run(function (failures) {
|
||||||
|
process.on('exit', function () {
|
||||||
|
process.exit(failures);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
})(NpmtsTests || (NpmtsTests = {}));
|
||||||
|
/// <reference path="./index.ts" />
|
||||||
|
var NpmtsPromisechain;
|
||||||
|
(function (NpmtsPromisechain) {
|
||||||
|
NpmtsPromisechain.init = function () {
|
||||||
|
var promisechain;
|
||||||
|
NpmtsOptions.run()
|
||||||
|
.then(NpmtsDefault.run)
|
||||||
|
.then(NpmtsCustom.run)
|
||||||
|
.then(NpmtsTests.run);
|
||||||
|
return promisechain;
|
||||||
|
};
|
||||||
|
})(NpmtsPromisechain || (NpmtsPromisechain = {}));
|
||||||
|
/// <reference path="./typings/main.d.ts" />
|
||||||
/// <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" />
|
||||||
|
/// <reference path="./npmts.tests.ts" />
|
||||||
|
/// <reference path="./npmts.promisechain.ts" />
|
||||||
|
console.log("**** starting NPMTS ****");
|
||||||
var plugins = NpmtsPlugins.init();
|
var plugins = NpmtsPlugins.init();
|
||||||
var paths = NpmtsPaths.init();
|
var paths = NpmtsPaths.init();
|
||||||
NpmtsInfo.init();
|
var promisechain = NpmtsPromisechain.init();
|
||||||
NpmtsDefault.init();
|
|
||||||
|
18
package.json
18
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "1.0.10",
|
"version": "2.1.0",
|
||||||
"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",
|
||||||
@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(cd compile && node compile.js)",
|
"test": "(cd compile && node compile.js)",
|
||||||
"testm": "(npm test) && (cd test/ && node ../index.js)",
|
"testm": "(npm test) && (cd test/assets && node ../../index.js)",
|
||||||
"release": "(git add -A && git commit -m 'update' && git push origin master && npm version patch && npm publish)"
|
"release": "(git add -A && git commit -m 'update' && git push origin master && npm version patch && npm publish)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -27,14 +27,18 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/npmts#readme",
|
"homepage": "https://github.com/pushrocks/npmts#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"beautylog": "2.0.2",
|
"beautylog": "2.0.7",
|
||||||
|
"fs-extra": "^0.26.5",
|
||||||
"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-typescript": "2.10.0",
|
"gulp-typescript": "2.10.0",
|
||||||
"merge2": "0.3.6",
|
"gulp-typings": "0.0.0",
|
||||||
"smartcli": "0.0.11"
|
"merge2": "1.0.1",
|
||||||
|
"mocha": "^2.4.5",
|
||||||
|
"q": "^1.4.1",
|
||||||
|
"smartcli": "0.0.11",
|
||||||
|
"smartfile": "0.0.11",
|
||||||
|
"typings": "^0.6.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
test/assets/customcompiled.d.ts
vendored
Normal file
1
test/assets/customcompiled.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
declare var hello: string;
|
3
test/assets/customcompiled.js
Normal file
3
test/assets/customcompiled.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var hello = "hello";
|
2
test/assets/customdir/custom.js
Normal file
2
test/assets/customdir/custom.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
var hello = "hello";
|
||||||
|
//# sourceMappingURL=custom.js.map
|
1
test/assets/customdir/custom.js.map
Normal file
1
test/assets/customdir/custom.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"custom.js","sourceRoot":"","sources":["custom.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,OAAO,CAAC"}
|
1
test/assets/customdir/custom.ts
Normal file
1
test/assets/customdir/custom.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
var hello = "hello";
|
7
test/assets/customdir/typings.json
Normal file
7
test/assets/customdir/typings.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ambientDependencies": {
|
||||||
|
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777",
|
||||||
|
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts#09e37435ffb2c56a6f908081194a74756f24f99d",
|
||||||
|
"vinyl": "github:DefinitelyTyped/DefinitelyTyped/vinyl/vinyl.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
||||||
|
}
|
||||||
|
}
|
9
test/assets/npmts.json
Normal file
9
test/assets/npmts.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"mode":"custom",
|
||||||
|
"ts":{
|
||||||
|
"./customdir/custom.ts":"./customcompiled.js"
|
||||||
|
},
|
||||||
|
"typings":[
|
||||||
|
"./customdir"
|
||||||
|
]
|
||||||
|
}
|
@ -9,6 +9,5 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"npmts": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
1
test/assets/test/test.js
Normal file
1
test/assets/test/test.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log("**** starting test ****");
|
2
test/assets/ts/test.js
Normal file
2
test/assets/ts/test.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
console.log("**** starting test ****");
|
||||||
|
//# sourceMappingURL=test.js.map
|
1
test/assets/ts/test.js.map
Normal file
1
test/assets/ts/test.js.map
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC"}
|
1
test/assets/ts/test.ts
Normal file
1
test/assets/ts/test.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log("**** starting test ****");
|
7
test/assets/ts/typings.json
Normal file
7
test/assets/ts/typings.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ambientDependencies": {
|
||||||
|
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777",
|
||||||
|
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts#09e37435ffb2c56a6f908081194a74756f24f99d",
|
||||||
|
"vinyl": "github:DefinitelyTyped/DefinitelyTyped/vinyl/vinyl.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "v4",
|
|
||||||
"repo": "borisyankov/DefinitelyTyped",
|
|
||||||
"ref": "master",
|
|
||||||
"path": "typings",
|
|
||||||
"bundle": "typings/tsd.d.ts",
|
|
||||||
"installed": {
|
|
||||||
"node/node.d.ts": {
|
|
||||||
"commit": "78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
|
||||||
},
|
|
||||||
"colors/colors.d.ts": {
|
|
||||||
"commit": "09e37435ffb2c56a6f908081194a74756f24f99d"
|
|
||||||
},
|
|
||||||
"vinyl/vinyl.d.ts": {
|
|
||||||
"commit": "78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
3
test/ts/typings/tsd.d.ts
vendored
3
test/ts/typings/tsd.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
/// <reference path="colors/colors.d.ts" />
|
|
||||||
/// <reference path="node/node.d.ts" />
|
|
||||||
/// <reference path="vinyl/vinyl.d.ts" />
|
|
11
ts/index.ts
11
ts/index.ts
@ -1,12 +1,13 @@
|
|||||||
/// <reference path="./typings/tsd.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
/// <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" />
|
||||||
|
/// <reference path="./npmts.tests.ts" />
|
||||||
|
/// <reference path="./npmts.promisechain.ts" />
|
||||||
|
console.log("**** starting NPMTS ****")
|
||||||
var plugins = NpmtsPlugins.init();
|
var plugins = NpmtsPlugins.init();
|
||||||
var paths = NpmtsPaths.init();
|
var paths = NpmtsPaths.init();
|
||||||
NpmtsInfo.init();
|
var promisechain = NpmtsPromisechain.init();
|
||||||
NpmtsDefault.init();
|
|
||||||
|
@ -1 +1,60 @@
|
|||||||
/// <reference path="./index.ts" />
|
/// <reference path="./index.ts" />
|
||||||
|
module NpmtsCustom {
|
||||||
|
export var run = function(){
|
||||||
|
var done = plugins.q.defer();
|
||||||
|
var config = NpmtsOptions.config;
|
||||||
|
if(config.mode === "custom"){
|
||||||
|
plugins.beautylog.log("now running custom tasks");
|
||||||
|
var moduleStream = plugins.mergeStream({end: false});
|
||||||
|
/* -------------------------------------------------
|
||||||
|
* ----------- first install typings ---------------
|
||||||
|
* ----------------------------------------------- */
|
||||||
|
var typingsDone = plugins.q.defer();
|
||||||
|
var checkTypingsDone = function(indexArg:number,compareArray){
|
||||||
|
if((indexArg + 1) == compareArray.length){
|
||||||
|
plugins.beautylog.success("custom typings installed successfully");
|
||||||
|
typingsDone.resolve();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
for (var key in config.typings) {
|
||||||
|
plugins.beautylog.log("now installing " + "typings.json".yellow + " from " + config.typings[key].blue);
|
||||||
|
plugins.typings.install({production: false, cwd: plugins.path.join(paths.cwd,config.typings[key])})
|
||||||
|
.then(function(){
|
||||||
|
checkTypingsDone(key,config.typings);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/* -------------------------------------------------
|
||||||
|
* ----------- second compile TS -------------------
|
||||||
|
* ----------------------------------------------- */
|
||||||
|
typingsDone.promise.then(function(){
|
||||||
|
for (var key in config.ts) {
|
||||||
|
plugins.beautylog.log("now compiling" + key.blue);
|
||||||
|
var tsStream = plugins.gulp.src(plugins.path.join(paths.cwd,key))
|
||||||
|
.pipe(plugins.g.typescript({
|
||||||
|
out: plugins.path.basename(config.ts[key]),
|
||||||
|
declaration: true
|
||||||
|
}));
|
||||||
|
var stream = plugins.mergeStream([
|
||||||
|
tsStream.dts.pipe(plugins.gulp.dest(paths.cwd)),
|
||||||
|
tsStream.js
|
||||||
|
.pipe(plugins.g.insert.prepend('#!/usr/bin/env node\n\n'))
|
||||||
|
.pipe(plugins.gulp.dest(
|
||||||
|
plugins.path.dirname(
|
||||||
|
plugins.path.join(paths.cwd,config.ts[key])
|
||||||
|
)
|
||||||
|
))
|
||||||
|
]);
|
||||||
|
moduleStream.add(stream);
|
||||||
|
}
|
||||||
|
moduleStream.on("queueDrain",function(){
|
||||||
|
plugins.beautylog.success("custom TypeScript installed successfully");
|
||||||
|
moduleStream.on("finish",function(){
|
||||||
|
done.resolve();
|
||||||
|
});
|
||||||
|
moduleStream.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return done.promise;
|
||||||
|
}
|
||||||
|
}
|
@ -1,24 +1,20 @@
|
|||||||
/// <reference path="./index.ts" />
|
/// <reference path="./index.ts" />
|
||||||
|
|
||||||
module NpmtsDefault {
|
module NpmtsDefault {
|
||||||
export var init = function() {
|
export var run = function() {
|
||||||
plugins.gulp.task("defaultTsd",function(cb){
|
var done = plugins.q.defer();
|
||||||
plugins.beautylog.log("now installing typings from" + " ts/tsd.json".blue);
|
plugins.gulp.task("defaultTypings",function(cb){
|
||||||
plugins.g.if(process.env.TRAVIS,
|
plugins.beautylog.log("now installing default typings");
|
||||||
plugins.g.tsd({
|
plugins.typings.install({production: false, cwd: paths.tsDir})
|
||||||
command: 'reinstall',
|
.then(function(){
|
||||||
config: paths.tsd
|
cb();
|
||||||
}, cb)
|
});
|
||||||
)
|
|
||||||
;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
var tsResult = plugins.gulp.src(paths.indexTS)
|
var tsResult = plugins.gulp.src(paths.indexTS)
|
||||||
.pipe(plugins.g.typescript({
|
.pipe(plugins.g.typescript({
|
||||||
out:"index.js",
|
out:"./index.js",
|
||||||
declaration:true
|
declaration:true
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -32,22 +28,31 @@ module NpmtsDefault {
|
|||||||
|
|
||||||
plugins.gulp.task("defaultTestTS", function(){
|
plugins.gulp.task("defaultTestTS", function(){
|
||||||
plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
|
plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
|
||||||
plugins.gulp.src(paths.testTS)
|
var stream = plugins.gulp.src(paths.testTS)
|
||||||
.pipe(plugins.g.typescript({
|
.pipe(plugins.g.typescript({
|
||||||
out: "test.js"
|
out: "test.js"
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.gulp.dest(paths.cwd))
|
.pipe(plugins.gulp.dest(paths.testDir));
|
||||||
|
return stream;
|
||||||
});
|
});
|
||||||
|
|
||||||
plugins.gulp.task("defaultCleanup",function(cb){
|
plugins.gulp.task("defaultCleanup",function(cb){
|
||||||
plugins.beautylog.success("TypeScript for this module compiled successfully.");
|
plugins.beautylog.success("default TypeScript for this module compiled successfully.");
|
||||||
|
done.resolve();
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
plugins.gulp.task("default",function(cb){
|
plugins.gulp.task("default",function(cb){
|
||||||
plugins.g.sequence("defaultTsd","defaultIndexTS","defaultTestTS","defaultCleanup",cb);
|
if(NpmtsOptions.config.mode == "default"){
|
||||||
|
plugins.g.sequence("defaultTypings","defaultIndexTS","defaultTestTS","defaultCleanup",cb);
|
||||||
|
} else {
|
||||||
|
cb();
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
plugins.gulp.start.apply(plugins.gulp, ['default']);
|
||||||
|
return done.promise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
29
ts/npmts.options.ts
Normal file
29
ts/npmts.options.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/// <reference path="./index.ts" />
|
||||||
|
module NpmtsOptions {
|
||||||
|
export var config:any = {};
|
||||||
|
export var run = function(){
|
||||||
|
var done = plugins.q.defer();
|
||||||
|
var configPath = plugins.path.join(paths.cwd,"npmts.json");
|
||||||
|
if(plugins.smartfile.checks.fileExistsSync(configPath)){
|
||||||
|
plugins.beautylog.info("npmts.json".blue + " config file found!");
|
||||||
|
config = plugins.smartfile.readFileToObject(configPath);
|
||||||
|
switch (config.mode){
|
||||||
|
case "default":
|
||||||
|
plugins.beautylog.log("mode is " + config.mode.yellow);
|
||||||
|
done.resolve();
|
||||||
|
break;
|
||||||
|
case "custom":
|
||||||
|
plugins.beautylog.log("mode is " + config.mode.yellow);
|
||||||
|
done.resolve();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
plugins.beautylog.error("mode " + config.mode.yellow + " not recognised!".red);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
plugins.beautylog.log("no config file found: so mode is " + "default".yellow);
|
||||||
|
config.mode = "default";
|
||||||
|
done.resolve();
|
||||||
|
};
|
||||||
|
return done.promise;
|
||||||
|
}
|
||||||
|
}
|
@ -3,9 +3,10 @@ module NpmtsPaths {
|
|||||||
export var init = function() {
|
export var init = function() {
|
||||||
var paths:any = {};
|
var paths:any = {};
|
||||||
paths.cwd = plugins.smartcli.get.cwd().path;
|
paths.cwd = plugins.smartcli.get.cwd().path;
|
||||||
paths.tsd = plugins.path.join(paths.cwd,"ts/tsd.json");
|
paths.tsDir = plugins.path.join(paths.cwd,"ts/");
|
||||||
paths.indexTS = plugins.path.join(paths.cwd,"ts/index.ts");
|
paths.indexTS = plugins.path.join(paths.cwd,"ts/index.ts");
|
||||||
paths.testTS = plugins.path.join(paths.cwd,"ts/test.ts");
|
paths.testTS = plugins.path.join(paths.cwd,"ts/test.ts");
|
||||||
|
paths.testDir = plugins.path.join(paths.cwd,"test/");
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,18 +3,21 @@ module NpmtsPlugins {
|
|||||||
export var init = function() {
|
export var init = function() {
|
||||||
var plugins = {
|
var plugins = {
|
||||||
beautylog: require("beautylog"),
|
beautylog: require("beautylog"),
|
||||||
|
fs: require("fs-extra"),
|
||||||
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"),
|
|
||||||
typescript: require("gulp-typescript")
|
typescript: require("gulp-typescript")
|
||||||
|
|
||||||
},
|
},
|
||||||
mergeStream: require("merge2"),
|
mergeStream: require("merge2"),
|
||||||
|
mocha: require("mocha"),
|
||||||
path: require("path"),
|
path: require("path"),
|
||||||
smartcli: require("smartcli")
|
q:require("q"),
|
||||||
|
smartcli: require("smartcli"),
|
||||||
|
smartfile: require("smartfile"),
|
||||||
|
typings: require("typings")
|
||||||
};
|
};
|
||||||
return plugins;
|
return plugins;
|
||||||
}
|
}
|
||||||
|
11
ts/npmts.promisechain.ts
Normal file
11
ts/npmts.promisechain.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/// <reference path="./index.ts" />
|
||||||
|
module NpmtsPromisechain {
|
||||||
|
export var init = function(){
|
||||||
|
var promisechain;
|
||||||
|
NpmtsOptions.run()
|
||||||
|
.then(NpmtsDefault.run)
|
||||||
|
.then(NpmtsCustom.run)
|
||||||
|
.then(NpmtsTests.run);
|
||||||
|
return promisechain;
|
||||||
|
}
|
||||||
|
}
|
19
ts/npmts.tests.ts
Normal file
19
ts/npmts.tests.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/// <reference path="./index.ts" />
|
||||||
|
module NpmtsTests {
|
||||||
|
export var run = function() {
|
||||||
|
var done = plugins.q.defer();
|
||||||
|
plugins.fs.ensureDirSync(paths.testDir); //make sure that mocha has a directory to look for tests
|
||||||
|
plugins.beautylog.info("Now running mocha tests");
|
||||||
|
|
||||||
|
var mocha = new plugins.mocha(); // Instantiate a Mocha instance.
|
||||||
|
mocha.addFile(
|
||||||
|
plugins.path.join(paths.testDir, "test.js")
|
||||||
|
);
|
||||||
|
mocha.run(function(failures){
|
||||||
|
process.on('exit', function () {
|
||||||
|
process.exit(failures);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
}
|
||||||
|
}
|
18
ts/tsd.json
18
ts/tsd.json
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "v4",
|
|
||||||
"repo": "borisyankov/DefinitelyTyped",
|
|
||||||
"ref": "master",
|
|
||||||
"path": "typings",
|
|
||||||
"bundle": "typings/tsd.d.ts",
|
|
||||||
"installed": {
|
|
||||||
"node/node.d.ts": {
|
|
||||||
"commit": "78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
|
||||||
},
|
|
||||||
"colors/colors.d.ts": {
|
|
||||||
"commit": "09e37435ffb2c56a6f908081194a74756f24f99d"
|
|
||||||
},
|
|
||||||
"vinyl/vinyl.d.ts": {
|
|
||||||
"commit": "78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
7
ts/typings.json
Normal file
7
ts/typings.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ambientDependencies": {
|
||||||
|
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777",
|
||||||
|
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts#09e37435ffb2c56a6f908081194a74756f24f99d",
|
||||||
|
"vinyl": "github:DefinitelyTyped/DefinitelyTyped/vinyl/vinyl.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777"
|
||||||
|
}
|
||||||
|
}
|
3
ts/typings/browser.d.ts
vendored
Normal file
3
ts/typings/browser.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/// <reference path="browser/ambient/colors/colors.d.ts" />
|
||||||
|
/// <reference path="browser/ambient/node/node.d.ts" />
|
||||||
|
/// <reference path="browser/ambient/vinyl/vinyl.d.ts" />
|
@ -1,3 +1,5 @@
|
|||||||
|
// Compiled using typings@0.6.3
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/09e37435ffb2c56a6f908081194a74756f24f99d/colors/colors.d.ts
|
||||||
// Type definitions for Colors.js 0.6.0-1
|
// Type definitions for Colors.js 0.6.0-1
|
||||||
// Project: https://github.com/Marak/colors.js
|
// Project: https://github.com/Marak/colors.js
|
||||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||||
@ -120,4 +122,4 @@ interface String {
|
|||||||
america: string;
|
america: string;
|
||||||
trap: string;
|
trap: string;
|
||||||
random: string;
|
random: string;
|
||||||
}
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
// Compiled using typings@0.6.3
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/78d36dd49b6b55b9fdfe61776a12bf05c8b07777/node/node.d.ts
|
||||||
// Type definitions for Node.js v4.x
|
// Type definitions for Node.js v4.x
|
||||||
// Project: http://nodejs.org/
|
// Project: http://nodejs.org/
|
||||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/borisyankov/DefinitelyTyped>
|
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/borisyankov/DefinitelyTyped>
|
||||||
@ -2087,4 +2089,4 @@ declare module "constants" {
|
|||||||
export var W_OK: number;
|
export var W_OK: number;
|
||||||
export var X_OK: number;
|
export var X_OK: number;
|
||||||
export var UV_UDP_REUSEADDR: number;
|
export var UV_UDP_REUSEADDR: number;
|
||||||
}
|
}
|
@ -1,9 +1,10 @@
|
|||||||
|
// Compiled using typings@0.6.3
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/78d36dd49b6b55b9fdfe61776a12bf05c8b07777/vinyl/vinyl.d.ts
|
||||||
// Type definitions for vinyl 0.4.3
|
// Type definitions for vinyl 0.4.3
|
||||||
// Project: https://github.com/wearefractal/vinyl
|
// Project: https://github.com/wearefractal/vinyl
|
||||||
// Definitions by: vvakame <https://github.com/vvakame/>, jedmao <https://github.com/jedmao>
|
// Definitions by: vvakame <https://github.com/vvakame/>, jedmao <https://github.com/jedmao>
|
||||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||||
|
|
||||||
/// <reference path="../node/node.d.ts" />
|
|
||||||
|
|
||||||
declare module 'vinyl' {
|
declare module 'vinyl' {
|
||||||
|
|
||||||
@ -106,4 +107,4 @@ declare module 'vinyl' {
|
|||||||
|
|
||||||
export = File;
|
export = File;
|
||||||
|
|
||||||
}
|
}
|
3
ts/typings/main.d.ts
vendored
Normal file
3
ts/typings/main.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/// <reference path="main/ambient/colors/colors.d.ts" />
|
||||||
|
/// <reference path="main/ambient/node/node.d.ts" />
|
||||||
|
/// <reference path="main/ambient/vinyl/vinyl.d.ts" />
|
@ -1,3 +1,5 @@
|
|||||||
|
// Compiled using typings@0.6.3
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/09e37435ffb2c56a6f908081194a74756f24f99d/colors/colors.d.ts
|
||||||
// Type definitions for Colors.js 0.6.0-1
|
// Type definitions for Colors.js 0.6.0-1
|
||||||
// Project: https://github.com/Marak/colors.js
|
// Project: https://github.com/Marak/colors.js
|
||||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||||
@ -120,4 +122,4 @@ interface String {
|
|||||||
america: string;
|
america: string;
|
||||||
trap: string;
|
trap: string;
|
||||||
random: string;
|
random: string;
|
||||||
}
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
// Compiled using typings@0.6.3
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/78d36dd49b6b55b9fdfe61776a12bf05c8b07777/node/node.d.ts
|
||||||
// Type definitions for Node.js v4.x
|
// Type definitions for Node.js v4.x
|
||||||
// Project: http://nodejs.org/
|
// Project: http://nodejs.org/
|
||||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/borisyankov/DefinitelyTyped>
|
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/borisyankov/DefinitelyTyped>
|
||||||
@ -2087,4 +2089,4 @@ declare module "constants" {
|
|||||||
export var W_OK: number;
|
export var W_OK: number;
|
||||||
export var X_OK: number;
|
export var X_OK: number;
|
||||||
export var UV_UDP_REUSEADDR: number;
|
export var UV_UDP_REUSEADDR: number;
|
||||||
}
|
}
|
@ -1,9 +1,10 @@
|
|||||||
|
// Compiled using typings@0.6.3
|
||||||
|
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/78d36dd49b6b55b9fdfe61776a12bf05c8b07777/vinyl/vinyl.d.ts
|
||||||
// Type definitions for vinyl 0.4.3
|
// Type definitions for vinyl 0.4.3
|
||||||
// Project: https://github.com/wearefractal/vinyl
|
// Project: https://github.com/wearefractal/vinyl
|
||||||
// Definitions by: vvakame <https://github.com/vvakame/>, jedmao <https://github.com/jedmao>
|
// Definitions by: vvakame <https://github.com/vvakame/>, jedmao <https://github.com/jedmao>
|
||||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||||
|
|
||||||
/// <reference path="../node/node.d.ts" />
|
|
||||||
|
|
||||||
declare module 'vinyl' {
|
declare module 'vinyl' {
|
||||||
|
|
||||||
@ -106,4 +107,4 @@ declare module 'vinyl' {
|
|||||||
|
|
||||||
export = File;
|
export = File;
|
||||||
|
|
||||||
}
|
}
|
3
ts/typings/tsd.d.ts
vendored
3
ts/typings/tsd.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
/// <reference path="node/node.d.ts" />
|
|
||||||
/// <reference path="colors/colors.d.ts" />
|
|
||||||
/// <reference path="vinyl/vinyl.d.ts" />
|
|
Reference in New Issue
Block a user