1
1
module . exports = function ( grunt ) {
2
2
'use strict' ;
3
3
4
+ var nodeSass = require ( 'node-sass' ) ;
4
5
require ( 'matchdep' ) . filterDev ( 'grunt-*' ) . forEach ( grunt . loadNpmTasks ) ;
5
6
6
7
function init ( ) {
@@ -19,13 +20,13 @@ module.exports = function (grunt) {
19
20
'grunt build:buttons:notification) otherwise all available modules are built.' ,
20
21
'test' : 'Executes the karma testsuite.' ,
21
22
'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.'
25
26
} ,
26
27
groups : {
27
28
'Basic project tasks' : [ 'help' , 'clean' , 'build' , 'test' ] ,
28
- 'Documentation tasks' : [ 'ngdocs ' , 'ngdocs :view' , 'ngdocs :publish' ]
29
+ 'Documentation tasks' : [ 'uidocs ' , 'uidocs :view' , 'uidocs :publish' ]
29
30
}
30
31
}
31
32
}
@@ -251,6 +252,7 @@ module.exports = function (grunt) {
251
252
'dist/sass/angular-patternfly.css' : [ 'styles/build.scss' ]
252
253
} ,
253
254
options : {
255
+ implementation : nodeSass ,
254
256
outputStyle : 'expanded' ,
255
257
includePaths : [
256
258
'dist/sass' ,
@@ -265,6 +267,7 @@ module.exports = function (grunt) {
265
267
'dist/styles/angular-patternfly.css' : 'styles/angular-patternfly.less'
266
268
} ,
267
269
options : {
270
+ implementation : nodeSass ,
268
271
paths : [ 'src/less/' ] ,
269
272
strictMath : true
270
273
}
@@ -323,7 +326,7 @@ module.exports = function (grunt) {
323
326
force : true
324
327
}
325
328
} ,
326
- ngdocs : {
329
+ 'uidocs-generator' : {
327
330
options : {
328
331
title : 'ANGULAR PATTERNFLY' ,
329
332
dest : 'docs' ,
@@ -354,7 +357,7 @@ module.exports = function (grunt) {
354
357
'node_modules/angular-ui-router/release/angular-ui-router.min.js' ,
355
358
'node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js' ] ,
356
359
html5Mode : false ,
357
- template : 'grunt-ngdocs -index.tmpl' ,
360
+ template : 'grunt-uidocs -index.tmpl' ,
358
361
styles : [ 'node_modules/datatables.net-dt/css/jquery.dataTables.css' ,
359
362
'node_modules/patternfly/dist/css/patternfly.css' ,
360
363
'node_modules/patternfly/dist/css/patternfly-additions.css' ,
@@ -545,24 +548,24 @@ module.exports = function (grunt) {
545
548
'cssmin' ,
546
549
'copymain' ,
547
550
'string-replace' ,
548
- 'ngdocs ' ,
551
+ 'uidocs-generator ' ,
549
552
'clean:templates' ] ) ;
550
553
} ) ;
551
554
552
555
// Runs all the tasks of build with the exception of tests
553
556
grunt . registerTask ( 'deploy' , 'Prepares the project for deployment. Does not run unit tests' , function ( ) {
554
557
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' ] ) ;
556
559
} ) ;
557
560
558
561
grunt . registerTask ( 'default' , [ 'build' ] ) ;
559
- grunt . registerTask ( 'ngdocs :view' , [ 'build' , 'connect:docs' , 'watch' ] ) ;
562
+ grunt . registerTask ( 'uidocs :view' , [ 'build' , 'connect:docs' , 'watch' ] ) ;
560
563
grunt . registerTask ( 'lint' , [ 'eslint' , 'htmlhint' ] ) ;
561
564
grunt . registerTask ( 'test' , [ 'karma' , 'coveralls' ] ) ;
562
565
grunt . registerTask ( 'check' , [ 'lint' , 'test' ] ) ;
563
566
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' ] ) ;
566
569
567
570
}
568
571
0 commit comments