Skip to content

perf(angular): upgrade to Angular 1.7.7 #768

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
merged 1 commit into from
Mar 4, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
lib
.tmp
coverage
docs
dist
Expand Down
25 changes: 14 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = function (grunt) {
'use strict';

var nodeSass = require('node-sass');
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

function init () {
Expand All @@ -19,13 +20,13 @@ module.exports = function (grunt) {
'grunt build:buttons:notification) otherwise all available modules are built.',
'test': 'Executes the karma testsuite.',
'watch': 'Whenever js source files (from the src directory) change, the tasks executes jslint and documentation build.',
'ngdocs': 'Builds documentation into docs.',
'ngdocs:view': 'Builds documentation into docs and runs a web server. The docs can be accessed on http://localhost:8000/',
'ngdocs:publish': 'Publishes the ngdocs to the dist area. This should only be done when bumping the release version.'
'uidocs': 'Builds documentation into docs.',
'uidocs:view': 'Builds documentation into docs and runs a web server. The docs can be accessed on http://localhost:8000/',
'uidocs:publish': 'Publishes the uidocs to the dist area. This should only be done when bumping the release version.'
},
groups: {
'Basic project tasks': ['help', 'clean', 'build', 'test'],
'Documentation tasks': ['ngdocs', 'ngdocs:view', 'ngdocs:publish']
'Documentation tasks': ['uidocs', 'uidocs:view', 'uidocs:publish']
}
}
}
Expand Down Expand Up @@ -251,6 +252,7 @@ module.exports = function (grunt) {
'dist/sass/angular-patternfly.css': ['styles/build.scss']
},
options: {
implementation: nodeSass,
outputStyle: 'expanded',
includePaths: [
'dist/sass',
Expand All @@ -265,6 +267,7 @@ module.exports = function (grunt) {
'dist/styles/angular-patternfly.css': 'styles/angular-patternfly.less'
},
options: {
implementation: nodeSass,
paths: ['src/less/'],
strictMath: true
}
Expand Down Expand Up @@ -323,7 +326,7 @@ module.exports = function (grunt) {
force: true
}
},
ngdocs: {
'uidocs-generator': {
options: {
title: 'ANGULAR PATTERNFLY',
dest: 'docs',
Expand Down Expand Up @@ -354,7 +357,7 @@ module.exports = function (grunt) {
'node_modules/angular-ui-router/release/angular-ui-router.min.js',
'node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js'],
html5Mode: false,
template: 'grunt-ngdocs-index.tmpl',
template: 'grunt-uidocs-index.tmpl',
styles: ['node_modules/datatables.net-dt/css/jquery.dataTables.css',
'node_modules/patternfly/dist/css/patternfly.css',
'node_modules/patternfly/dist/css/patternfly-additions.css',
Expand Down Expand Up @@ -545,24 +548,24 @@ module.exports = function (grunt) {
'cssmin',
'copymain',
'string-replace',
'ngdocs',
'uidocs-generator',
'clean:templates']);
});

// Runs all the tasks of build with the exception of tests
grunt.registerTask('deploy', 'Prepares the project for deployment. Does not run unit tests', function () {
var concatSrc = 'src/**/*.js';
grunt.task.run(['clean', 'lint', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'string-replace', 'ngdocs', 'clean:templates']);
grunt.task.run(['clean', 'lint', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'string-replace', 'uidocs-generator', 'clean:templates']);
});

grunt.registerTask('default', ['build']);
grunt.registerTask('ngdocs:view', ['build', 'connect:docs', 'watch']);
grunt.registerTask('uidocs:view', ['build', 'connect:docs', 'watch']);
grunt.registerTask('lint', ['eslint', 'htmlhint']);
grunt.registerTask('test', ['karma', 'coveralls']);
grunt.registerTask('check', ['lint', 'test']);
grunt.registerTask('help', ['availabletasks']);
grunt.registerTask('serve', ['ngdocs:view']);
grunt.registerTask('ngdocs:publish', ['remove:published', 'copy:publish']);
grunt.registerTask('serve', ['uidocs:view']);
grunt.registerTask('uidocs:publish', ['remove:published', 'copy:publish']);

}

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,17 @@ plugins: [

The API documentation can be built with:
```shell
$ npm run ngdocs
$ npm run uidocs
```

If you're interested in reading the docs right away, you can use special target, which will start a web server:
```shell
$ npm run ngdocs:view
$ npm run uidocs:view
```

After executing this tasks you'll be able to access the documentation at [http://localhost:8000/](http://localhost:8000/). If a different port is desired, it may be specified on as an option:
```shell
$ npm run ngdocs:view -- --port=8002
$ npm run uidocs:view -- --port=8002
```

## Git Commit Guidelines
Expand Down
20 changes: 8 additions & 12 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,17 @@
"url": "git://github.com/patternfly/angular-patternfly.git"
},
"dependencies": {
"angular": "1.5.*",
"angular-animate": "1.5.*",
"angular-bootstrap": "2.2.x",
"angular-dragdrop": "1.0.13",
"angularjs-datatables": "^0.5.9",
"angular-drag-and-drop-lists": "2.0.0",
"angular-sanitize": "1.5.*",
"datatables.net": "^1.10.12",
"datatables.net-select": "~1.2.0",
"angular": "^1.7.7",
"angular-animate": "^1.7.7",
"angular-sanitize": "^1.7.7",
"angular-svg-base-fix": "2.0.0",
"angular-ui-bootstrap": "2.3.x",
"lodash": "4.x",
"patternfly": ">=3.36.0"
"patternfly": "^3.37.1"
},
"devDependencies": {
"angular-mocks": "1.5.*",
"angular-ui-router": "^1.0.0-beta.3"
"angular-mocks": "^1.7.7",
"angular-ui-router": "^1.0.20"
},
"overrides": {
"datatables": {
Expand Down
5 changes: 1 addition & 4 deletions eslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rules:
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines: 2
no-trailing-spaces: 2
space-after-keywords: 2
keyword-spacing: 2
space-before-blocks: 2
space-before-function-paren: 0
space-infix-ops: 2
Expand All @@ -41,6 +41,3 @@ rules:
dot-notation:
- 2
- {"allowPattern": "^[a-z]+(_[a-z]+)+$"}

ecmaFeatures:
blockBindings: true
17 changes: 8 additions & 9 deletions grunt-ngdocs-index.tmpl → grunt-uidocs-index.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <![endif]-->
Expand All @@ -18,7 +19,7 @@
// before the base attribute is added, causing 404 and terribly slow loading of the docs app.
(function() {
var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
origin, baseUrl, rUrl = /(\/?#!\/.*|\/(<%= sections %>)\/?(\?.*)*|\/index[^\.]*\.html.*)$/,
origin, baseUrl, rUrl = /(\/?#!\/.*|\/(examples|api)\/?(\?.*)*|\/index[^\.]*\.html.*)$/,
headEl = document.getElementsByTagName('head')[0],
sync = true;

Expand All @@ -39,19 +40,19 @@
addTag('link', {rel: 'stylesheet', href: 'css/animations.css', type: 'text/css'});

<% _.forEach(styles, function(url) { %>
addTag('link', {rel: 'stylesheet', href: '<%= url %>', type: 'text/css'}, sync);
addTag('link', {rel: 'stylesheet', href: '<%= url %>', type: 'text/css'}, sync);
<% }); %>

addTag('script', {src: 'js/google-code-prettify.js'}, sync);
addTag('script', {src: 'js/marked.js'}, sync);
addTag('script', {src: 'js/marked.min.js'}, sync);

<% _.forEach(scripts, function(url) { %>
addTag('script', {src: '<%= url %>'}, sync);
<% }); %>
<% if(!deferLoad) { %>
addTag('script', {src: 'js/angular-bootstrap.js'}, sync);
addTag('script', {src: 'js/docs-setup.js'}, sync);
addTag('script', {src: 'js/docs.js'}, sync);
addTag('script', {src: 'js/angular-bootstrap.js'}, sync);
addTag('script', {src: 'js/docs-setup.js'}, sync);
addTag('script', {src: 'js/docs.js'}, sync);
<% } %>
function addTag(name, attributes, sync) {
var el = document.createElement(name),
Expand Down Expand Up @@ -178,9 +179,7 @@
<div class="col-md-12">
<!--[if lt IE 7]>
<p class="alert alert-error">Your browser is <em>ancient!</em>
<a href="http://browsehappy.com/">Upgrade to a different browser</a> or
<a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to
experience this site.
<a href="http://browsehappy.com/">Upgrade to a different browser</a> to experience this site.
</p>
<![endif]-->

Expand Down
Loading