Skip to content

Replace json assets by js files #183

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 10 commits into from
Jan 20, 2016
Merged

Replace json assets by js files #183

merged 10 commits into from
Jan 20, 2016

Conversation

etpinard
Copy link
Contributor

@mdtusz @bpostlethwaite

Webpack does not bundle up json files by default. It is possible using user-defined loaders e.g. this one for json files. But this is an extra hurdle for webpack users that we can fix on our end.

This PR takes one step towards supporting Webpack bundling without any special configs.

Note that I used this script to check for non-js files that are bundled into plotly.js.

- so that webpack won't have to worry about adding
  a json loader to use plotly.js
@etpinard etpinard added this to the Modular plotly.js milestone Jan 14, 2016
@etpinard
Copy link
Contributor Author

TODO:

  • merge PR Replace json asset by js module bpostlethwaite/colormap#4 and npm publish
  • find a way to inject the package version into the plotly.js index without requiring the package.json [done in https://github.com/plotly/plotly.js/commit/b944ec998ff68c3e1b5eacfc9514a9ce1a32e317]

@etpinard etpinard changed the title Replace json assets file by js files Replace json assets by js files Jan 14, 2016
'diamond-open': '◇',
cross: '+',
x: '❌'
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐄, but I guess it's unavoidable here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdtusz
Copy link
Contributor

mdtusz commented Jan 14, 2016

💃

- update src/index.js and src/assets/geo_assets.js 'version' export
  using a falafel update
- done replacement of require('../package.json') so that webpack
  is supported w/o a json loader
etpinard added a commit that referenced this pull request Jan 20, 2016
Replace json assets by js files
@etpinard etpinard merged commit 0a78842 into master Jan 20, 2016
@etpinard etpinard deleted the js-not-json branch January 20, 2016 16:10
@etpinard etpinard mentioned this pull request Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants