Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 60b4287

Browse files
committed
chore(aot-cookbook): gitignore gen'd css and skip rollup warn on 'this'
1 parent 9d965a7 commit 60b4287

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

public/docs/_examples/cb-aot-compiler/ts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
**/*.ngfactory.ts
22
**/*.ngsummary.json
3+
**/*.shim.ngstyle.ts
34
**/*.metadata.json
45
dist
56
!app/tsconfig.json

public/docs/_examples/cb-aot-compiler/ts/rollup-config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ export default {
1010
dest: 'dist/build.js', // output a single application bundle
1111
sourceMap: false,
1212
format: 'iife',
13+
onwarn: function(warning) {
14+
// skip certain warnings
15+
16+
// Should intercept ... but doesn't in some rollup versions
17+
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
18+
// Intercepts in some rollup versions
19+
if ( warning.indexOf("The 'this' keyword is equivalent to 'undefined'") > -1 ) { return; }
20+
21+
// console.warn everything else
22+
console.warn ? console.warn( warning.message ) : console.log( warning.message ) ;
23+
},
1324
plugins: [
1425
nodeResolve({jsnext: true, module: true}),
1526
// #docregion commonjs
@@ -22,4 +33,4 @@ export default {
2233
// #enddocregion uglify
2334
]
2435
}
25-
// #enddocregion config
36+
// #enddocregion config

0 commit comments

Comments
 (0)