2022-11-25 16:30:22 -05:00
|
|
|
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'
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2024-06-03 12:44:13 -04:00
|
|
|
coffee: {
|
2022-11-25 16:30:22 -05:00
|
|
|
options: {
|
2024-06-03 12:44:13 -04:00
|
|
|
sourceMap: true,
|
|
|
|
style: 'compressed'
|
2022-11-25 16:30:22 -05:00
|
|
|
},
|
2024-06-03 12:44:13 -04:00
|
|
|
files: {
|
|
|
|
expand: true,
|
|
|
|
flatten: true,
|
|
|
|
cwd: 'assets/scripts',
|
|
|
|
src: ['*.coffee'],
|
|
|
|
dest: 'public/js',
|
|
|
|
ext: '.js'
|
2022-11-25 16:30:22 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
css: {
|
|
|
|
files: ['assets/styles/**/*.scss'],
|
|
|
|
tasks: ['sass'],
|
|
|
|
options: {
|
|
|
|
atBegin: true,
|
|
|
|
spawn: false
|
|
|
|
}
|
|
|
|
},
|
2024-06-03 12:44:13 -04:00
|
|
|
coffee: {
|
|
|
|
files: ['assets/scripts/**/*.coffee'],
|
2024-06-03 12:46:22 -04:00
|
|
|
tasks: ['coffee'],
|
2022-11-25 16:30:22 -05:00
|
|
|
options: {
|
|
|
|
atBegin: true,
|
|
|
|
spawn: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Load plugins.
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-sass');
|
2024-06-03 12:44:13 -04:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-coffee');
|
2022-11-25 16:30:22 -05:00
|
|
|
|
|
|
|
// CLI tasks.
|
2024-06-03 12:44:13 -04:00
|
|
|
grunt.registerTask('default', ['sass', 'coffee']);
|
2022-11-25 16:30:22 -05:00
|
|
|
|
|
|
|
};
|