Created
February 8, 2015 20:03
-
-
Save fakiolinho/c5b85586150eb08689f8 to your computer and use it in GitHub Desktop.
Grunt: Publish project
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) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
compass: { | |
dist: { | |
options: { | |
sassDir: 'css/sass', | |
cssDir: 'css', | |
outputStyle: 'compressed' | |
} | |
}, | |
dev: { | |
options: { | |
sassDir: 'css/sass', | |
cssDir: 'css', | |
outputStyle: 'expanded', | |
} | |
} | |
}, | |
concat: { | |
options: { | |
separator: ';' | |
}, | |
dist: { | |
src: ['js/jquery.min.js', 'js/bootstrap.min.js', 'js/jquery.validate.min.js', 'js/wow.min.js', 'js/app.js'], | |
dest: 'js/home.js' | |
} | |
}, | |
uglify: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' | |
}, | |
build: { | |
src: 'js/home.js', | |
dest: 'js/home.min.js' | |
} | |
}, | |
cssmin: { | |
target: { | |
files: { | |
'css/home.min.css': ['css/bootstrap.min.css', 'css/animate.css', 'css/home.css'] | |
} | |
} | |
}, | |
watch: { | |
files: ['css/sass/*.sass'], | |
tasks: ['compass:dev', 'cssmin', 'concat', 'uglify'] | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-cssmin'); | |
grunt.registerTask('default', ['watch']); | |
grunt.registerTask('final', ['compass:dist', 'concat', 'uglify', 'cssmin']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment