Skip to content

Commit

Permalink
updated grunt task
Browse files Browse the repository at this point in the history
  • Loading branch information
dethe committed Oct 27, 2012
1 parent 71755c8 commit 0001734
Showing 1 changed file with 64 additions and 5 deletions.
69 changes: 64 additions & 5 deletions grunt.js
@@ -1,8 +1,18 @@
// Default oBloq Grunt Tasks
// Modify to suit your project
// Requires grunt and grunt-contrib npm modules
// Todo: support server and globals separation
// Todo: default tasks for handlebars, stylus
//
// Note: expects to find oBloq files in bloqs subdirectory
// Will build (and erase each time) directories 'build', 'docs', and 'web'


module.exports = function(grunt){
grunt.initConfig({
clean: {
// Clean will recursively delete entire directories. Be careful
all: ['build','docs']
all: ['build','docs','web']
},
extract: {
build: ['bloqs/*.md', 'bloqs/**/*.md']
Expand All @@ -17,11 +27,60 @@ module.exports = function(grunt){
options: {
browser: true
}
},
coffee:{
compile: {
files: {
'build/*.js': ['build/*.coffee', 'build/**/*.coffee'],
}
}
},
less: {
development: {
options: {
paths: ['build']
},
files: {
'build/*.css': 'build/*.less'
}
},
production: {
options: {
paths: ['build'],
yuicompress: true
},
files: {
'build/*.css': 'build/*.less'
}
}
},
copy: {
dist: {
files: {
'web/views/': ['build/*.html', 'build/**/*.html']
}
}
},
concat: {
js: {
src: ['build/*.js', 'build/**/*.js'],
dest: 'web/script.js'
},
css: {
src: ['build/*.css', 'build/**.css'],
dest: 'web/style.css'
}
},
min: {
dist:{
src: 'web/script.js',
dest: 'web/script.min.js'
}
}
});

// load extract task
grunt.loadTasks('tasks');

grunt.registerTask('default', 'clean extract doc');
grunt.loadNpmTasks('obloq');
grunt.loadNpmTasks('grunt-contrib');
grunt.registerTask('default', 'clean extract doc less coffee lint concat min');
};

0 comments on commit 0001734

Please sign in to comment.