Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
7d18e92ff1 | |||
634763c03f | |||
3352165436 | |||
6c57a4703f | |||
822734e545 | |||
8dcbe98c60 |
14
index.js
14
index.js
@ -81,11 +81,12 @@ var NpmtsDefault;
|
||||
});
|
||||
plugins.gulp.task("defaultTestTS", function () {
|
||||
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({
|
||||
out: "test.js"
|
||||
}))
|
||||
.pipe(plugins.gulp.dest(paths.testDir));
|
||||
return stream;
|
||||
});
|
||||
plugins.gulp.task("defaultCleanup", function (cb) {
|
||||
plugins.beautylog.success("TypeScript for this module compiled successfully.");
|
||||
@ -107,14 +108,7 @@ var NpmtsTests;
|
||||
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.
|
||||
// Add each .js file to the mocha instance
|
||||
plugins.fs.readdirSync(paths.testDir).filter(function (file) {
|
||||
// Only keep the .js files
|
||||
return file.substr(-3) === '.js';
|
||||
}).forEach(function (file) {
|
||||
mocha.addFile(plugins.path.join(paths.testDir, file));
|
||||
});
|
||||
// Run the tests.
|
||||
mocha.addFile(plugins.path.join(paths.testDir, "test.js"));
|
||||
mocha.run(function (failures) {
|
||||
process.on('exit', function () {
|
||||
process.exit(failures);
|
||||
@ -145,7 +139,7 @@ var NpmtsPromisechain;
|
||||
/// <reference path="./npmts.default.ts" />
|
||||
/// <reference path="./npmts.tests.ts" />
|
||||
/// <reference path="./npmts.promisechain.ts" />
|
||||
console.log("** starting NPMTS **");
|
||||
console.log("**** starting NPMTS ****");
|
||||
var plugins = NpmtsPlugins.init();
|
||||
var paths = NpmtsPaths.init();
|
||||
var promisechain = NpmtsPromisechain.init();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npmts",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.3",
|
||||
"description": "write npm modules with TypeScript",
|
||||
"main": "index.js",
|
||||
"typings": "./index.d.ts",
|
||||
@ -27,17 +27,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/pushrocks/npmts#readme",
|
||||
"dependencies": {
|
||||
"beautylog": "2.0.2",
|
||||
"beautylog": "2.0.6",
|
||||
"fs-extra": "^0.26.5",
|
||||
"gulp": "3.9.0",
|
||||
"gulp-insert": "0.5.0",
|
||||
"gulp-sequence": "^0.4.4",
|
||||
"gulp-typescript": "2.10.0",
|
||||
"gulp-typings": "0.0.0",
|
||||
"merge2": "0.3.6",
|
||||
"merge2": "1.0.0",
|
||||
"mocha": "^2.4.5",
|
||||
"q": "^1.4.1",
|
||||
"smartcli": "0.0.11",
|
||||
"typings": "^0.6.3"
|
||||
"typings": "^0.6.5"
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
|
||||
console.log("**** starting test ****");
|
||||
|
@ -1 +1,2 @@
|
||||
console.log("**** starting test ****");
|
||||
//# sourceMappingURL=test.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":""}
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC"}
|
@ -0,0 +1 @@
|
||||
console.log("**** starting test ****");
|
@ -8,7 +8,7 @@
|
||||
/// <reference path="./npmts.default.ts" />
|
||||
/// <reference path="./npmts.tests.ts" />
|
||||
/// <reference path="./npmts.promisechain.ts" />
|
||||
console.log("** starting NPMTS **")
|
||||
console.log("**** starting NPMTS ****")
|
||||
var plugins = NpmtsPlugins.init();
|
||||
var paths = NpmtsPaths.init();
|
||||
var promisechain = NpmtsPromisechain.init();
|
||||
|
@ -23,11 +23,12 @@ module NpmtsDefault {
|
||||
|
||||
plugins.gulp.task("defaultTestTS", function(){
|
||||
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({
|
||||
out: "test.js"
|
||||
}))
|
||||
.pipe(plugins.gulp.dest(paths.testDir))
|
||||
.pipe(plugins.gulp.dest(paths.testDir));
|
||||
return stream;
|
||||
});
|
||||
|
||||
plugins.gulp.task("defaultCleanup",function(cb){
|
||||
|
@ -4,20 +4,11 @@ module NpmtsTests {
|
||||
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.
|
||||
|
||||
// Add each .js file to the mocha instance
|
||||
plugins.fs.readdirSync(paths.testDir).filter(function(file){
|
||||
// Only keep the .js files
|
||||
return file.substr(-3) === '.js';
|
||||
|
||||
}).forEach(function(file){
|
||||
mocha.addFile(
|
||||
plugins.path.join(paths.testDir, file)
|
||||
);
|
||||
});
|
||||
|
||||
// Run the tests.
|
||||
mocha.addFile(
|
||||
plugins.path.join(paths.testDir, "test.js")
|
||||
);
|
||||
mocha.run(function(failures){
|
||||
process.on('exit', function () {
|
||||
process.exit(failures);
|
||||
|
Reference in New Issue
Block a user