Skip to content

Commit 66cae0b

Browse files
author
Walden Raines
committed
Fixes #34: add ng-annotate to build process.
Using ng-annotate in the build process so the verbose, array style, function declarations are no longer needed. Instead they are added automatically during the build process. Also fix the tabbing on some of the examples in the comments.
1 parent 81215c4 commit 66cae0b

File tree

14 files changed

+1753
-1780
lines changed

14 files changed

+1753
-1780
lines changed

Gruntfile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ module.exports = function (grunt) {
158158
dest: 'templates/charts.js'
159159
}
160160
},
161+
// ng-annotate tries to make the code safe for minification automatically
162+
// by using the Angular long form for dependency injection.
163+
ngAnnotate: {
164+
dist: {
165+
files: [{
166+
src: 'dist/angular-patternfly.js',
167+
dest: 'dist/angular-patternfly.js'
168+
}]
169+
}
170+
},
161171
uglify: {
162172
options: {
163173
mangle: false
@@ -198,7 +208,7 @@ module.exports = function (grunt) {
198208
concatSrc = 'src/**/*.js';
199209
}
200210

201-
grunt.task.run(['clean', 'lint', 'test', 'ngtemplates', 'concat', 'uglify:build', 'cssmin', 'copy', 'ngdocs', 'clean:templates']);
211+
grunt.task.run(['clean', 'lint', 'test', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'cssmin', 'copy', 'ngdocs', 'clean:templates']);
202212
});
203213

204214
grunt.registerTask('default', ['build']);

0 commit comments

Comments
 (0)