Skip to content

Commit

Permalink
fix(bundle): remove bundling.
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Jun 7, 2016
1 parent b92b236 commit 065e98f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions addon/ng2/blueprints/ng2/files/__path__/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"mapRoot": "/",
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
Expand Down
10 changes: 2 additions & 8 deletions lib/broccoli/angular-broccoli-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,8 @@ class BundlePlugin extends Plugin {
build() {
var relativeRoot = path.relative(process.cwd(), this.inputPaths[0]);
var builder = new Builder(relativeRoot, `${relativeRoot}/system-config.js`);
return builder.bundle('main - [app/**/*]',
`${this.outputPath}/main.js`, {
minify: true
})
.then(() => builder.bundle('app - (app/**/*.js - [app/**/*.js])',
`${this.outputPath}/app/index.js`, {
minify: true
}))

return builder.bundle('main', `${this.outputPath}/main.js`, { minify: true })
.then(() => fse.copySync(`${this.inputPaths[0]}/system-config.js`,
`${this.outputPath}/system-config.js`));
}
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/e2e_workflow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ describe('Basic end-to-end Workflow', function () {
// stuck to the first build done
sh.exec(`${ngBin} build -prod`);
expect(existsSync(path.join(process.cwd(), 'dist'))).to.be.equal(true);
var appBundlePath = path.join(process.cwd(), 'dist', 'app', 'index.js');
var appBundleContent = fs.readFileSync(appBundlePath, { encoding: 'utf8' });
var mainBundlePath = path.join(process.cwd(), 'dist', 'main.js');
var mainBundleContent = fs.readFileSync(mainBundlePath, { encoding: 'utf8' });
// production: true minimized turns into production:!0
expect(appBundleContent).to.include('production:!0');
expect(mainBundleContent).to.include('production:!0');
// Also does not create new things in GIT.
expect(sh.exec('git status --porcelain').output).to.be.equal(undefined);
});
Expand Down Expand Up @@ -415,7 +415,7 @@ describe('Basic end-to-end Workflow', function () {
expect('build failed where it should have succeeded').to.equal('');
});
});

it('Serve and run e2e tests after all other commands', function () {
this.timeout(240000);

Expand Down

0 comments on commit 065e98f

Please sign in to comment.