Skip to content

Commit

Permalink
fix(patch): update patch-cli for Angular CLI 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hotforfeature committed Nov 3, 2017
1 parent 4de9538 commit 34d370b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 0 additions & 5 deletions patch-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34d370b

Please sign in to comment.