2022-05-21 20:44:38 -04:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
2022-05-22 03:20:13 -04:00
|
|
|
var pkg = grunt.file.readJSON('package.json')
|
|
|
|
|
2022-05-21 20:44:38 -04:00
|
|
|
// Project configuration.
|
|
|
|
grunt.initConfig({
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
twigRender: {
|
|
|
|
compile: {
|
|
|
|
files : [{
|
|
|
|
data: {},
|
|
|
|
expand: true,
|
|
|
|
cwd: 'assets/twig',
|
|
|
|
src: ['**/*.twig', '!**/_*.twig'],
|
|
|
|
dest: 'public',
|
|
|
|
ext: '.html'
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
copy: {
|
|
|
|
main: {
|
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
cwd: 'assets/static',
|
|
|
|
src: ['**'],
|
|
|
|
dest: 'public/',
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Load task plugins
|
|
|
|
grunt.loadNpmTasks('grunt-twig-render');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-sass');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-coffee');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
|
|
|
|
|
|
// Default task(s).
|
|
|
|
grunt.registerTask('default', ['twigRender', 'sass', 'coffee', 'copy']);
|
|
|
|
|
|
|
|
};
|