Skip to content

Commit e04cea6

Browse files
Merge pull request patternfly#372 from dlabrecq/branch-4.0-npm-dependencies
Consolidate dependency management on npm
2 parents 9f9789d + 87da652 commit e04cea6

File tree

8 files changed

+4438
-136
lines changed

8 files changed

+4438
-136
lines changed

.travis.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ env:
1010
- TRIGGER_REPO_BRANCH: "master"
1111

1212
before_install:
13-
- 'git checkout -B $TRAVIS_BRANCH' # Reconcile detached HEAD
14-
- 'npm install -g bower grunt-cli'
13+
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
14+
- npm install -g bower grunt-cli
15+
- npm install patternfly-eng-release
16+
17+
install: true
1518

1619
script:
17-
- sh -x ./scripts/build.sh
20+
- sh -x ./node_modules/patternfly-eng-release/scripts/_build.sh -a
1821

1922
after_success:
2023
- ./scripts/publish-ghpages.sh -t docs
@@ -30,4 +33,4 @@ deploy:
3033
skip_cleanup: true
3134
on: # The branch and repo that triggered the build
3235
branch: master
33-
condition: $TRAVIS_REPO_SLUG = "patternfly/angular-patternfly"
36+
condition: $TRAVIS_REPO_SLUG = "patternfly/angular-patternfly"

Gruntfile.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ module.exports = function (grunt) {
5454
},
5555
copy: {
5656
docdata: {
57-
cwd: 'lib/patternfly/dist',
57+
cwd: 'node_modules/patternfly/dist',
5858
src: ['fonts/*', 'img/*'],
5959
dest: 'docs',
6060
expand: true
6161
},
6262
fa: {
63-
cwd: 'lib/patternfly/',
63+
cwd: 'node_modules/patternfly/',
6464
src: ['components/font-awesome/**'],
6565
dest: 'docs',
6666
expand: true
@@ -125,21 +125,21 @@ module.exports = function (grunt) {
125125
dest: 'docs',
126126
image: 'misc/logo-alt.svg',
127127
scripts: [
128-
'lib/moment/moment.js',
129-
'lib/c3/c3.js',
130-
'lib/d3/d3.js',
131-
'lib/patternfly/dist/js/patternfly-settings.js',
132-
'lib/angular/angular.js',
133-
'lib/angular-sanitize/angular-sanitize.js',
134-
'lib/angular-animate/angular-animate.js',
135-
'lib/angular-bootstrap/ui-bootstrap-tpls.js',
128+
'node_modules/moment/moment.js',
129+
'node_modules/c3/c3.js',
130+
'node_modules/d3/d3.js',
131+
'node_modules/patternfly/dist/js/patternfly-settings.js',
132+
'node_modules/angular/angular.js',
133+
'node_modules/angular-sanitize/angular-sanitize.js',
134+
'node_modules/angular-animate/angular-animate.js',
135+
'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
136136
'misc/angular-bootstrap-prettify.js',
137-
'lib/lodash/dist/lodash.min.js',
137+
'node_modules/lodash/lodash.min.js',
138138
'dist/angular-patternfly.js',
139-
'lib/angular-ui-router/release/angular-ui-router.min.js'],
139+
'node_modules/angular-ui-router/release/angular-ui-router.min.js'],
140140
html5Mode: false,
141141
template: 'grunt-ngdocs-index.tmpl',
142-
styles: ['lib/patternfly/dist/css/patternfly.css', 'lib/patternfly/dist/css/patternfly-additions.css',
142+
styles: ['node_modules/patternfly/dist/css/patternfly.css', 'node_modules/patternfly/dist/css/patternfly-additions.css',
143143
'dist/styles/angular-patternfly.css', 'misc/ng-docs.css', 'misc/examples.css']
144144
},
145145

README.md

+12-16
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,14 @@ You have to install required software before you're able to use grunt:
2121
Angular Patternfly stays up to date with the Node LTS [Release Schedule](https://github.com/nodejs/LTS#lts_schedule). If you're using Angular Patternfly downstream, we suggest the use of an actively supported version of Node/NPM, although prior versions of Node may work.
2222

2323
* Install npm - If npm is not already installed with Node.js, you have to install it manually. Find more information on [NPM](https://www.npmjs.org/)
24-
* Install Bower globally - Find more information on [Bower](http://bower.io/)
2524

26-
npm install -g bower
2725
* Install Grunt globally - Find more information on [Grunt](http://gruntjs.com/)
2826

2927
npm install -g grunt-cli
28+
3029
* Install npm dependencies with:
3130

3231
npm install
33-
* Install bower dependencies with:
34-
35-
bower install
3632

3733
You should have your environment ready now.
3834

@@ -52,8 +48,8 @@ Note:
5248

5349
1. Add Angular and Angular-PatternFly as dependencies for your project and you'll receive all the libraries you'll need:
5450

55-
$ bower install angular --save
56-
$ bower install angular-patternfly --save
51+
$ npm install angular --save
52+
$ npm install angular-patternfly --save
5753

5854
2. Add the core Patternfly CSS and script includes to your HTML file(s):
5955

@@ -62,26 +58,26 @@ Note:
6258
3. Add the following CSS include to your HTML file(s):
6359

6460
<!-- Angular-PatternFly Styles -->
65-
<link rel="stylesheet" href="bower_components/angular-patternfly/dist/styles/angular-patternfly.min.css" />
61+
<link rel="stylesheet" href="node_modules/angular-patternfly/dist/styles/angular-patternfly.min.css" />
6662

6763
4. Add the following script includes to your HTML file(s), adjusting where necessary to pull in only what you need:
6864

6965
<!-- Angular -->
70-
<script src="bower_components/angular/angular.min.js"></script>
66+
<script src="node_modules/angular-patternfly/node_modules/angular/angular.min.js"></script>
7167

7268
<!-- Angular-Bootstrap -->
73-
<script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
74-
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
69+
<script src="node_modules/angular-patternfly/node_modules/angular-ui-bootstrap/dist/ui-bootstrap.js"></script>
70+
<script src="node_modules/angular-patternfly/node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>
7571

7672
<!-- Angular-Sanitize -->
77-
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
73+
<script src="node_modules/angular-patternfly/node_modules/angular-sanitize/angular-sanitize.min.js"></script>
7874

7975
<!-- Angular-PatternFly -->
80-
<script src="bower_components/angular-patternfly/dist/angular-patternfly.min.js"></script>
76+
<script src="node_modules/angular-patternfly/dist/angular-patternfly.min.js"></script>
8177

8278
<!-- C3, D3 - Charting Libraries. Only required if you are using the 'patternfly.charts' module-->
83-
<script src="bower_components/patternfly/components/c3/c3.min.js"></script>
84-
<script src="bower_components/patternfly/components/d3/d3.min.js"></script>
79+
<script src="node_modules/angular-patternfly/node_modules/patternfly/node_modules/c3/c3.min.js"></script>
80+
<script src="node_modules/angular-patternfly/node_modules/patternfly/node_modules/d3/d3.min.js"></script>
8581

8682
5. (optional) The 'patternfly.charts' module is not a dependency in the default angular 'patternfly' module.
8783
In order to use patternfly charts you must add 'patternfly.charts' as a dependency in your application:
@@ -112,7 +108,7 @@ grunt ngdocs:view --port=8002
112108

113109
## Releasing
114110

115-
Angular PatternFly is released through Bower. To release a new version version of Angular PatternFly, edit `bower.json` and `package.json` accordingly.
111+
Angular PatternFly is released through Bower and npm. To release a new version version of Angular PatternFly, edit `bower.json` and `package.json` accordingly.
116112

117113
Update the version listed in `bower.json` by editing the file and changing the line:
118114

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-patternfly",
3-
"version": "3.15.0",
3+
"version": "3.16.0",
44
"authors": [
55
"Red Hat"
66
],

0 commit comments

Comments
 (0)