Gruntfile.js
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
dist: {
files:
[
{
expand: true,
cwd: 'css',
src: ['*.less'],
dest: 'css',
ext: '.css'
}
]
}
},
watch: {
options: {
nospawn: true
},
css: {
files: [
'css/*.less',
],
tasks: ['less'],
options: {
livereload: true
}
}
},
concat: {
dist: {
src: ['css/**/*.css'],
dest: 'css/build.dest.css'
}
},
ui_docs: {
mydocs: {
title: 'css-docs', // documentation page title
docsPath: 'docs/styleguide/', // path where you want to generate the styleguide
docsAssetsPath: 'assets/', // relative to docsPath
docsUIDocsAssetsPath: 'css/', // relative to docsAssetsPath
rawAssetsDir: 'css/', // path to the assets you want to document
// js: {
// rawDir: 'js/', // relative to rawAssetsDir
// validExtensions: ['.js', '.coffe'],
// ignore: ['**/vendor/**', '**/vendor-setup/**']
// },
css: {
rawDir: 'css/', // relative to rawAssetsDir
validExtensions: ['css'],
// ['.scss', '.css', '.sass', '.styl', '.less'],
ignore: ['**/bourbon/**'],
builtFilePaths: ['css/build.dest.css'], // path to the generated sass file(s)
outputDir: './' // relative to rawAssetsDir
}
}
},
/* apidoc: { */
// myapp: {
// src: 'js/',
// dest: 'docs/apiguide/',
// options: {
// debug: true,
// includeFilters: [ ".*\\.js$" ],
// excludeFilters: [ "node_modules/" ]
// }
// }
/* } */
jsdoc : {
dist : {
src: ['js/**/*.js', 'README.md'],
options: {
destination : 'docs/jsdoc',
template : "node_modules/ink-docstrap/template",
configure : "node_modules/ink-docstrap/template/jsdoc.conf.json"
}
}
}
});
grunt.loadNpmTasks( "grunt-contrib-less" );
grunt.loadNpmTasks( "grunt-contrib-watch" );
grunt.loadNpmTasks( "grunt-contrib-concat" );
grunt.loadNpmTasks( "grunt-ui-docs" );
grunt.loadNpmTasks( "grunt-apidoc" );
grunt.loadNpmTasks( "grunt-jsdoc" );
// grunt.loadNpmTasks('grunt-spritesmith');
grunt.registerTask('default', [
'less', 'watch'
]);
};