Skip to content

Commit

Permalink
Cleanup script
Browse files Browse the repository at this point in the history
  • Loading branch information
asafdav committed Oct 19, 2014
1 parent d522975 commit b074a35
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion Gruntfile.js
Expand Up @@ -73,6 +73,22 @@ module.exports = function (grunt) {
tasks: ['default']
},

// Empties folders to start fresh
clean: {
dist: {
files: [{
dot: false,
src: [
'.tmp',
'dist{,*/}*',
'!dist/.git*'
]
}]
},
server: '.tmp'
},

// Create examples folder to be deployed to github pages
copy: {
dist: {
files: [
Expand All @@ -90,6 +106,7 @@ module.exports = function (grunt) {
}
},

// Deploy
buildcontrol: {
options: {
dir: 'dist',
Expand All @@ -114,11 +131,12 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-build-control');

grunt.registerTask('test', ['jshint', 'karma:unit']);
grunt.registerTask('default', ['jshint:beforeConcat', 'concat', 'jshint:afterConcat', 'uglify']);
grunt.registerTask('livereload', ['default', 'watch']);
grunt.registerTask('deploy', ['copy:dist', 'buildcontrol:pages']);
grunt.registerTask('deploy', ['clean:dist', 'copy:dist', 'buildcontrol:pages']);

};
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -24,7 +24,7 @@
"grunt": "~0.4.1",
"grunt-build-control": "^0.1.3",
"grunt-concurrent": "^0.3.1",
"grunt-contrib-clean": "^0.4.1",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-coffee": "^0.7.0",
"grunt-contrib-compass": "^0.3.0",
"grunt-contrib-concat": "^0.3.0",
Expand Down

0 comments on commit b074a35

Please sign in to comment.