forked from pattern-lab/patternlab-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
70 lines (66 loc) · 1.95 KB
/
Gruntfile.js
File metadata and controls
70 lines (66 loc) · 1.95 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ['./public/patterns'],
copy: {
main: {
files: [
{ expand: true, cwd: './source/js/', src: '*', dest: './public/js/'},
{ expand: true, cwd: './source/css/', src: 'style.css', dest: './public/css/' },
{ expand: true, cwd: './source/images/', src: '*', dest: './public/images/' },
{ expand: true, cwd: './source/images/sample/', src: '*', dest: './public/images/sample/'},
{ expand: true, cwd: './source/fonts/', src: '*', dest: './public/fonts/'}
]
}
},
jshint: {
options: {
"curly": true,
"eqnull": true,
"eqeqeq": true,
"undef": true,
"forin": true,
//"unused": true,
"node": true
},
patternlab: ['Gruntfile.js', './builder/lib/patternlab.js']
},
watch: {
// scss: { //scss can be watched if you like
// files: ['source/css/**/*.scss', 'public/styleguide/css/*.scss'],
// tasks: ['default']
// },
mustache: {
files: ['source/_patterns/**/*.mustache'],
tasks: ['default']
},
data: {
files: ['source/_patterns/**/*.json'],
tasks: ['default']
}
},
sass: {
build: {
options: {
style: 'expanded',
precision: 8
},
files: {
'./source/css/style.css': './source/css/style.scss',
'./public/styleguide/css/static.css': './public/styleguide/css/static.scss',
'./public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-jshint');
//load the patternlab task
grunt.task.loadTasks('./builder/');
//if you choose to use scss, or any preprocessor, you can add it here
grunt.registerTask('default', ['clean', 'patternlab', /*'sass',*/ 'copy']);
};