]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Drop official support for Bower 2555/head
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Wed, 25 May 2016 18:53:02 +0000 (20:53 +0200)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Sat, 18 Jun 2016 10:18:30 +0000 (12:18 +0200)
Remove the bower.json file and update the documentation with the alternative bower-npm-resolver solution.

README.md
bower.json [deleted file]
docs/00-Getting-Started.md
gulpfile.js

index aaf9441d21f8fc75d83d81e204bab5fbd73fe387..43dced4fb3d1fa2af4f81218f1b59507b63a7cd0 100644 (file)
--- a/README.md
+++ b/README.md
 
 You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest) or just use these [Chart.js CDN](https://cdnjs.com/libraries/Chart.js) links.
 
-To install via npm / bower:
+To install via npm:
 
 ```bash
 npm install chart.js --save
-bower install Chart.js --save
 ```
 
+To Install via bower, please follow [these instructions](http://www.chartjs.org/docs/#getting-started-installation).
+
 ## Documentation
 
 You can find documentation at [www.chartjs.org/docs](http://www.chartjs.org/docs). The markdown files that build the site are available under `/docs`. Previous version documentation is available at [www.chartjs.org/docs/#notes-previous-versions](http://www.chartjs.org/docs/#notes-previous-versions).
diff --git a/bower.json b/bower.json
deleted file mode 100644 (file)
index 379fbb6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-  "name": "Chart.js",
-  "version": "2.1.6",
-  "description": "Simple HTML5 Charts using the canvas element",
-  "homepage": "https://github.com/chartjs/Chart.js",
-  "author": "nnnick",
-  "license": "MIT",
-  "main": [
-    "dist/Chart.js"
-  ],
-  "devDependencies": {
-    "jquery": "~2.1.4"
-  }
-}
\ No newline at end of file
index 7810bb4265c8bb0e785aac30c770e373bf5a6dac..a362296523c52b080709fcf51837b74964eed7af 100644 (file)
@@ -9,13 +9,30 @@ You can download the latest version of [Chart.js on GitHub](https://github.com/c
 
 ### Installation
 
-To install via npm / bower:
+#### npm
 
 ```bash
 npm install chart.js --save
 ```
+
+#### bower
+
+Bower support has been dropped since version 2.2.0 but you can still use Chart.js with Bower thanks to [bower-npm-resolver](https://www.npmjs.com/package/bower-npm-resolver).
+
+First, add the resolver in your .bowerrc file:
+```json
+{
+  "resolvers": [
+    "bower-npm-resolver"
+  ]
+}
+```
+
+Then:
+
 ```bash
-bower install Chart.js --save
+npm install -g bower-npm-resolver
+bower install npm:chart.js --save
 ```
 
 ### Selecting the Correct Build
@@ -24,7 +41,7 @@ Chart.js provides two different builds that are available for your use. The `Cha
 
 The `Chart.bundle.js` and `Chart.bundle.min.js` builds include Moment.js in a single file. This version should be used if you require time axes and want a single file to include, select this version. Do not use this build if your application already includes Moment.js. If you do, Moment.js will be included twice, increasing the page load time and potentially introducing version issues.
 
-### Installation
+### Usage
 
 To import Chart.js using an old-school script tag:
 
index 991b93f860ff4a55f3df014931cc9f6fcea9dd13..b0b13c1d6a855ba279f0e6de0d2f507a79d21ddf 100644 (file)
@@ -14,7 +14,6 @@ var gulp = require('gulp'),
   exec = require('child_process').exec,
   fs = require('fs'),
   package = require('./package.json'),
-  bower = require('./bower.json'),
   karma = require('gulp-karma'),
   browserify = require('browserify'),
   streamify = require('gulp-streamify'),
@@ -121,7 +120,7 @@ function packageTask() {
 /*
  *  Usage : gulp bump
  *  Prompts: Version increment to bump
- *  Output: - New version number written into package.json & bower.json
+ *  Output: - New version number written into package.json
  */
 function bumpTask(complete) {
   util.log('Current version:', util.colors.cyan(package.version));
@@ -138,13 +137,11 @@ function bumpTask(complete) {
       newVersion = semver.inc(package.version, increment),
       oldVersion = package.version;
 
-    // Set the new versions into the bower/package object
+    // Set the new versions into the package object
     package.version = newVersion;
-    bower.version = newVersion;
 
     // Write these to their own files, then build the output
     fs.writeFileSync('package.json', JSON.stringify(package, null, 2));
-    fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2));
 
     var oldCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+oldVersion+'/Chart.min.js',
       newCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+newVersion+'/Chart.min.js';