metaunix-player-js/Gruntfile.js

69 lines
1.3 KiB
JavaScript
Raw Normal View History

module.exports = function(grunt) {
// time the grunt execution time
require('time-grunt')(grunt);
// configure main project settings
grunt.initConfig({
// basic config
pkg: grunt.file.readJSON('package.json'),
// CoffeeScript compiling
coffee: {
compile: {
options: {
sourceMap: false
},
expand: true,
flatten: true,
cwd: 'src/coffee',
src: '*.coffee',
dest: 'build/js',
ext: '.js'
}
},
// SASS compiling
sass: {
compile: {
options: {
style: 'compact'
},
files: [{
expand: true,
cwd: 'src/sass',
src: ['*.sass'],
dest: 'build/css',
ext: '.css'
}]
}
},
// watch sass and CoffeeScript files for live reloading
watch: {
scripts: {
files: [
'src/sass/*.sass',
'src/sass/*.scss',
'src/coffee/*.coffee'
],
tasks: ['sass', 'coffee'],
options: {
spawn: false
}
}
}
});
// load plugins
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
// do the tasks
grunt.registerTask('default', ['coffee', 'sass', 'watch']);
};