Commit Graph

23 Commits

Author SHA1 Message Date
Jukka Kurkela
40e9029a59
ESM build, with helpers separated (#7400)
* ESM build, with helpers separated
* Remove umd environment
* Include the chunks in package
2020-06-23 19:02:51 -04:00
Jukka Kurkela
690d07ba9b
Update packages (#7463) 2020-06-04 19:51:34 -04:00
Jukka Kurkela
f472a3f9a7
Remove proposal and obsolete features (#7425) 2020-05-26 19:16:23 -04:00
Jukka Kurkela
986f72f933
Rename dist/Chart* to dist/chart* (#7416)
* Rename dist/Chart* to dist/chart*
* Add a note to migration docs
* Review update
2020-05-25 16:54:22 -04:00
Jukka Kurkela
319a6a40b9
Use @rollup/plugin-inject for ResizeObserver poly (#7360) 2020-05-15 17:17:59 -04:00
Jukka Kurkela
1228981e4f
Fix couple of small issues (#7268) 2020-04-13 19:33:15 -04:00
Ben McCann
7051410d4e
Only polyfill ResizeObserver for UMD builds (#7208) 2020-03-22 13:40:26 -04:00
Jukka Kurkela
df3c73cc5e
Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment
2020-02-27 19:40:31 -05:00
Jukka Kurkela
564c027a1e
Output ES6 from babel (#7136) 2020-02-21 18:55:53 -05:00
Ben McCann
7b9a0a775c
Rollup plugins live in new location (#7134) 2020-02-20 18:19:59 -05:00
Jukka Kurkela
65425a5cb6
Include version in Chart (#7129)
* Include version in Chart
* Remove commonjs
2020-02-20 09:41:47 -05:00
Ben McCann
28e03946a1
No need to use rollup commonjs plugin (#7122) 2020-02-19 20:51:01 -05:00
Jukka Kurkela
bfe34214ac
Use ResizeObserver and MutationObserver to detect detach/attach/resize (#7104)
* Use Resize/MutationObserver to detect detach/attach/resize
* Cleanup
* Review update
* Restore infinite resize detection (#6011)
2020-02-17 11:00:03 -05:00
Evert Timberg
8245da44f5
Strip comments from ESM build otherwise the TS compiler breaks (#7102)
* Strip comments from ESM build otherwise the TS compiler breaks
* Cleanup no ESM build as well
2020-02-14 14:11:24 -05:00
Jukka Kurkela
7c1fb37c61
Babel @kurkle/color for IE support (#7099)
Babel @kurkle/color for IE support
2020-02-14 12:29:33 -05:00
Chris Lamb
c4483d1864 Make the build reproducible (#6817)
Whilst working on the Reproducible Builds effort [0] we noticed that
Chart.js could not be built reproducibly.

This is because it was embedding another build date in a "banner"
comment. This patch uses the value from SOURCE_DATE_EPOCH [1] if
present.

This was originally filed in Debian as #946333 [2].

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/
 [2] https://bugs.debian.org/946333

Signed-off-by: Chris Lamb <lamby@debian.org>
2019-12-07 10:41:56 -05:00
Ben McCann
dd8d267956 Remove bundled builds (#6680) 2019-11-02 15:48:49 -04:00
Sebastian Niemann
9537548321 Adds support for ES6 modules (#6619) 2019-10-27 18:28:25 -04:00
Evert Timberg
1ac3a697f7
Add babel plugin for rollup & transform code (#6555)
* Add babel plugin for rollup & transform code
* Add .browserlistrc file & copy defaults
2019-10-27 16:28:30 -04:00
Simon Brunel
35273ee948
Optimize the npm package by removing useless files (#6105)
Explicitly target files that should be included in the npm package, making it 10x smaller by removing the docs, samples, scripts, sources, tests and other useless files.
2019-03-03 15:19:11 +01:00
Simon Brunel
55128f74c1 Move CSS in a separate file to be CSP-compliant (#6048)
In order to be compatible with any CSP, we need to prevent the automatic creation of the DOM 'style' element and offer our CSS as a separate file that can be manually loaded (`Chart.js` or `Chart.min.js`). Users can now opt-out the style injection using `Chart.platform.disableCSSInjection = true` (note that the style sheet is now injected on the first chart creation).

To prevent duplicating and maintaining the same CSS code at different places, move all these rules in `platform.dom.css` and write a minimal rollup plugin to inject that style as string in `platform.dom.js`. Additionally, this plugin extract the imported style in `./dist/Chart.js` and `./dist/Chart.min.js`.
2019-02-08 19:06:04 +01:00
Simon Brunel
e07c5d0c6c
Make moment optional from our UMD builds (#5978) 2019-01-29 17:54:22 +01:00
Simon Brunel
2a97ec21c5
Migrate from Browserify to rollup (#5904)
Browserify isn't optimal bundling Chart.js because it adds too many internal wrappers, doesn't handle external/global dependencies and doesn't provide a way to generate ESM builds. Therefore, it seems the right choice to switch to rollup, so move all the build process in `rollup.config.js` and make Gulp to execute `rollup -c`.

We also had to switch to Terser instead of UglifyJS because this last one contains a breaking bug. Note that tests now use the exact same rollup config as our builds (the minified one) to ensure that the bundling and minification steps don't break anything. Finally, replace the `gulp watch` task by `gulp build --watch` to be consistent with the other `unittest` and `docs` watching syntax.
2018-12-14 20:20:43 +01:00