Skip to content

Commit 6ef96ca

Browse files
committed
Use npm for dependencies instead of bower
1 parent c50a179 commit 6ef96ca

25 files changed

+70
-81
lines changed

.codeclimate.yml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ languages:
44
PHP: false
55
exclude_paths:
66
- "dist/*"
7-
- "bower_components/*"
87
- "node_modules/*"
98
- "gulpfile.js"
109
- "examples/*"

.dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
bower_components/
21
coverage/
32
node_modules/

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.idea/
22
node_modules/
33
test/fixtures/shots/
4-
bower_components/
54
coverage/
65
examples/bundle.js

.jscsrc

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"disallowKeywords": [ "with" ],
7272

7373
"excludeFiles": [
74-
"bower_components/**",
7574
"node_modules/**",
7675
"dist/**",
7776
"coverage/**",

.jshintignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
bower_components/
21
node_modules/
32
dist/
43
tmp/

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ WORKDIR /src
33
ADD . ./
44
RUN chown -R node:node /src
55
USER node
6-
RUN npm install && npm install bower && ./node_modules/bower/bin/bower install
6+
RUN npm install
77
CMD ["npm", "test"]

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ there are numerous breaking changes in this version notably:
2626
* `$scope.$apply` is not called anymore on mouse hover functions calls
2727
* obviously all Chart.js breaking changes as well in how options are set, etc.
2828

29-
### bower
30-
31-
bower install --save angular-chart.js
32-
3329
### npm
3430

3531
npm install --save angular-chart.js
@@ -53,7 +49,7 @@ adding the dependencies for Angular and Chart.js first:
5349
...
5450
</body>
5551
<script src="node_modules/angular/angular.min.js"></script>
56-
<script src="node_modules/Chart.js/Chart.min.js"></script>
52+
<script src="node_modules/chart.js/Chart.min.js"></script>
5753
<script src="node_modules/angular-chart.js/dist/angular-chart.min.js"></script>
5854
```
5955

bower.json

-7
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,5 @@
4040
"dependencies": {
4141
"angular": "1.x",
4242
"Chart.js": "2.x"
43-
},
44-
"devDependencies": {
45-
"angular-bootstrap": "~0.11.0",
46-
"angular-mocks": "~1.x",
47-
"font-awesome": "~4.1.0",
48-
"rainbow": "~1.1.9",
49-
"requirejs": "~2.1.20"
5043
}
5144
}

examples/amd.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
</div>
2222
</div>
2323

24-
<script data-main="amd" src="../bower_components/requirejs/require.js"></script>
24+
<script data-main="amd" src="../node_modules/requirejs/require.js"></script>
2525
</body>
2626
</html>

examples/amd.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
require.config({
55
paths: {
6-
angular: '../bower_components/angular/angular.min',
7-
chart: '../bower_components/Chart.js/dist/Chart',
6+
angular: '../node_modules/angular/angular.min',
7+
chart: '../node_modules/chart.js/dist/Chart',
88
'angular-chart': '../angular-chart'
99
},
1010
shim: {

examples/charts.html

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head lang="en">
44
<meta charset="UTF-8">
55
<title>Charts</title>
6-
<link rel="stylesheet" href="../bower_components/font-awesome/css/font-awesome.min.css">
7-
<link rel="stylesheet" href="../bower_components/rainbow/themes/github.css">
6+
<link rel="stylesheet" href="../node_modules/font-awesome/css/font-awesome.min.css">
7+
<link rel="stylesheet" href="../node_modules/Rainbow/themes/github.css">
88
<link href="bootstrap.css" rel="stylesheet">
99
<link href="app.css" rel="stylesheet">
1010
<style>
@@ -115,18 +115,18 @@ <h3>Dependencies</h3>
115115
</ul>
116116
<h3>Files to download</h3>
117117
<p>
118-
The easiest is to download with <strong>bower</strong>:
119-
<pre>bower install angular-chart.js --save</pre>
120-
Alternatively files can be <a href="https://github.com/jtblin/angular-chart.js">downloaded from Github</a> or via npm.
118+
The easiest is to download with <strong>npm</strong>:
119+
<pre>npm install angular-chart.js --save</pre>
120+
Alternatively files can be <a href="https://github.com/jtblin/angular-chart.js">downloaded from Github</a> or via bower.
121121
See <a href="https://github.com/jtblin/angular-chart.js">readme</a> for more information.
122122
</p>
123123
<p>Whichever method you choose the good news is that the overall size is very small:
124124
&lt;5kb for all directives (~1kb with gzip compression!)</p>
125125
<h3>Installation</h3>
126126
<p>You need to include the dependencies in your page:</p>
127-
<pre><code>&lt;script src=&quot;bower_components/angular-chart.js/dist/angular-chart.min.js&quot;&gt;&lt;/script&gt;
128-
&lt;script src="bower_components/Chart.js/Chart.min.js">&lt;/script&gt;
129-
&lt;script src="bower_components/angular-chart.js/dist/angular-chart.min.js">&lt;/script&gt;</code></pre>
127+
<pre><code>&lt;script src=&quot;node_modules/angular-chart.js/dist/angular-chart.min.js&quot;&gt;&lt;/script&gt;
128+
&lt;script src="node_modules/chart.js/Chart.min.js">&lt;/script&gt;
129+
&lt;script src="node_modules/angular-chart.js/dist/angular-chart.min.js">&lt;/script&gt;</code></pre>
130130
<p>As soon as you've got all the files downloaded and included in your page you just need to declare
131131
a dependency on the <code>chart.js</code> <a href="http://docs.angularjs.org/guide/module">module</a>:<br>
132132
</p><pre><code>angular.module('myModule', ['chart.js']);</code></pre>
@@ -523,13 +523,13 @@ <h1>Reactive</h1>
523523
</div>
524524
</footer>
525525

526-
<script src="../bower_components/angular/angular.min.js"></script>
527-
<script src="../bower_components/Chart.js/dist/Chart.min.js"></script>
528-
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
529-
<script src="../bower_components/rainbow/js/rainbow.min.js"></script>
530-
<script src="../bower_components/rainbow/js/language/generic.js"></script>
531-
<script src="../bower_components/rainbow/js/language/html.js"></script>
532-
<script src="../bower_components/rainbow/js/language/javascript.js"></script>
526+
<script src="../node_modules/angular/angular.min.js"></script>
527+
<script src="../node_modules/chart.js/dist/Chart.min.js"></script>
528+
<script src="../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
529+
<script src="../node_modules/Rainbow/js/rainbow.min.js"></script>
530+
<script src="../node_modules/Rainbow/js/language/generic.js"></script>
531+
<script src="../node_modules/Rainbow/js/language/html.js"></script>
532+
<script src="../node_modules/Rainbow/js/language/javascript.js"></script>
533533
<script src="../angular-chart.js"></script>
534534
<script src="smoothscroll.min.js"></script>
535535
<script src="app.js"></script>

examples/charts.template.html

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head lang="en">
44
<meta charset="UTF-8">
55
<title>Charts</title>
6-
<link rel="stylesheet" href="../bower_components/font-awesome/css/font-awesome.min.css">
7-
<link rel="stylesheet" href="../bower_components/rainbow/themes/github.css">
6+
<link rel="stylesheet" href="../node_modules/font-awesome/css/font-awesome.min.css">
7+
<link rel="stylesheet" href="../node_modules/Rainbow/themes/github.css">
88
<link href="bootstrap.css" rel="stylesheet">
99
<link href="app.css" rel="stylesheet">
1010
<style>
@@ -115,18 +115,18 @@ <h3>Dependencies</h3>
115115
</ul>
116116
<h3>Files to download</h3>
117117
<p>
118-
The easiest is to download with <strong>bower</strong>:
119-
<pre>bower install angular-chart.js --save</pre>
120-
Alternatively files can be <a href="https://github.com/jtblin/angular-chart.js">downloaded from Github</a> or via npm.
118+
The easiest is to download with <strong>npm</strong>:
119+
<pre>npm install angular-chart.js --save</pre>
120+
Alternatively files can be <a href="https://github.com/jtblin/angular-chart.js">downloaded from Github</a> or via bower.
121121
See <a href="https://github.com/jtblin/angular-chart.js">readme</a> for more information.
122122
</p>
123123
<p>Whichever method you choose the good news is that the overall size is very small:
124124
&lt;5kb for all directives (~1kb with gzip compression!)</p>
125125
<h3>Installation</h3>
126126
<p>You need to include the dependencies in your page:</p>
127-
<pre><code>&lt;script src=&quot;bower_components/angular-chart.js/dist/angular-chart.min.js&quot;&gt;&lt;/script&gt;
128-
&lt;script src="bower_components/Chart.js/Chart.min.js">&lt;/script&gt;
129-
&lt;script src="bower_components/angular-chart.js/dist/angular-chart.min.js">&lt;/script&gt;</code></pre>
127+
<pre><code>&lt;script src=&quot;node_modules/angular-chart.js/dist/angular-chart.min.js&quot;&gt;&lt;/script&gt;
128+
&lt;script src="node_modules/chart.js/Chart.min.js">&lt;/script&gt;
129+
&lt;script src="node_modules/angular-chart.js/dist/angular-chart.min.js">&lt;/script&gt;</code></pre>
130130
<p>As soon as you've got all the files downloaded and included in your page you just need to declare
131131
a dependency on the <code>chart.js</code> <a href="http://docs.angularjs.org/guide/module">module</a>:<br>
132132
</p><pre><code>angular.module('myModule', ['chart.js']);</code></pre>
@@ -523,13 +523,13 @@ <h1>Reactive</h1>
523523
</div>
524524
</footer>
525525

526-
<script src="../bower_components/angular/angular.min.js"></script>
527-
<script src="../bower_components/Chart.js/dist/Chart.min.js"></script>
528-
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
529-
<script src="../bower_components/rainbow/js/rainbow.min.js"></script>
530-
<script src="../bower_components/rainbow/js/language/generic.js"></script>
531-
<script src="../bower_components/rainbow/js/language/html.js"></script>
532-
<script src="../bower_components/rainbow/js/language/javascript.js"></script>
526+
<script src="../node_modules/angular/angular.min.js"></script>
527+
<script src="../node_modules/chart.js/dist/Chart.min.js"></script>
528+
<script src="../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
529+
<script src="../node_modules/Rainbow/js/rainbow.min.js"></script>
530+
<script src="../node_modules/Rainbow/js/language/generic.js"></script>
531+
<script src="../node_modules/Rainbow/js/language/html.js"></script>
532+
<script src="../node_modules/Rainbow/js/language/javascript.js"></script>
533533
<script src="../angular-chart.js"></script>
534534
<script src="smoothscroll.min.js"></script>
535535
<script src="app.js"></script>

examples/stacked-bars.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
</div>
2323
</div>
2424

25-
<script src="../bower_components/angular/angular.js"></script>
26-
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
27-
<script src="../bower_components/Chart.js/dist/Chart.js"></script>
25+
<script src="../node_modules/angular/angular.js"></script>
26+
<script src="../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
27+
<script src="../node_modules/chart.js/dist/Chart.js"></script>
2828
<script src="../angular-chart.js"></script>
2929
<script src="app.js"></script>
3030
</body>

examples/tables.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
</div>
3737
</div>
3838

39-
<script src="../bower_components/angular/angular.min.js"></script>
40-
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
41-
<script src="../bower_components/Chart.js/dist/Chart.min.js"></script>
39+
<script src="../node_modules/angular/angular.min.js"></script>
40+
<script src="../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
41+
<script src="../node_modules/chart.js/dist/Chart.min.js"></script>
4242
<script src="../angular-chart.js"></script>
4343
<script src="app.js"></script>
4444
</body>

examples/tabs.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
</div>
2525
</div>
2626

27-
<script src="../bower_components/angular/angular.js"></script>
28-
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
29-
<script src="../bower_components/Chart.js/dist/Chart.min.js"></script>
27+
<script src="../node_modules/angular/angular.js"></script>
28+
<script src="../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
29+
<script src="../node_modules/chart.js/dist/Chart.min.js"></script>
3030
<script src="../angular-chart.js"></script>
3131
<script src="app.js"></script>
3232
</body>

examples/ticks.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
</div>
2222
</div>
2323

24-
<script src="../bower_components/angular/angular.min.js"></script>
25-
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
26-
<script src="../bower_components/Chart.js/dist/Chart.min.js"></script>
24+
<script src="../node_modules/angular/angular.min.js"></script>
25+
<script src="../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
26+
<script src="../node_modules/chart.js/dist/Chart.min.js"></script>
2727
<script src="../angular-chart.js"></script>
2828
<script src="app.js"></script>
2929
</body>

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
},
2121
"license": "BSD-2-Clause",
2222
"devDependencies": {
23+
"Rainbow": "git+https://github.com/ccampbell/rainbow.git",
24+
"angular-bootstrap": "^0.12.2",
25+
"angular-mocks": "^1.5.7",
2326
"chai": "^3.4.1",
2427
"chai-string": "^1.2.0",
2528
"codeclimate-test-reporter": "^0.3.1",
2629
"cp": "^0.2.0",
30+
"font-awesome": "^4.6.3",
2731
"gm": "^1.22.0",
2832
"gulp": "^3.9.0",
2933
"gulp-bump": "^1.0.0",
@@ -48,6 +52,7 @@
4852
"mkdirp": "^0.5.0",
4953
"mocha": "^2.1.0",
5054
"mocha-phantomjs-istanbul": "^0.0.2",
55+
"requirejs": "^2.2.0",
5156
"sinon": "^1.12.2",
5257
"sinon-chai": "^2.7.0",
5358
"testatic": "^0.1.0",

test/fixtures/29-tabs.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
</div>
2525
</div>
2626

27-
<script src="../../bower_components/angular/angular.js"></script>
28-
<script src="../../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
29-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
27+
<script src="../../node_modules/angular/angular.js"></script>
28+
<script src="../../node_modules/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
29+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
3030
<script src="../../angular-chart.js"></script>
3131
<script src="29-tabs.js"></script>
3232
</body>

test/fixtures/51-pie-update-colours.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ <h1>Charts</h1>
2727
</section>
2828
</div>
2929

30-
<script src="../../bower_components/angular/angular.min.js"></script>
31-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
30+
<script src="../../node_modules/angular/angular.min.js"></script>
31+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
3232
<script src="../../angular-chart.js"></script>
3333
<script src="51-pie-update-colours.js"></script>
3434
</body>

test/fixtures/54-not-enough-colours.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ <h1>Charts</h1>
2828
</section>
2929
</div>
3030

31-
<script src="../../bower_components/angular/angular.min.js"></script>
32-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
31+
<script src="../../node_modules/angular/angular.min.js"></script>
32+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
3333
<script src="../../angular-chart.js"></script>
3434
<script src="54-not-enough-colours.js"></script>
3535
</body>

test/fixtures/57-hex-colours.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ <h1>Charts</h1>
2727
</section>
2828
</div>
2929

30-
<script src="../../bower_components/angular/angular.min.js"></script>
31-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
30+
<script src="../../node_modules/angular/angular.min.js"></script>
31+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
3232
<script src="../../angular-chart.js"></script>
3333
<script src="57-hex-colours.js"></script>
3434
</body>

test/fixtures/charts.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ <h1>Charts</h1>
6969
</section>
7070
</div>
7171

72-
<script src="../../bower_components/angular/angular.min.js"></script>
73-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
72+
<script src="../../node_modules/angular/angular.min.js"></script>
73+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
7474
<script src="../../angular-chart.js"></script>
7575
<script src="charts.js"></script>
7676
</body>

test/fixtures/configure-line-chart.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ <h1>Charts</h1>
2525
</section>
2626
</div>
2727

28-
<script src="../../bower_components/angular/angular.min.js"></script>
29-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
28+
<script src="../../node_modules/angular/angular.min.js"></script>
29+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
3030
<script src="../../angular-chart.js"></script>
3131
<script src="configure-line-chart.js"></script>
3232
</body>

test/fixtures/custom-directive.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ <h1>Charts</h1>
2424
</section>
2525
</div>
2626

27-
<script src="../../bower_components/angular/angular.min.js"></script>
28-
<script src="../../bower_components/Chart.js/dist/Chart.min.js"></script>
27+
<script src="../../node_modules/angular/angular.min.js"></script>
28+
<script src="../../node_modules/chart.js/dist/Chart.min.js"></script>
2929
<script src="../../angular-chart.js"></script>
3030
<script src="custom-directive.js"></script>
3131
</body>

test/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
</head>
77
<body ng-app="chart.js">
88
<div id="mocha"></div>
9-
<script src="../bower_components/angular/angular.min.js"></script>
10-
<script src="../bower_components/Chart.js/dist/Chart.min.js"></script>
9+
<script src="../node_modules/angular/angular.min.js"></script>
10+
<script src="../node_modules/chart.js/dist/Chart.min.js"></script>
1111
<script src="../angular-chart.js"></script>
1212
<script src="../node_modules/mocha/mocha.js"></script>
1313
<script src="../node_modules/chai/chai.js"></script>
1414
<script src="../node_modules/chai-string/chai-string.js"></script>
1515
<script src="../node_modules/sinon/pkg/sinon.js"></script>
1616
<script src="../node_modules/sinon-chai/lib/sinon-chai.js"></script>
1717
<script>mocha.setup('bdd')</script>
18-
<script src="../bower_components/angular-mocks/angular-mocks.js"></script>
18+
<script src="../node_modules/angular-mocks/angular-mocks.js"></script>
1919
<script src="../test/fixtures/coverage.js"></script>
2020
<script src="../test/test.unit.js"></script>
2121
<script>

0 commit comments

Comments
 (0)