-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ktutnik/master
Merging from ktutnik repo, add many updates
- Loading branch information
Showing
52 changed files
with
1,421 additions
and
1,790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"**/*.js.map": true, | ||
//"**/*.js": {"when": "$(basename).ts"}, | ||
//"**/*.d.ts": {"when": "$(basename).ts"}, | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/.DS_Store": true | ||
} | ||
, | ||
"vsicons.presets.angular": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,136 @@ | ||
"use strict"; | ||
|
||
|
||
var gulp = require("gulp"), | ||
tsc = require("gulp-typescript"), | ||
var gulp = require("gulp"), | ||
tsc = require("gulp-typescript"), | ||
del = require("del"), | ||
runSequence = require("run-sequence"), | ||
mocha = require("gulp-mocha"), | ||
istanbul = require("gulp-istanbul"); | ||
mocha = require("gulp-mocha"), | ||
istanbul = require("gulp-istanbul"); | ||
//********CLEAN ************ | ||
|
||
gulp.task("clean-source", function (cb) { | ||
return del([ | ||
"./src/**/*.js", | ||
"./src/**/*.d.ts", | ||
"./src/**/*.js.map"], cb) | ||
}) | ||
|
||
gulp.task("clean-test", function (cb) { | ||
return del([ | ||
"./test/**/*.js", | ||
"./test/**/*.d.ts", | ||
"./test/**/*.js.map"], cb) | ||
}) | ||
|
||
gulp.task("clean-lib", function (cb) { | ||
return del([ | ||
"./lib/**/*.js", | ||
"./lib/**/*.d.ts", | ||
"./lib/**/*.js.map"], cb) | ||
}) | ||
|
||
|
||
gulp.task("clean", function (cb) { | ||
runSequence("clean-source", "clean-test", "clean-lib", cb); | ||
}); | ||
|
||
//******** BUILD ************* | ||
|
||
var tsProject = tsc.createProject("tsconfig.json", { | ||
declaration: true, | ||
declaration: false, | ||
noResolve: false, | ||
typescript: require("typescript") | ||
typescript: require("typescript") | ||
}); | ||
|
||
gulp.task("build-source", function() { | ||
gulp.task("build-source", function () { | ||
return gulp.src([ | ||
"src/**/**.ts" | ||
]) | ||
.pipe(tsProject()) | ||
.on("error", function (err) { | ||
process.exit(1); | ||
}) | ||
.pipe(gulp.dest("src/")); | ||
.pipe(tsProject()) | ||
.on("error", function (err) { | ||
process.exit(1); | ||
}) | ||
.pipe(gulp.dest("src/")); | ||
}); | ||
|
||
var tsTestProject = tsc.createProject("tsconfig.json", { | ||
declaration: false, | ||
noResolve: false, | ||
typescript: require("typescript") | ||
typescript: require("typescript") | ||
}); | ||
|
||
gulp.task("build-test", function() { | ||
gulp.task("build-test", function () { | ||
return gulp.src([ | ||
"test/**/**.ts" | ||
]) | ||
.pipe(tsTestProject()) | ||
.on("error", function (err) { | ||
process.exit(1); | ||
}) | ||
.pipe(gulp.dest("test")); | ||
.pipe(tsTestProject()) | ||
.on("error", function (err) { | ||
process.exit(1); | ||
}) | ||
.pipe(gulp.dest("test")); | ||
}); | ||
|
||
|
||
gulp.task("build", function(cb) { | ||
runSequence("build-source", "build-test", cb); | ||
gulp.task("build", function (cb) { | ||
runSequence("build-source", "build-test", cb); | ||
}); | ||
|
||
|
||
//******** TEST ************* | ||
gulp.task("mocha", function() { | ||
return gulp.src([ | ||
"test/**/**.js" | ||
gulp.task("mocha", function () { | ||
return gulp.src([ | ||
"test/**/**.js" | ||
]) | ||
.pipe(mocha({ui: "bdd"})) | ||
.pipe(istanbul.writeReports()); | ||
.pipe(mocha({ ui: "bdd" })) | ||
.pipe(istanbul.writeReports()); | ||
}); | ||
|
||
gulp.task("istanbul:hook", function() { | ||
return gulp.src(["src/**/**.js"]) | ||
// Covering files | ||
.pipe(istanbul()) | ||
// Force `require` to return covered files | ||
.pipe(istanbul.hookRequire()); | ||
gulp.task("istanbul:hook", function () { | ||
return gulp.src(["src/**/**.js"]) | ||
// Covering files | ||
.pipe(istanbul()) | ||
// Force `require` to return covered files | ||
.pipe(istanbul.hookRequire()); | ||
}); | ||
|
||
gulp.task("test", function(cb) { | ||
runSequence("istanbul:hook", "mocha", cb); | ||
gulp.task("test", function (cb) { | ||
runSequence("istanbul:hook", "mocha", cb); | ||
}); | ||
|
||
//******** DISTRIBUTION ************* | ||
gulp.task("dist", function() { | ||
return gulp.src(["src/**/*.js", "src/**/*.d.ts"]) | ||
.pipe(gulp.dest("lib/")); | ||
gulp.task("build-lib", function () { | ||
return gulp.src(["src/**/*.js", "src/**/*.d.ts"]) | ||
.pipe(gulp.dest("lib/src/")); | ||
}); | ||
|
||
var tsDtsProject = tsc.createProject("tsconfig.json", { | ||
declaration: true, | ||
noResolve: false, | ||
typescript: require("typescript") | ||
}); | ||
|
||
gulp.task("build-dts", function() { | ||
return gulp.src([ | ||
"src/**/*.ts" | ||
]) | ||
.pipe(tsDtsProject()) | ||
.on("error", function (err) { | ||
process.exit(1); | ||
}) | ||
.dts.pipe(gulp.dest("lib/dts")); | ||
}); | ||
|
||
gulp.task("dist", function (cb) { | ||
runSequence("build-lib", "build-dts", cb); | ||
}); | ||
|
||
//******** DEFAULT ************* | ||
/** DEFAULT */ | ||
gulp.task("default", function (cb) { | ||
runSequence( | ||
"build", | ||
"test", | ||
"dist", | ||
cb); | ||
runSequence( | ||
"clean", | ||
"build", | ||
"test", | ||
"dist", | ||
cb); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.