66 lines
1.2 KiB
JavaScript
66 lines
1.2 KiB
JavaScript
module.exports = function(grunt) {
|
|
|
|
// Project configuration.
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
|
|
sass: {
|
|
dist: {
|
|
options: {
|
|
style: 'compressed'
|
|
},
|
|
files: [{
|
|
expand: true,
|
|
cwd: 'assets/styles',
|
|
src: ['**/*.scss'],
|
|
dest: 'public/css',
|
|
ext: '.css'
|
|
}]
|
|
}
|
|
},
|
|
|
|
coffee: {
|
|
options: {
|
|
sourceMap: true,
|
|
style: 'compressed'
|
|
},
|
|
files: {
|
|
expand: true,
|
|
flatten: true,
|
|
cwd: 'assets/coffee',
|
|
src: ['*.coffee'],
|
|
dest: 'public/js',
|
|
ext: '.js'
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
css: {
|
|
files: ['assets/styles/**/*.scss'],
|
|
tasks: ['sass'],
|
|
options: {
|
|
atBegin: true,
|
|
spawn: false
|
|
}
|
|
},
|
|
js: {
|
|
files: ['assets/coffee/*.coffee'],
|
|
tasks: ['coffee'],
|
|
options: {
|
|
atBegin: true,
|
|
spawn: false
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
// Load plugins.
|
|
grunt.loadNpmTasks('grunt-contrib-sass');
|
|
grunt.loadNpmTasks('grunt-contrib-coffee');
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
|
// Default task(s).
|
|
grunt.registerTask('default', ['sass', 'coffee']);
|
|
|
|
};
|