Skip to content

Commit

Permalink
resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Dec 23, 2020
2 parents 62525e9 + 7d8eb80 commit f11974b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.ts
!*.d.ts
!*.d.ts
2 changes: 1 addition & 1 deletion lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ng update ngx-build-plus --force

- ``ng build --single-bundle``: Puts everything reachable from the main entry point into one bundle. Polyfills, scripts, and styles stay in their own bundles as the consuming application might have its own versions of these.

### Schamtics
### Schematics

- ``ng add ngx-build-plus``
- ``ng g ngx-build-plus:wc-polyfill``: Adds webcomponent polyfills to your app
Expand Down
5 changes: 2 additions & 3 deletions lib/schematics/add-ngx-build-plus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ export function addNgxBuildPlus(_options: any): Rule {
serve.builder = <any>'ngx-build-plus:dev-server';

const test = architect.test;
if (!test) throw new Error(`expected node projects/${project}/architect/test in angular.json`);
test.builder = <any>'ngx-build-plus:karma';
if (test) test.builder = <any>'ngx-build-plus:karma';

return updateWorkspace(workspace);
};
}



6 changes: 3 additions & 3 deletions lib/schematics/externals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ function updateScripts(path: string, config: any, tree: Tree, _options: any, _co

// Heuristic for default project
if (!project.root) {
config.scripts['build:externals'] = `ng build --extra-webpack-config ${path}webpack.externals.js --prod ${additionalFlags}`;
config.scripts['build:externals'] = `ng build --extra-webpack-config ${path}/webpack.externals.js --prod ${additionalFlags}`;
}

if (_options.project) {
config.scripts[`build:${_options.project}:externals`] = `ng build --extra-webpack-config ${path}webpack.externals.js --prod --project ${_options.project} ${additionalFlags}`;
config.scripts[`build:${_options.project}:externals`] = `ng build --extra-webpack-config ${path}/webpack.externals.js --prod --project ${_options.project} ${additionalFlags}`;
}
}
}
1 change: 1 addition & 0 deletions lib/src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export function buildWebpackBrowserPlus(
return runBuilderHandler(options, transforms, context, executeBrowserBuilder);
}

export { buildWebpackBrowserPlus as executeBrowserBuilderPlus };
//export default createBuilder<JsonObject & BrowserBuilderSchemaPlus>(buildWebpackBrowserPlus);
export default createBuilder<any>(buildWebpackBrowserPlus);
15 changes: 8 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Big thanks to [Rob Wormald](https://twitter.com/robwormald) and [David Herges](h

- Angular 6-7/ CLI 6-7: ngx-build-plus@^7
- Angular 8/ CLI 8: ngx-build-plus^8.0.0
- Angular 9/ CLI 9: ngx-build-plus^9.0.0

## Updating to Version 8

Expand All @@ -41,7 +42,7 @@ ng update ngx-build-plus --force

- ``ng build --single-bundle``: Puts everything reachable from the main entry point into one bundle. Polyfills, scripts, and styles stay in their own bundles as the consuming application might have its own versions of these.

### Schamtics
### Schematics

- ``ng add ngx-build-plus``
- ``ng g ngx-build-plus:wc-polyfill``: Adds webcomponent polyfills to your app
Expand Down Expand Up @@ -81,12 +82,12 @@ Please find the example shown here in the sample application in the folder ``pro
declare const VERSION: string;

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Version: ' + VERSION;
title = 'Version: ' + VERSION;
}
```

Expand Down Expand Up @@ -239,7 +240,7 @@ The result of this description can be found in the [repository's](https://github
ng g ngx-build-plus:wc-polyfill --project myProject
```

5. Execute the externals schematc:
5. Execute the externals schematic:

```
ng g ngx-build-plus:externals --project myProject
Expand All @@ -262,7 +263,7 @@ The result of this description can be found in the [repository's](https://github
7. Build your application. You can use the npm script created by the above mentioned schematic:

```
npm run build:externals:myProject
npm run build:myProject:externals
```

8. Angular will now be compiled into a ``scripts.js`` and can be reused amongs several seperately compiled bundles. Your code is in the main bundle which is quite tiny b/c it does not contain Angular.
Expand Down

0 comments on commit f11974b

Please sign in to comment.