Skip to content

Commit 2c70d2f

Browse files
author
undefined
committed
perf(angular): upgrade to Angular 1.7.7
1 parent 17f56e3 commit 2c70d2f

File tree

67 files changed

+17945
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+17945
-242
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
lib
3+
.tmp
34
coverage
45
docs
56
dist

Gruntfile.js

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = function (grunt) {
22
'use strict';
33

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

67
function init () {
@@ -19,13 +20,13 @@ module.exports = function (grunt) {
1920
'grunt build:buttons:notification) otherwise all available modules are built.',
2021
'test': 'Executes the karma testsuite.',
2122
'watch': 'Whenever js source files (from the src directory) change, the tasks executes jslint and documentation build.',
22-
'ngdocs': 'Builds documentation into docs.',
23-
'ngdocs:view': 'Builds documentation into docs and runs a web server. The docs can be accessed on http://localhost:8000/',
24-
'ngdocs:publish': 'Publishes the ngdocs to the dist area. This should only be done when bumping the release version.'
23+
'uidocs': 'Builds documentation into docs.',
24+
'uidocs:view': 'Builds documentation into docs and runs a web server. The docs can be accessed on http://localhost:8000/',
25+
'uidocs:publish': 'Publishes the uidocs to the dist area. This should only be done when bumping the release version.'
2526
},
2627
groups: {
2728
'Basic project tasks': ['help', 'clean', 'build', 'test'],
28-
'Documentation tasks': ['ngdocs', 'ngdocs:view', 'ngdocs:publish']
29+
'Documentation tasks': ['uidocs', 'uidocs:view', 'uidocs:publish']
2930
}
3031
}
3132
}
@@ -251,6 +252,7 @@ module.exports = function (grunt) {
251252
'dist/sass/angular-patternfly.css': ['styles/build.scss']
252253
},
253254
options: {
255+
implementation: nodeSass,
254256
outputStyle: 'expanded',
255257
includePaths: [
256258
'dist/sass',
@@ -265,6 +267,7 @@ module.exports = function (grunt) {
265267
'dist/styles/angular-patternfly.css': 'styles/angular-patternfly.less'
266268
},
267269
options: {
270+
implementation: nodeSass,
268271
paths: ['src/less/'],
269272
strictMath: true
270273
}
@@ -323,7 +326,7 @@ module.exports = function (grunt) {
323326
force: true
324327
}
325328
},
326-
ngdocs: {
329+
'uidocs-generator': {
327330
options: {
328331
title: 'ANGULAR PATTERNFLY',
329332
dest: 'docs',
@@ -354,7 +357,7 @@ module.exports = function (grunt) {
354357
'node_modules/angular-ui-router/release/angular-ui-router.min.js',
355358
'node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js'],
356359
html5Mode: false,
357-
template: 'grunt-ngdocs-index.tmpl',
360+
template: 'grunt-uidocs-index.tmpl',
358361
styles: ['node_modules/datatables.net-dt/css/jquery.dataTables.css',
359362
'node_modules/patternfly/dist/css/patternfly.css',
360363
'node_modules/patternfly/dist/css/patternfly-additions.css',
@@ -545,24 +548,24 @@ module.exports = function (grunt) {
545548
'cssmin',
546549
'copymain',
547550
'string-replace',
548-
'ngdocs',
551+
'uidocs-generator',
549552
'clean:templates']);
550553
});
551554

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

558561
grunt.registerTask('default', ['build']);
559-
grunt.registerTask('ngdocs:view', ['build', 'connect:docs', 'watch']);
562+
grunt.registerTask('uidocs:view', ['build', 'connect:docs', 'watch']);
560563
grunt.registerTask('lint', ['eslint', 'htmlhint']);
561564
grunt.registerTask('test', ['karma', 'coveralls']);
562565
grunt.registerTask('check', ['lint', 'test']);
563566
grunt.registerTask('help', ['availabletasks']);
564-
grunt.registerTask('serve', ['ngdocs:view']);
565-
grunt.registerTask('ngdocs:publish', ['remove:published', 'copy:publish']);
567+
grunt.registerTask('serve', ['uidocs:view']);
568+
grunt.registerTask('uidocs:publish', ['remove:published', 'copy:publish']);
566569

567570
}
568571

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,17 @@ plugins: [
248248
249249
The API documentation can be built with:
250250
```shell
251-
$ npm run ngdocs
251+
$ npm run uidocs
252252
```
253253
254254
If you're interested in reading the docs right away, you can use special target, which will start a web server:
255255
```shell
256-
$ npm run ngdocs:view
256+
$ npm run uidocs:view
257257
```
258258
259259
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:
260260
```shell
261-
$ npm run ngdocs:view -- --port=8002
261+
$ npm run uidocs:view -- --port=8002
262262
```
263263
264264
## Git Commit Guidelines

bower.json

+8-12
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,17 @@
3737
"url": "git://github.com/patternfly/angular-patternfly.git"
3838
},
3939
"dependencies": {
40-
"angular": "1.5.*",
41-
"angular-animate": "1.5.*",
42-
"angular-bootstrap": "2.2.x",
43-
"angular-dragdrop": "1.0.13",
44-
"angularjs-datatables": "^0.5.9",
45-
"angular-drag-and-drop-lists": "2.0.0",
46-
"angular-sanitize": "1.5.*",
47-
"datatables.net": "^1.10.12",
48-
"datatables.net-select": "~1.2.0",
40+
"angular": "^1.7.7",
41+
"angular-animate": "^1.7.7",
42+
"angular-sanitize": "^1.7.7",
43+
"angular-svg-base-fix": "2.0.0",
44+
"angular-ui-bootstrap": "2.3.x",
4945
"lodash": "4.x",
50-
"patternfly": ">=3.36.0"
46+
"patternfly": "^3.37.1"
5147
},
5248
"devDependencies": {
53-
"angular-mocks": "1.5.*",
54-
"angular-ui-router": "^1.0.0-beta.3"
49+
"angular-mocks": "^1.7.7",
50+
"angular-ui-router": "^1.0.20"
5551
},
5652
"overrides": {
5753
"datatables": {

eslint.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ rules:
1919
no-mixed-spaces-and-tabs: 2
2020
no-multiple-empty-lines: 2
2121
no-trailing-spaces: 2
22-
space-after-keywords: 2
22+
keyword-spacing: 2
2323
space-before-blocks: 2
2424
space-before-function-paren: 0
2525
space-infix-ops: 2
@@ -41,6 +41,3 @@ rules:
4141
dot-notation:
4242
- 2
4343
- {"allowPattern": "^[a-z]+(_[a-z]+)+$"}
44-
45-
ecmaFeatures:
46-
blockBindings: true

grunt-ngdocs-index.tmpl grunt-uidocs-index.tmpl

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<!doctype html>
23
<!--[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]-->
34
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <![endif]-->
@@ -18,7 +19,7 @@
1819
// before the base attribute is added, causing 404 and terribly slow loading of the docs app.
1920
(function() {
2021
var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
21-
origin, baseUrl, rUrl = /(\/?#!\/.*|\/(<%= sections %>)\/?(\?.*)*|\/index[^\.]*\.html.*)$/,
22+
origin, baseUrl, rUrl = /(\/?#!\/.*|\/(examples|api)\/?(\?.*)*|\/index[^\.]*\.html.*)$/,
2223
headEl = document.getElementsByTagName('head')[0],
2324
sync = true;
2425

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

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

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

4849
<% _.forEach(scripts, function(url) { %>
4950
addTag('script', {src: '<%= url %>'}, sync);
5051
<% }); %>
5152
<% if(!deferLoad) { %>
52-
addTag('script', {src: 'js/angular-bootstrap.js'}, sync);
53-
addTag('script', {src: 'js/docs-setup.js'}, sync);
54-
addTag('script', {src: 'js/docs.js'}, sync);
53+
addTag('script', {src: 'js/angular-bootstrap.js'}, sync);
54+
addTag('script', {src: 'js/docs-setup.js'}, sync);
55+
addTag('script', {src: 'js/docs.js'}, sync);
5556
<% } %>
5657
function addTag(name, attributes, sync) {
5758
var el = document.createElement(name),
@@ -178,9 +179,7 @@
178179
<div class="col-md-12">
179180
<!--[if lt IE 7]>
180181
<p class="alert alert-error">Your browser is <em>ancient!</em>
181-
<a href="http://browsehappy.com/">Upgrade to a different browser</a> or
182-
<a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to
183-
experience this site.
182+
<a href="http://browsehappy.com/">Upgrade to a different browser</a> to experience this site.
184183
</p>
185184
<![endif]-->
186185

0 commit comments

Comments
 (0)