Skip to content

Commit

Permalink
Drop official support for Bower
Browse files Browse the repository at this point in the history
Remove the bower.json file and update the documentation with the alternative bower-npm-resolver solution.
  • Loading branch information
simonbrunel authored and Simon Brunel committed Jun 5, 2016
1 parent 1946d36 commit 61747c9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

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
```
CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js

To Install via bower, please follow [these instructions](http://www.chartjs.org/docs/#getting-started-installation).

## Documentation

Expand Down
14 changes: 0 additions & 14 deletions bower.json

This file was deleted.

23 changes: 20 additions & 3 deletions docs/00-Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.4 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
Expand All @@ -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:

Expand Down
7 changes: 2 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -118,7 +117,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));
Expand All @@ -135,13 +134,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';
Expand Down

0 comments on commit 61747c9

Please sign in to comment.