123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- module.exports = function (grunt) {
- grunt.initConfig({
- watch: {
- compass: {
- files: ['scss/styles.scss', 'scss/wysiwyg.scss'],
- tasks: ['compass:dev']
- },
- postcss: {
- files: ['css/styles.css', 'css/wysiwyg.css'],
- tasks: ['postcss']
- },
- // options: {
- // livereload: true,
- // },
- },
- compass: {
- dev: {
- options: {
- sassDir: 'scss',
- cssDir: 'css',
- imagesPath: 'img',
- noLineComments: false,
- // outputStyle: 'compressed'
- }
- }
- },
- postcss: {
- options: {
- processors: [
- require('autoprefixer-core')({
- browsers: ['> 1%'] //, 'ie 8', 'ie 7', 'FirefoxAndroid', 'ExplorerMobile', 'ChromeAndroid'
- }).postcss,
- ]
- },
- dist: { src: 'css/*.css' }
- },
- svg2png: {
- assets: {
- // specify files in array format with multiple src-dest mapping
- files: [
- // rasterize all SVG files in "img" and its subdirectories to "img/png"
- // { src: ['assets/img/*.svg'], dest: 'assets/img/png/' },
- // rasterize SVG file to same directory
- { src: ['img/*.svg'] }
- ]
- }
- }
- });
- grunt.loadNpmTasks('grunt-contrib-compass');
- grunt.loadNpmTasks('grunt-contrib-sass');
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-postcss');
- grunt.loadNpmTasks('grunt-svg2png');
- grunt.registerTask('default', ['svg2png']);
- };
|