Skip to content

Consolidate dependency management on npm #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ env:
- TRIGGER_REPO_BRANCH: "master"

before_install:
- 'git checkout -B $TRAVIS_BRANCH' # Reconcile detached HEAD
- 'npm install -g bower grunt-cli'
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
- npm install -g bower grunt-cli

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to install bower here if we're no longer using it?

Copy link
Member Author

@dlabrecq dlabrecq Dec 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need bower to build, but Travis still needs to verify the bower install during the release process. (Still supporting both npm and bower installs.) In order for the Travis build to succeed, we still need this line -- for now.

FYI, the Travis build (i.e., the scripts from patternfly-eng-release) will still perform an npm and bower install for all our repos. That is, if there is a bower.json file available. During a release, the scripts will also perform an npm and bower install to verify.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- npm install patternfly-eng-release

install: true

script:
- sh -x ./scripts/build.sh
- sh -x ./node_modules/patternfly-eng-release/scripts/_build.sh -a

after_success:
- ./scripts/publish-ghpages.sh -t docs
Expand All @@ -30,4 +33,4 @@ deploy:
skip_cleanup: true
on: # The branch and repo that triggered the build
branch: master
condition: $TRAVIS_REPO_SLUG = "patternfly/angular-patternfly"
condition: $TRAVIS_REPO_SLUG = "patternfly/angular-patternfly"
26 changes: 13 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ module.exports = function (grunt) {
},
copy: {
docdata: {
cwd: 'lib/patternfly/dist',
cwd: 'node_modules/patternfly/dist',
src: ['fonts/*', 'img/*'],
dest: 'docs',
expand: true
},
fa: {
cwd: 'lib/patternfly/',
cwd: 'node_modules/patternfly/',
src: ['components/font-awesome/**'],
dest: 'docs',
expand: true
Expand Down Expand Up @@ -125,21 +125,21 @@ module.exports = function (grunt) {
dest: 'docs',
image: 'misc/logo-alt.svg',
scripts: [
'lib/moment/moment.js',
'lib/c3/c3.js',
'lib/d3/d3.js',
'lib/patternfly/dist/js/patternfly-settings.js',
'lib/angular/angular.js',
'lib/angular-sanitize/angular-sanitize.js',
'lib/angular-animate/angular-animate.js',
'lib/angular-bootstrap/ui-bootstrap-tpls.js',
'node_modules/moment/moment.js',
'node_modules/c3/c3.js',
'node_modules/d3/d3.js',
'node_modules/patternfly/dist/js/patternfly-settings.js',
'node_modules/angular/angular.js',
'node_modules/angular-sanitize/angular-sanitize.js',
'node_modules/angular-animate/angular-animate.js',
'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
'misc/angular-bootstrap-prettify.js',
'lib/lodash/dist/lodash.min.js',
'node_modules/lodash/lodash.min.js',
'dist/angular-patternfly.js',
'lib/angular-ui-router/release/angular-ui-router.min.js'],
'node_modules/angular-ui-router/release/angular-ui-router.min.js'],
html5Mode: false,
template: 'grunt-ngdocs-index.tmpl',
styles: ['lib/patternfly/dist/css/patternfly.css', 'lib/patternfly/dist/css/patternfly-additions.css',
styles: ['node_modules/patternfly/dist/css/patternfly.css', 'node_modules/patternfly/dist/css/patternfly-additions.css',
'dist/styles/angular-patternfly.css', 'misc/ng-docs.css', 'misc/examples.css']
},

Expand Down
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@ You have to install required software before you're able to use grunt:
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.

* 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/)
* Install Bower globally - Find more information on [Bower](http://bower.io/)

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

npm install -g grunt-cli

* Install npm dependencies with:

npm install
* Install bower dependencies with:

bower install

You should have your environment ready now.

Expand All @@ -52,8 +48,8 @@ Note:

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

$ bower install angular --save
$ bower install angular-patternfly --save
$ npm install angular --save
$ npm install angular-patternfly --save

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

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

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

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

<!-- Angular -->
<script src="bower_components/angular/angular.min.js"></script>
<script src="node_modules/angular-patternfly/node_modules/angular/angular.min.js"></script>

<!-- Angular-Bootstrap -->
<script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="node_modules/angular-patternfly/node_modules/angular-ui-bootstrap/dist/ui-bootstrap.js"></script>
<script src="node_modules/angular-patternfly/node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>

<!-- Angular-Sanitize -->
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="node_modules/angular-patternfly/node_modules/angular-sanitize/angular-sanitize.min.js"></script>

<!-- Angular-PatternFly -->
<script src="bower_components/angular-patternfly/dist/angular-patternfly.min.js"></script>
<script src="node_modules/angular-patternfly/dist/angular-patternfly.min.js"></script>

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

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

## Releasing

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

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

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-patternfly",
"version": "3.15.0",
"version": "3.16.0",
"authors": [
"Red Hat"
],
Expand Down
Loading