Created
July 6, 2015 21:22
-
-
Save andreystarkov/df666986a1cf5c52e0f3 to your computer and use it in GitHub Desktop.
This file contains 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) { | |
// var optipng = require('imagemin-optipng'); | |
// var jpegtran = require('imagemin-jpegtran'); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
less: { | |
development: { | |
options: { | |
compress: true, | |
yuicompress: true, | |
optimization: 2 | |
}, | |
files: { | |
"src/dist/css/compiled.css": "src/css/styles.less" | |
} | |
} | |
}, | |
cssmin: { | |
options: { | |
shorthandCompacting: false, | |
roundingPrecision: -1 | |
}, | |
target: { | |
files: { | |
'src/dist/css/all.css': [ | |
'src/dist/css/compiled.css', | |
'src/css/file.css' | |
] | |
} | |
} | |
}, | |
/* copy: { | |
main: { | |
src: 'src/*', | |
dest: 'dest/', | |
}, | |
},*/ | |
uglify: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> | im@andreystarkov.ru */\n', | |
mangle: true | |
}, | |
build: { | |
files: { | |
'src/dist/js/all.js': [ | |
'src/js/file.js', | |
'src/js/file.js' | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-less'); | |
grunt.loadNpmTasks('grunt-contrib-cssmin'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
// grunt.loadNpmTasks('grunt-contrib-copy'); | |
// grunt.loadNpmTasks('grunt-contrib-imagemin'); | |
grunt.registerTask('default', ['less', 'cssmin', 'uglify',]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment