Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #151 from inversify/dc/dependencies
Browse files Browse the repository at this point in the history
update dependencies
  • Loading branch information
dcavanagh authored Aug 24, 2019
2 parents f332baf + 528a3ca commit c59533f
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 95 deletions.
167 changes: 86 additions & 81 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,86 +3,86 @@
//******************************************************************************
//* DEPENDENCIES
//******************************************************************************
var gulp = require("gulp"),
tslint = require("gulp-tslint"),
tsc = require("gulp-typescript"),
var gulp = require("gulp"),
tslint = require("gulp-tslint"),
tsc = require("gulp-typescript"),
runSequence = require("run-sequence"),
mocha = require("gulp-mocha"),
istanbul = require("gulp-istanbul");
mocha = require("gulp-mocha"),
istanbul = require("gulp-istanbul");

//******************************************************************************
//* LINT
//******************************************************************************
gulp.task("lint", function() {
var config = { formatter: "verbose", emitError: (process.env.CI) ? true : false };
gulp.task("lint", function () {

var config = { formatter: "verbose", emitError: (process.env.CI) ? true : false };

return gulp.src([
"src/**/**.ts",
"test/**/**.test.ts"
])
.pipe(tslint(config))
.pipe(tslint.report());
.pipe(tslint(config))
.pipe(tslint.report());

});

//******************************************************************************
//* SOURCE
//******************************************************************************
var tsLibProject = tsc.createProject("tsconfig.json", { module : "commonjs", typescript: require("typescript") });
var tsLibProject = tsc.createProject("tsconfig.json", { module: "commonjs", typescript: require("typescript") });

gulp.task("build-lib", function() {
gulp.task("build-lib", function () {
return gulp.src([
"src/**/*.ts"
])
.pipe(tsLibProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("lib/"));
.pipe(tsLibProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("lib/"));
});

var tsEsProject = tsc.createProject("tsconfig.json", { module : "es2015", typescript: require("typescript") });
var tsEsProject = tsc.createProject("tsconfig.json", { module: "es2015", typescript: require("typescript") });

gulp.task("build-es", function() {
gulp.task("build-es", function () {
return gulp.src([
"src/**/*.ts"
])
.pipe(tsEsProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("es/"));
.pipe(tsEsProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("es/"));
});

var tsAmdProject = tsc.createProject("tsconfig.json", { module : "amd", typescript: require("typescript") });
var tsAmdProject = tsc.createProject("tsconfig.json", { module: "amd", typescript: require("typescript") });

gulp.task("build-amd", function() {
gulp.task("build-amd", function () {
return gulp.src([
"src/**/*.ts"
])
.pipe(tsAmdProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("amd/"));
.pipe(tsAmdProject())
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("amd/"));
});

var tsDtsProject = tsc.createProject("tsconfig.json", {
declaration: true,
noResolve: false,
typescript: require("typescript")
typescript: require("typescript")
});

gulp.task("build-dts", function() {
gulp.task("build-dts", function () {
return gulp.src([
"src/**/*.ts"
])
.pipe(tsDtsProject())
.on("error", function (err) {
process.exit(1);
})
.dts.pipe(gulp.dest("dts"));
.pipe(tsDtsProject())
.on("error", function (err) {
process.exit(1);
})
.dts.pipe(gulp.dest("dts"));

});

Expand All @@ -91,68 +91,73 @@ gulp.task("build-dts", function() {
//******************************************************************************
var tstProject = tsc.createProject("tsconfig.json", { typescript: require("typescript") });

gulp.task("build-src", function() {
gulp.task("build-src", function () {
return gulp.src([
"src/**/*.ts"
])
.pipe(tstProject())
.on("error", function (err) {
process.exit(1);
})
.pipe(gulp.dest("src/"));
.pipe(tstProject())
.on("error", function (err) {
process.exit(1);
})
.pipe(gulp.dest("src/"));
});

var tsTestProject = tsc.createProject("tsconfig.json", { 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("mocha", function() {
return gulp.src([
"node_modules/reflect-metadata/Reflect.js",
"test/**/*.test.js"
gulp.task("mocha", function () {
return gulp.src([
"node_modules/reflect-metadata/Reflect.js",
"test/**/*.test.js"
])
.pipe(mocha({ui: "bdd"}))
.on("error", function (err) {
process.exit(1);
})
.pipe(istanbul.writeReports());
.pipe(mocha({ ui: "bdd" }))
.on("error", function (err) {
process.exit(1);
})
.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("build", function(cb) {
runSequence(
"lint",
["build-src", "build-es", "build-lib", "build-amd", "build-dts"],
"build-test",
cb);
});
gulp.task("test", gulp.series(
"istanbul:hook",
"mocha",
));

gulp.task("build",
gulp.series(
"lint",
gulp.parallel(
"build-src"
, "build-test"
, "build-es"
, "build-lib"
, "build-dts"
),

)
);

//******************************************************************************
//* DEFAULT
//******************************************************************************
gulp.task("default", function (cb) {
runSequence(
gulp.task("default", gulp.series(
"build",
"test",
cb);
});
));
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"scripts": {
"test": "gulp",
"publish-please": "publish-please",
"prepublish": "publish-please guard"
"prepublish": "publish-please guard",
"update": "updates --update --minor && npm install",
"postupdate": "git diff-files --quiet package-lock.json || npm test"
},
"repository": {
"type": "git",
Expand All @@ -33,22 +35,23 @@
},
"homepage": "https://github.com/inversify/inversify-inject-decorators#readme",
"devDependencies": {
"@types/chai": "4.1.4",
"@types/mocha": "5.2.6",
"@types/sinon": "7.0.5",
"chai": "4.1.2",
"gulp": "3.9.1",
"@types/chai": "4.2.0",
"@types/mocha": "5.2.7",
"@types/sinon": "7.0.13",
"chai": "4.2.0",
"gulp": "4.0.2",
"gulp-istanbul": "1.1.3",
"gulp-mocha": "6.0.0",
"gulp-tslint": "8.1.2",
"gulp-mocha": "7.0.1",
"gulp-tslint": "8.1.4",
"gulp-typescript": "5.0.1",
"inversify": "5.0.1",
"mocha": "5.2.0",
"publish-please": "5.4.3",
"mocha": "6.2.0",
"publish-please": "5.5.1",
"reflect-metadata": "0.1.13",
"run-sequence": "2.2.1",
"tslint": "5.9.1",
"typescript": "2.6.2",
"ts-node": "8.0.2"
"ts-node": "8.3.0",
"tslint": "5.19.0",
"typescript": "3.5.3",
"updates": "^8.5.3"
}
}
}

0 comments on commit c59533f

Please sign in to comment.