archon/Gruntfile.js

66 lines
1.3 KiB
JavaScript
Raw Normal View History

module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json')
// Project configuration.
grunt.initConfig({
'dart-sass': {
dist: {
options: {
style: 'compressed'
},
files: [{
expand: true,
cwd: 'assets/sass',
src: ['*.sass'],
dest: 'public/styles',
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/sass/*.sass'],
tasks: ['dart-sass'],
options: {
atBegin: true,
spawn: false
}
},
js: {
files: ['assets/coffee/*.coffee'],
tasks: ['coffee'],
options: {
atBegin: true,
spawn: false
}
}
}
});
// Load task plugins
grunt.loadNpmTasks('grunt-dart-sass');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['dart-sass', 'coffee']);
};