Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"gulp": "gulp",
"karma": "karma",
"karma.start": "karma start",
"postinstall": "gulp check.versions && npm prune && gulp webdriver",
"postinstall": "gulp check.versions && gulp build.bundle.rxjs && npm prune && gulp webdriver",
"reinstall": "npm cache clean && npm install",
"serve.coverage": "remap-istanbul -b src/ -i coverage/coverage-final.json -o coverage -t html && npm run gulp -- serve.coverage --color",
"serve.dev": "gulp serve.dev --color --config-env dev",
Expand Down
5 changes: 2 additions & 3 deletions tools/config/seed.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ export class SeedConfig {
{ src: 'zone.js/dist/zone.js', inject: 'libs' },
{ src: 'core-js/client/shim.min.js', inject: 'shims' },
{ src: 'systemjs/dist/system.src.js', inject: 'shims', env: ENVIRONMENTS.DEVELOPMENT },
{ src: 'rxjs/bundles/Rx.min.js', inject: 'libs', env: ENVIRONMENTS.DEVELOPMENT },
// Temporary fix. See https://github.com/angular/angular/issues/9359
{ src: '.tmp/Rx.min.js', inject: 'libs', env: ENVIRONMENTS.DEVELOPMENT },
];

/**
Expand Down Expand Up @@ -339,14 +340,12 @@ export class SeedConfig {
'node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
'@angular/router/testing': 'node_modules/@angular/router/bundles/router-testing.umd.js',

'rxjs/*': 'node_modules/rxjs/*',
'app/*': '/app/*',
// For test config
'dist/dev/*': '/base/dist/dev/*',
'*': 'node_modules/*'
},
packages: {
rxjs: { defaultExtension: 'js' }
}
};

Expand Down
32 changes: 32 additions & 0 deletions tools/tasks/seed/build.bundle.rxjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Temporary fix. See https://github.com/angular/angular/issues/9359
*/

const Builder = require('systemjs-builder');

export = (done:any) => {
const options = {
normalize: true,
runtime: false,
sourceMaps: true,
sourceMapContents: true,
minify: true,
mangle: false
};
var builder = new Builder('./');
builder.config({
paths: {
'n:*': 'node_modules/*',
'rxjs/*': 'node_modules/rxjs/*.js',
},
map: {
'rxjs': 'n:rxjs',
},
packages: {
'rxjs': {main: 'Rx.js', defaultExtension: 'js'},
}
});
builder.bundle('rxjs', 'node_modules/.tmp/Rx.min.js', options)
.then(() => done())
.catch((error:any) => done(error));
};
4 changes: 2 additions & 2 deletions tools/tasks/seed/build.bundles.app.exp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export = (done: any) => {
let builder = new Builder(Config.SYSTEM_BUILDER_CONFIG);
builder
.buildStatic(join(Config.TMP_DIR, Config.BOOTSTRAP_FACTORY_PROD_MODULE),
join(Config.JS_DEST, Config.JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
join(Config.JS_DEST, Config.JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done())
.catch((err: any) => done(err));
};
4 changes: 2 additions & 2 deletions tools/tasks/seed/build.bundles.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export = (done: any) => {
let builder = new Builder(Config.SYSTEM_BUILDER_CONFIG);
builder
.buildStatic(join(Config.TMP_DIR, Config.BOOTSTRAP_PROD_MODULE),
join(Config.JS_DEST, Config.JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
join(Config.JS_DEST, Config.JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done())
.catch((err: any) => done(err));
};