-
-
Save cr0ybot/14505111a279f48fd750 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) { | |
require('load-grunt-tasks')(grunt); | |
require('grunt-postcss')(grunt); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
options: { | |
sourceMap: false | |
}, | |
dev: { | |
options:{ | |
outputStyle:'expanded' | |
}, | |
files: { | |
// Must specify each individual CSS file here | |
'css/styles.css' : 'scss/styles.scss' | |
} | |
}, | |
dist: { | |
options:{ | |
outputStyle:'compressed' | |
}, | |
files: { | |
// Must specify each individual CSS file here | |
'css/styles.css' : 'scss/styles.scss' | |
} | |
} | |
}, | |
postcss:{ | |
options:{ | |
remove: false, | |
map: false, | |
processors: [ | |
require('autoprefixer-core')({ | |
browsers: ['last 2 versions'] | |
}) | |
] | |
}, | |
dist:{ | |
src: 'css/*.css' | |
} | |
}, | |
watch: { | |
options: { | |
// Switch to true if using livereload | |
livereload: false | |
}, | |
css: { | |
files: 'scss/**/*.scss', | |
tasks: ['sass:dev', 'postcss:dist'] | |
} | |
} | |
}); | |
grunt.registerTask('default',['watch']); | |
grunt.registerTask('build',['sass:dist','postcss:dist']); | |
} |
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
{ | |
"name": "NAME", | |
"version": "1.0.0", | |
"devDependencies": { | |
"autoprefixer-core": "^5.2.0", | |
"grunt": "^0.4.5", | |
"grunt-contrib-watch": "^0.6.1", | |
"grunt-postcss": "^0.5.1", | |
"grunt-sass": "^1.0.0", | |
"load-grunt-tasks": "^3.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment