Sentry/Gruntfile.js
Gregory Ballantine dc81ceb04d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
Changed the file root for CSS and JS files to be relative to the current file
2022-05-26 12:29:03 -04:00

108 lines
2.1 KiB
JavaScript

module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json')
// 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/',
}]
}
},
watch: {
html: {
files: ['assets/twig/*.twig', 'assets/twig/**/*.twig'],
tasks: ['twigRender'],
options: {
atBegin: true,
spawn: false
}
},
css: {
files: ['assets/sass/*.sass'],
tasks: ['sass'],
options: {
atBegin: true,
spawn: false
}
},
js: {
files: ['assets/coffee/*.coffee'],
tasks: ['coffee'],
options: {
atBegin: true,
spawn: false
}
},
static: {
files: ['assets/static/*/*'],
tasks: ['copy'],
options: {
atBegin: true,
spawn: false
}
}
}
});
// Load task plugins
grunt.loadNpmTasks('grunt-twig-render');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['twigRender', 'sass', 'coffee', 'copy']);
};