Created
April 16, 2014 12:28
-
-
Save fakiolinho/10865931 to your computer and use it in GitHub Desktop.
Grunt: Compass - JS
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: { // Task | |
dist: { // Target | |
options: { // Target options | |
sassDir: 'css/sass', | |
cssDir: 'css', | |
outputStyle: 'expanded', | |
environment: 'production' | |
} | |
}, | |
dev: { // Another target | |
options: { | |
sassDir: 'css/sass', | |
cssDir: 'css' | |
} | |
} | |
}, | |
cssmin: { | |
add_banner: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' | |
}, | |
files: { | |
'css/final.min.css': ['css/reset.css', 'css/fonts.css', 'css/style.css', 'css/jquery.fancybox.css', 'css/solarized_dark.css', 'css/animations.css', 'css/faki.css'] | |
} | |
} | |
}, | |
concat: { | |
options: { | |
separator: ';' | |
}, | |
dist: { | |
src: ['js/jquery-1.10.2.min.js', 'js/jquery.easytabs.min.js', 'js/respond.min.js', 'js/jquery.fancybox.pack.js', 'js/jquery.isotope.min.js', 'js/jquery-ui-map.js', 'js/jquery.carouFredSel.js', 'js/jquery.validate.min.js', 'js/highlight.pack.js', 'js/plugins.js', 'js/custom.js', 'js/faki.js'], | |
dest: 'js/vendor.js' | |
} | |
}, | |
uglify: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' | |
}, | |
build: { | |
src: 'js/vendor.js', | |
dest: 'js/vendor.min.js' | |
} | |
}, | |
watch: { | |
files: ['css/sass/*.sass'], | |
tasks: ['compass'] | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-cssmin'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('default', ['compass', 'watch', 'concat', 'uglify', 'cssmin']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment