Created
October 13, 2012 07:48
-
-
Save conspirator/3883732 to your computer and use it in GitHub Desktop.
A sample grunt file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: '<json:package.json>', | |
meta: { | |
banner: '/* \n' + | |
' * \tAuthor:\t\t<%= pkg.name %>\n' + | |
' * \tWebsite:\t<%= pkg.website %>\n' + | |
' * \tTwitter:\thttp://twitter.com/<%= pkg.twitter %>\n' + | |
' * \n' + | |
' * \tTitle:\t\t<%= pkg.title %>\n' + | |
' * \tBuild:\t\t<%= grunt.template.today("yyyymmddhhmmss") %>\n' + | |
' * \n' + | |
' */' | |
}, | |
coffee: { | |
app: { | |
src: ['coffee/*.coffee'], | |
dest: 'js/source/' | |
} | |
}, | |
concat: { | |
'js/app.js': [ | |
'js/lib/jquery.min.js', | |
'js/lib/underscore.min.js', | |
'js/lib/backbone.min.js', | |
'js/lib/mustache.js', | |
'js/source/*.js' | |
], | |
}, | |
min: { | |
'js/app.min.js': ['<banner:meta.banner>', 'js/app.js'] | |
}, | |
compass: { | |
dev: { | |
src: 'sass/', | |
dest: 'css', | |
linecomments: false, | |
forcecompile: true, | |
debugsass: false, | |
images: 'images', | |
relativeassets: true | |
} | |
}, | |
watch: { | |
files: ['coffee/*.coffee', 'sass/*.sass'], | |
tasks: 'default' | |
} | |
}); | |
grunt.loadNpmTasks('grunt-coffee'); | |
grunt.loadNpmTasks('grunt-compass'); | |
grunt.registerTask('default', 'compass:dev coffee concat min watch'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Project name", | |
"name": "Your name", | |
"website": "http://foobarbaz.com", | |
"twitter": "gruber" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment