Skip to content
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

Update package.json #76

Merged
merged 5 commits into from
Feb 8, 2016
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
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: node_js
sudo: false

before_script:
- ./node_modules/.bin/bower install
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

Expand All @@ -16,5 +15,3 @@ node_js:
cache:
directories:
- node_modules
- bower_components

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,10 @@ It will be awesome if you can help us evolve `angular-oauth2`. Want to help?

1. [Fork it](https://github.com/seegno/angular-oauth2).
2. `npm install`.
3. `bower install`
4. Do your magic.
5. Run the tests: `gulp test`.
6. Build: `gulp build`
7. Create a [Pull Request](https://github.com/seegno/angular-oauth2/compare).
3. Do your magic.
4. Run the tests: `gulp test`.
5. Build: `gulp build`
6. Create a [Pull Request](https://github.com/seegno/angular-oauth2/compare).

*The source files are written in ES6.*

Expand Down
22 changes: 18 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,24 @@ var config = {
umd: {
namespace: 'angularOAuth2',
exports: 'ngModule',
deps: [
'angular',
{ name: 'query-string', globalName: 'queryString', paramName: 'queryString' }
]
template: `
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([ "angular", "angular-cookies", "query-string" ], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require("angular"), require("angular-cookies"), require("query-string"));
} else {
root.<%= namespace %> = factory(root.angular, 'ngCookies', root.queryString);
}
}(this, function(angular, ngCookies, queryString) {
<% if (exports) { %>
<%= contents %>
return <%= exports %>;
<% } else { %>
return <%= contents %>;
<% } %>
}));
`
},
banner: ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
Expand Down
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ module.exports = function(config) {
basePath: './',
browsers: [argv.browsers || 'Chrome'],
files: [
'bower_components/angular/angular.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/query-string/query-string.js',
'node_modules/angular/angular.js',
'node_modules/angular-cookies/angular-cookies.js',
'node_modules/query-string/query-string.js',
Copy link
Collaborator

Choose a reason for hiding this comment

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

If query-string is updated to v3.0.0 the main file is index.js.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we lock versions?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes but the current notation will do fine until we test and update for newer versions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Then, let's keep as is. We should update all dependencies in another PR.

'node_modules/lodash/dist/lodash.js',
'node_modules/angular-mocks/angular-mocks.js',
'dist/angular-oauth2.js',
Expand Down
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"url": "https://github.com/seegno/angular-oauth2/issues"
},
"homepage": "https://github.com/seegno/angular-oauth2",
"dependencies": {
"angular": "^1.4.0",
"angular-cookies": "^1.4.0",
"query-string": "^1.0.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any issues with bump this to 3.0.0?

Copy link
Member Author

Choose a reason for hiding this comment

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

Another PR. We need to evaluate BCs.

},
"devDependencies": {
"6to5ify": "^3.1.2",
"angular-mocks": "^1.3.9",
Expand All @@ -45,21 +50,13 @@
"karma-should": "0.0.1",
"karma-sinon": "^1.0.4",
"lodash": "^2.4.1",
"mocha": "^2.4.5",
"should": "^4.6.0",
"sinon": "^1.17.3",
"yargs": "^3.6.0"
},
"browser": {
"angular": "./bower_components/angular/angular.js",
"angular-cookies": "./bower_components/angular-cookies/angular-cookies.js",
"query-string": "./bower_components/query-string/query-string.js"
},
"scripts": {
"changelog": "./node_modules/.bin/github-changes -o seegno -r angular-oauth2 -a --only-pulls --use-commit-body --title 'Changelog' --date-format '/ YYYY-MM-DD'",
"test": "./node_modules/.bin/gulp test --browsers Firefox"
},
"browserify-shim": {
"angular": {
"exports": "angular"
}
}
}
4 changes: 2 additions & 2 deletions src/angular-oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import OAuthProvider from './providers/oauth-provider';
import OAuthTokenProvider from './providers/oauth-token-provider';
import oauthConfig from './config/oauth-config';
import oauthInterceptor from './interceptors/oauth-interceptor';
import 'angular-cookies';
import ngCookies from 'angular-cookies';

var ngModule = angular.module('angular-oauth2', [
'ngCookies'
ngCookies
])
.config(oauthConfig)
.factory('oauthInterceptor', oauthInterceptor)
Expand Down