Converted from coffeescript to javascript for frontend scripts (to much pain)
This commit is contained in:
68
Gruntfile.js
68
Gruntfile.js
@ -1,65 +1,65 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
module.exports = function (grunt) {
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
pkg: grunt.file.readJSON("package.json"),
|
||||
|
||||
sass: {
|
||||
dist: {
|
||||
options: {
|
||||
style: 'compressed'
|
||||
style: "compressed",
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'assets/styles',
|
||||
src: ['**/*.sass'],
|
||||
dest: 'public/css',
|
||||
ext: '.css'
|
||||
}]
|
||||
}
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
cwd: "assets/styles",
|
||||
src: ["**/*.sass"],
|
||||
dest: "public/css",
|
||||
ext: ".css",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
coffee: {
|
||||
uglify: {
|
||||
options: {
|
||||
sourceMap: true,
|
||||
style: 'compressed'
|
||||
compress: true,
|
||||
},
|
||||
files: {
|
||||
expand: true,
|
||||
flatten: true,
|
||||
cwd: 'assets/scripts',
|
||||
src: ['*.coffee'],
|
||||
dest: 'public/js',
|
||||
ext: '.js'
|
||||
}
|
||||
cwd: "assets/scripts",
|
||||
src: ["*.js"],
|
||||
dest: "public/js",
|
||||
ext: ".js",
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
css: {
|
||||
files: ['assets/styles/**/*.sass'],
|
||||
tasks: ['sass'],
|
||||
files: ["assets/styles/**/*.sass"],
|
||||
tasks: ["sass"],
|
||||
options: {
|
||||
atBegin: true,
|
||||
spawn: false
|
||||
}
|
||||
spawn: false,
|
||||
},
|
||||
},
|
||||
js: {
|
||||
files: ['assets/scripts/**/*.coffee'],
|
||||
tasks: ['coffee'],
|
||||
files: ["assets/scripts/**/*.js"],
|
||||
tasks: ["uglify"],
|
||||
options: {
|
||||
atBegin: true,
|
||||
spawn: false
|
||||
}
|
||||
}
|
||||
}
|
||||
spawn: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Load plugins.
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-coffee');
|
||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
||||
grunt.loadNpmTasks("grunt-contrib-sass");
|
||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||
|
||||
// CLI tasks.
|
||||
grunt.registerTask('default', ['sass', 'coffee']);
|
||||
|
||||
grunt.registerTask("default", ["sass", "uglify"]);
|
||||
};
|
||||
|
Reference in New Issue
Block a user