From 34d370b37efda927ecf5e0af1aeed0e3278e435d Mon Sep 17 00:00:00 2001 From: Andrew Mitchell Date: Fri, 3 Nov 2017 11:39:27 -0500 Subject: [PATCH] fix(patch): update patch-cli for Angular CLI 1.5.0 --- package.json | 1 + patch-cli.js | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/package.json b/package.json index 81523ca..0ecc8de 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "tslib": "^1.7.1" }, "peerDependencies": { + "@angular/cli": "1.5.0", "@angular/core": ">=4.0.0", "@angular/forms": ">=4.0.0", "@angular/platform-browser": ">=4.0.0", diff --git a/patch-cli.js b/patch-cli.js index bb0fa1b..e8f7881 100644 --- a/patch-cli.js +++ b/patch-cli.js @@ -7,11 +7,6 @@ const stylesPath = path.resolve(__dirname, '../../@angular/cli/models/webpack-co let data = fs.readFileSync(commonPath, 'utf8'); if (!data.includes('/* Origami Patched */')) { data = '/* Origami Patched */\n' + data; - data = data.replace(/(.*require\(.*\);)/, '$1\nconst ts = require(\'typescript\');'); - data = data.replace(/(return\s*{\s*resolve)/, - `const supportES2015 = wco.tsConfig.options.target !== ts.ScriptTarget.ES3 && - wco.tsConfig.options.target !== ts.ScriptTarget.ES5; - $1`); data = data.replace(/(modules:\s*\[)/g, '$1path.resolve(appRoot, \'bower_components\'), '); data = data.replace(/{.*html\$.*},/, ` // Use polymer-webpack-loader for element html files and raw-loader for all