Skip to content

Instantly share code, notes, and snippets.

@Nevraeka
Created January 29, 2014 19:47
Show Gist options
  • Save Nevraeka/8695535 to your computer and use it in GitHub Desktop.
Save Nevraeka/8695535 to your computer and use it in GitHub Desktop.
Sample Gruntfile for prototyping
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
concat: {
dest: {
files: {
'public/js/p3c.js': [
'app/assets/js/*.js',
'app/assets/js/services/*.js',
'app/assets/js/controllers/*.js',
'app/assets/js/controllers/**/*.js',
'app/assets/js/filters/*.js',
'app/assets/js/directives/*.js',
'app/assets/js/config.js'
],
'public/css/p3c.css': [
'compiled/css/app.css'
]
}
}
},
stylus: {
development: {
options: {
paths: ['app/assets/css']
},
files: {
"compiled/css/app.css" : [
"app/assets/css/fonts.styl",
"app/assets/css/lib/*.styl",
"app/assets/css/components/*.styl",
"app/assets/css/app.styl"
]
}
}
},
jshint: {
all: [
'Gruntfile.js',
'app/assets/js/*.js',
'app/assets/js/**/*.js'
]
},
watch: {
files: [
'Gruntfile.js',
'app/assets/js/*.js',
'app/assets/js/**/*.js',
'app/assets/css/**/*.styl',
'app/assets/css/*.styl'
],
tasks: ["build:assets"]
}
});
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-concat");
return grunt.registerTask("build:assets", [
"stylus",
"jshint",
"concat"
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment