forked from nobitagit/react-material-floating-button
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
105 lines (95 loc) · 2.24 KB
/
Gruntfile.js
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
103
104
105
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
css: {
files: '**/*.scss',
tasks: ['sass:base']
},
js: {
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
tasks: ['jshint:all']
}
},
sass: {
base: {
files: {
'src/styles/style.css': 'src/styles/style.scss'
}
}
},
clean: {
check: ['.grunt/grunt-gh-pages/gh-pages/check'],
live: 'gh-pages_temp'
},
jshint: {
options: {
jshintrc : true
},
all: ['Gruntfile.js', 'build/mfb-menu.js']
},
useminPrepare: {
html: 'gh-pages_tem/index.html',
options: {
//dest: 'gh-pages_tem/index.html'
}
},
usemin: {
html: ['gh-pages_temp/index.html']
},
copy: {
live: {
files: [{
src: ['demo/index.html', 'demo/index.css', 'demo/bundle.js'],
dest: 'gh-pages_temp',
expand: true, flatten: true
},{
src: ['mfb/src/*.css', 'mfb/src/*.css.map', 'mfb/src/lib/**/*.js'],
dest: 'gh-pages_temp',
expand: true, flatten: true
}]
}
},
'gh-pages': {
options: {
base: 'gh-pages_temp/',
},
'live': {
src: ['*']
},
'check': {
options: {
push: false
},
src: ['*']
}
}
});
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-usemin');
// Publish this to live site
grunt.registerTask('live', [
'clean:live',
'useminPrepare',
'copy:live',
'usemin',
'gh-pages:live'
]);
// Live site dry run
grunt.registerTask('livecheck', [
'clean:check',
'useminPrepare',
'copy:live',
'usemin',
'clean:check','gh-pages:check'
]);
grunt.registerTask('watch-css', ['watch:css']);
grunt.registerTask('watch-js', ['watch:js']);
grunt.registerTask('default', []);
};