-
Notifications
You must be signed in to change notification settings - Fork 33
/
Gruntfile.js
47 lines (42 loc) · 1.37 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
module.exports = function(grunt) {
// Load tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
// Metadata
pkg : grunt.file.readJSON('package.json'),
// Variables
paths : {
// Base dir assets dir
base : 'client',
// PHP assets
php : {
files_std : ['*.php', '**/*.php', '!node_modules/**/*.php'], // Standard file match
files : '<%= paths.php.files_std %>' // Dynamic file match
},
// JavaScript assets
js : {
base : 'js', // Base dir
src : '<%= paths.js.base %>/dev', // Development code
dest : '<%= paths.js.base %>/prod', // Production code
files_std : '**/<%= paths.js.src %>/**/*.js', // Standard file match
files : '<%= paths.js.files_std %>' // Dynamic file match
},
// Sass assets
sass : {
src : 'sass', // Source files dir
dest : 'css', // Compiled files dir
ext : '.css', // Compiled extension
target : '*.scss', // Only Sass files in CWD
exclude : '!_*.scss', // Do not process partials
base_src : '<%= paths.base %>/<%= paths.sass.src %>', // Base source dir
base_dest : '<%= paths.base %>/<%= paths.sass.dest %>', // Base compile dir
}
},
});
// Load task configurations
grunt.loadTasks('grunt');
// Default Tasks
grunt.registerTask('build', ['jshint:all', 'uglify', 'sass']);
grunt.registerTask('watch_all', ['watch:js', 'watch:sass']);
};