Files
meanTorrent/gruntfile.js
2013-08-26 18:16:15 +03:00

90 lines
2.5 KiB
JavaScript

module.exports = function(grunt) {
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
html: {
files: ['public/views/**'],
options: {
livereload: true,
},
},
js: {
files: ['public/js/**'],
options: {
livereload: true,
},
},
css: {
files: ['public/sass/**'],
tasks: ['compass'],
options: {
livereload: true,
force: true
}
}
},
jshint: {
all: ['gruntfile.js']
},
compass: { //Task
dist: { //Target
options: { //Target options
sassDir: 'public/sass',
cssDir: 'public/css',
environment: 'production'
}
},
dev: { //Another target
options: {
sassDir: 'public/sass',
cssDir: 'public/css'
}
}
},
nodemon: {
dev: {
options: {
file: 'server.js',
args: [],
ignoredFiles: ['README.md', 'node_modules/**', '.DS_Store'],
watchedExtensions: ['js'],
watchedFolders: ['app', 'config'],
debug: true,
delayTime: 1,
env: {
PORT: 3000
},
cwd: __dirname
}
},
exec: {
options: {
exec: 'less'
}
}
},
concurrent: {
target: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
}
}
});
//Load NPM tasks
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-concurrent');
//Making grunt default to force in order not to break the project.
grunt.option('force', true);
//Default task(s).
grunt.registerTask('default', ['jshint', 'compass', 'concurrent:target']);
};