8000 Add Building.md by etpinard · Pull Request #2654 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add Building.md #2654

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 23, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
clean up a few typos & style in BUILDING.md
  • Loading branch information
alexcjohnson authored May 23, 2018
commit 9199e8ea8191140ca660284d65cf3d29fb9e114e
12 changes: 6 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ browserify -t path/to/plotly.js/tasks/util/compress_attributes.js index.js > bun

## Angular CLI

Currently Angular CLI use Webpack under the hood to bundle and build your Angular application.
Sadly it doesn't allow to override its Webpack config, and therefore to use the plugin mentioned in the [Webpack](#webpack) section.
Currently Angular CLI uses Webpack under the hood to bundle and build your Angular application.
Sadly it doesn't allow you to override its Webpack config in order to add the plugin mentioned in the [Webpack](#webpack) section.
Without this plugin your build will fail when it tries to build glslify for WebGL plots.

Currently 2 solutions exists to circumvent this issue :
Currently 2 solutions exists to circumvent this issue:

1) If you need to use WebGL plots, you can create a Webpack config from your Angular CLI projet with [ng eject](https://github.com/angular/angular-cli/wiki/eject). This will allow you to follow the instructions regarding Webpack.
2) If you don't need to use WebGL plots, you can make a custom build containing only the required modules for your plots. The clean way to do it with Angular CLI is not the method described in the [Modules](https://github.com/plotly/plotly.js/blob/master/README.md#modules) section of the README but the following :
1) If you need to use WebGL plots, you can create a Webpack config from your Angular CLI project with [ng eject](https://github.com/angular/angular-cli/wiki/eject). This will allow you to follow the instructions regarding Webpack.
2) If you don't need to use WebGL plots, you can make a custom build containing only the required modules for your plots. The clean way to do it with Angular CLI is not the method described in the [Modules](https://github.com/plotly/plotly.js/blob/master/README.md#modules) section of the README but the following:

```typescript
// in the Component you want to create a graph
Expand All @@ -64,7 +64,7 @@ import * as Plotly from 'plotly.js';
```json
// in src/tsconfig.app.json
// List here the modules you want to import
// this exemple is for scatter plots
// this example is for scatter plots
{
"compilerOptions": {
"paths": {
Expand Down
0