Commit Graph

104 Commits

Author SHA1 Message Date
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
Evert Timberg
d4dc505966
Bump version number to v2.9.1 (#6612) 2019-10-27 14:51:07 -04:00
Ben McCann
ea100d400e Bump version number to 2.9.0 (#6600) 2019-10-25 14:57:21 -04:00
Ben McCann
f68b8adaac Upgrade rollup and plugins to fix build (#6493) 2019-09-04 07:44:01 -04:00
Simon Brunel
152f1d9725 Bump version to 2.8.0 2019-03-12 11:29:11 +01:00
Simon Brunel
f9f048a5c5 Bump version to 2.8.0-rc.1 2019-03-04 09:58:08 +01: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
Ben McCann
a2521e54ee Replace deprecated gulp-util and remove unused watchify (#6032)
* Replace deprecated gulp-util and remove unused watchify

* Remove logging
2019-02-01 20:03:31 -05: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
Simon Brunel
3cb2d7050e
Remove gulp-connect and add jsdelivr/unpkg paths (#5875) 2018-12-01 08:35:43 +01:00
Simon Brunel
75aa44eef6
Upgrade dev dependencies to reduce vulnerabilities (#5840) 2018-11-18 09:33:34 +01:00
Simon Brunel
d7eab1b994 Bump version to 2.7.3 2018-10-15 18:48:00 +02:00
Simon Brunel
ac088a04ab Bump version to 2.7.2 (#5307) 2018-03-01 16:20:53 -05:00
Loïc Bourgois
182270ef9b Setup HTML and JS linters for samples (#5195) 2018-02-03 13:28:54 +01:00
Simon Brunel
1d5619d6d4
Fix GitBook error with the shared ESLint config (#5133)
`gitbook-cli install` failed when trying to fetch eslint-config-chartjs because of the way it was installed (ie. using the GitHub repository URL). The shared config is now published on npmjs: https://www.npmjs.com/package/eslint-config-chartjs
2018-01-11 09:03:16 +01:00
Simon Brunel
9ddb449ad1 Use the Chart.js shared ESLint config (#5112)
An ESLint shareable config has been created (from this repository) in the attempt to homogenize Chart.js hosted projects and plugins style. Rename `.eslintrc` files to `.eslintrc.yml` since the name has been deprecated.

Fix the CC badge (maintainability) and disable CodeClimate ESLint plugin because it doesn't support custom shareable config but also because it already executes relevant checks as part of the regular process.
2018-01-06 17:59:13 -05:00
Jonathan Grimes
67479c22f9 Relax dependencies semver range (#4891)
Prevent duplicate version of moment.js (which is pretty large) when an app also depends on moment (with less strict semver range)
2017-11-07 19:12:33 +01:00
Ben McCann
ffbdb48310 Upgrade dependencies (incl. ESLint 4) (#4738) 2017-11-01 16:00:10 +01:00
Ben McCann
8a6d58d2d9 Bump version to 2.7.1 (#4877) 2017-10-28 10:22:20 +02:00
Simon Brunel
b2beb6f451 Update chartjs-color dependency (#4733)
Enforce dependencies minor versions (tilde symbol: include everything greater than a particular version in the same minor range).
2017-09-09 18:27:39 -04:00
Simon Brunel
e3b70e0420 Bump version to 2.7.0 2017-08-28 10:34:06 +02:00
Ben McCann
75791988d3 Upgrade dependencies 2017-05-27 10:54:08 -04:00
Ben McCann
04ab523dd4 Upgrade dependencies (#4272) 2017-05-25 17:53:37 +02:00
Evert Timberg
4dda5529b9 Bump version to v2.6.0 (#4237) 2017-05-19 22:08:33 +02:00
Evert Timberg
3e94b9431a Update the docs structure/content to use GitBook (#3751)
Update the docs structure/content to use GitBook
2017-03-20 20:36:54 -04:00
Simon Brunel
1ca0ffb5d5 Introduce unit test based on image comparison (#3988)
Attempt to make easier the creation of unit tests that check the drawing output. Until now, this was done by checking calls on a 'fake' context, which is hard to maintain (need to update pixel values by hands) and also not reliable when optimizing code (i.e. different calls sequence but same result).

As of now, it's possible to define 'auto' tests based on JSON/PNG fixtures: chart is generated from the JSON file and compared to the associated PNG image. The image diff is done using `pixelmatch`. As an example (and in preparation of the `filler` plugin), add auto tests for the line element `fill` options.
2017-03-05 09:49:12 -07:00
Simon Brunel
c216c0af76 Cleanup and upgrade unit tests environment
`karma.conf.ci.js` has been merged into `karma.conf.js` for local testing consistency: `gulp unittestWatch` has been replaced by `gulp unittest --watch` and thus use exactly the same config file. Upgrade to latest jasmine and karma packages and remove deprecated `gulp-karma` dependency (directly use `karma.Server` in gulp).

Split `test/mockContext.js` into smaller `test/jasmine.*` modules to make easier unit tests maintenance and finally, move all `*.test.js` files under the `test/specs` folder.
2017-03-04 11:39:48 -05:00
Simon Brunel
d25e7b1e1a Handle incoming model values on element transition
If a value is set on the model after `pivot()` has been called, the view wasn't initialized and the animation started from 0. Now, `_start` and incomplete `_view` are initialized to the model value during the transition (no initial implicit transition).

Also remove exception handling when animating a string (color), which is faster when string are not valid colors (e.g. tooltip position). It requires to update `chartjs-color` to version 2.1.0.
2017-03-03 06:49:32 -05:00
Evert Timberg
e519ea399d Fix color dependency for builds 2017-02-21 20:45:56 -05:00
etimberg
9a3af51618 bump version number 2017-01-28 11:33:14 -05:00
Jeff Carey
fe68b77606 Upgraded dependency gulp-uglify to 2.0.0 (#3635) 2016-11-22 23:51:22 +01:00
Simon Brunel
040b0e160d Bump version to 2.4.0 2016-11-06 18:31:30 +01:00
Simon Brunel
e90edd8c9a Bump ESLint to v3.x (gulp and Code Climate) (#3526) 2016-10-29 18:40:27 +02:00
Aidan Fewster
99b8d6740a Added the watchify NPM dependency to satisfy karma-browserify's peerDependency 2016-10-04 09:27:43 -04:00
Simon Brunel
8ec7ce2f93 Gulp command switch to run specific test files
Add the --inputs command switch to the unittest and unittestWatch tasks, to be able to run unit tests from the specified files only (e.g. gulp unittest --inputs=test/core.element.tests.js;test/core.helpers.tests.js).
2016-09-23 17:47:33 +02:00
Simon Brunel
eea51e8678 Bump version to 2.3.0 2016-09-22 20:53:26 +02:00
Simon Brunel
4da47a8430 Bump version to 2.3.0-rc.1 2016-09-17 11:42:28 +02:00
Simon Brunel
69ab0d3e23 Use gulp-eslint instead of gulp-jshint
Change the linter in gulp tasks to be consistent with Code Climate results which are based on ESLint using .eslintrc options. However, defaults Code Climate rules are too strict, so turn as warnings the 'complexity' and 'max-statements' rules (other errors has been fixed). Note that the Gulp task name has been changed for `gulp lint`.
2016-09-03 18:42:22 +02:00
Simon Brunel
1f67e54d79 Remove unused npm packages 2016-09-03 18:09:57 +02:00
Simon Brunel
594605c5c4 Remove deprecated gulp tasks and dependencies 2016-08-30 00:04:40 +02:00
Simon Brunel
cd50edbc84 #3182 Gulp task to generate bower.json file 2016-08-28 18:21:10 +02:00
etimberg
0ebe388611 Update version for v2.2.2 release 2016-08-27 08:29:09 -04:00
Evert Timberg
ab66146013 Prep for a v2.2.1 release 2016-07-30 13:01:31 -04:00
Evert Timberg
b92387c845 Version bump for v2.2.0 2016-07-28 18:23:32 -04:00
Evert Timberg
4334ab8611 Bump version to v2.2.0-rc.2 2016-07-19 18:47:08 -04:00
Evert Timberg
5804f1e3c9 Package.json for v.2.2.0-rc.1 and fixed travis deploy 2016-07-13 20:00:12 -04:00
Simon Brunel
53a0c5442e New Chart.js.zip package
Samples need to be packaged with built libraries (which one have been removed from the repository), so create a new `gulp package` task to generate a ZIP archive with dist files, samples and the license file. This archive is generated in the ./dist/ folder and will be deployed by Travis along the GH release. Note that the ./dist/ folder is not preserved but merged in the archive root. Also change samples requiring moment.js to load this lib from the CDN instead of the ./node_module folder.
2016-06-18 12:14:31 +02:00