Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typescript version #67

Merged
merged 5 commits into from Feb 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions build.js
Expand Up @@ -410,6 +410,10 @@ module.exports = function (gulpWrapper, ctx) {
i18n.supportedCultures.forEach(function (language) {
language = setFinalLanguage(language);
tsProject = pluginTypescript.createProject(ctx.baseDir + 'tsconfig.json', {
// Remove explicitly declared typings.
// From TS version 3.2.0 onwards, the compiler complained about it
// For metadata and i18n
"types": undefined,
"typescript": require("typescript"),
"out": "main." + finalLanguage + ".bundle.js"
});
Expand All @@ -419,7 +423,7 @@ module.exports = function (gulpWrapper, ctx) {
promiseArray.push(new Promise(function (resolve, reject) {

gulp.src([ctx.baseDir + '../' + ctx.packageName + "-" + language + "-index.ts"], { cwd: ctx.baseDir })
.pipe(pluginTypescript(tsProject)).on('error', function (err) { cb(err); }).js
.pipe(tsProject()).on('error', function (err) { cb(err); }).js
.pipe(pluginReplace({
patterns: [
// We need to remove the index entry, which is the last one in the file
Expand Down Expand Up @@ -498,6 +502,10 @@ module.exports = function (gulpWrapper, ctx) {
return new Promise(function (resolve, reject) {
// We will keep the module anonymous as it is fetched by the app by the module loader and this way the file can be used for both DEV + PROD :-)
var tsProject = pluginTypescript.createProject(ctx.baseDir + 'tsconfig.json', {
// Remove explicitly declared typings.
// From TS version 3.2.0 onwards, the compiler complained about it
// For metadata and i18n
"types": undefined,
"typescript": require("typescript") ,
outFile: ctx.packageName + ".metadata.js"
});
Expand All @@ -514,7 +522,7 @@ module.exports = function (gulpWrapper, ctx) {
.pipe(replaceModuleMetadata(ctx, dataSourcePathRegExp, "dataSources", false))
.pipe(replaceModuleMetadata(ctx, converterPathRegExp, "converters", false))
.pipe(replaceModuleMetadata(ctx, pipePathRegExp, "pipes", false))
.pipe(pluginTypescript(tsProject)).on('error', function (err) { cb(err); }).js
.pipe(tsProject()).on('error', function (err) { cb(err); }).js
.pipe(pluginReplace({
// update path for i18n
patterns: [{ match: new RegExp("\"\\.\/i18n\/", "g"), replacement: "\"" + ctx.packageName + "/src/i18n/" }]
Expand Down
12 changes: 6 additions & 6 deletions package.json
@@ -1,11 +1,11 @@
{
"name": "@criticalmanufacturing/dev-tasks",
"version": "6.3.0",
"version": "7.0.0-0",
"description": "Gulp tasks and helpers for development",
"main": "main.js",
"dependencies": {
"@angular/compiler": "4.3.1",
"@angular/core": "4.3.1",
"@angular/compiler": "7.2.3",
"@angular/core": "7.2.3",
"@criticalmanufacturing/dev-i18n-transform": "^1.0.0",
"async-walker": "~0.0.4",
"clean-css": "~4.1.9",
Expand All @@ -27,18 +27,18 @@
"gulp-replace-task": "~0.2.1",
"gulp-shell": "~0.6.3",
"gulp-tslint": "^8.1.1",
"gulp-typescript": "~2.13.6",
"gulp-typescript": "~5.0.0",
"gulp-util": "^3.0.5",
"gulp-watch": "^4.2.4",
"gulp-webserver": "^0.9.1",
"html-minifier": "~3.5.8",
"ncp": "~2.0.0",
"run-sequence": "^1.2.2",
"rxjs": "5.4.2",
"rxjs": "^6.0.0",
"shelljs": "^0.7.7",
"through": "~2.3.8",
"tslint": "~5.8.0",
"typescript": "2.4.1",
"typescript": "3.2.4",
"uuid": "^2.0.2",
"yargs": "~3.10.0"
},
Expand Down