-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
62 lines (53 loc) · 2.21 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
module.exports = function(grunt) {
"use strict";
var theme_name = 'TCG';
var global_vars = {
theme_name: theme_name,
theme_css: 'css',
theme_scss: 'scss'
}
grunt.initConfig({
global_vars: global_vars,
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
outputStyle: 'compressed',
includePaths: ['<%= global_vars.theme_scss %>', require('node-bourbon').includePaths]
},
files: {
'<%= global_vars.theme_css %>/<%= global_vars.theme_name %>.css': '<%= global_vars.theme_scss %>/<%= global_vars.theme_name %>.scss'
}
}
},
copy: {
dist: {
files: [
{expand:true, cwd: 'bower_components/foundation/js', src: ['foundation/*.js'], dest: 'js/', filter: 'isFile'},
{expand:true, cwd: 'bower_components/foundation/', src: ['foundation.min.js'], dest: 'js/', filter: 'isFile'},
{expand:true, cwd: 'bower_components/foundation/js/vendor', src: ['fastclick.js'], dest: 'js/vendor', filter: 'isFile'},
{expand:true, cwd: 'bower_components/foundation/js/vendor', src: ['jquery.cookie.js'], dest: 'js/vendor', filter: 'isFile'},
{expand:true, cwd: 'bower_components/foundation/js/vendor', src: ['modernizr.js'], dest: 'js/vendor', filter: 'isFile'},
{expand:true, cwd: 'bower_components/skrollr/dist', src: ['skrollr.min.js'], dest: 'js/vendor', filter: 'isFile'},
{expand:true, cwd: 'bower_components/foundation/scss/foundation/components', src: '**/*.scss', dest: 'scss/vendor/foundation/components', filter: 'isFile'},
{expand:true, cwd: 'bower_components/foundation/scss/foundation', src: '_functions.scss', dest: 'scss/vendor/foundation', filter: 'isFile'},
]
}
},
watch: {
grunt: { files: ['Gruntfile.js'] },
sass: {
files: '<%= global_vars.theme_scss %>/**/*.scss',
tasks: ['sass'],
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('build', ['sass', 'copy']);
grunt.registerTask('default', ['build', 'watch']);
}