Skip to content

Instantly share code, notes, and snippets.

@pedrorvidal
Forked from jshawl/Gruntfile.js
Created July 6, 2016 19:32
Show Gist options
  • Save pedrorvidal/3211d2e9706019aa0e6e701e2992773b to your computer and use it in GitHub Desktop.
Save pedrorvidal/3211d2e9706019aa0e6e701e2992773b to your computer and use it in GitHub Desktop.
Grunt + Sass + Autoprefixer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
}
}
},
autoprefixer:{
dist:{
files:{
'css/style.css':'css/style.css'
}
}
},
watch: {
css: {
files: 'scss/*.scss',
tasks: ['sass', 'autoprefixer']
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.registerTask('default',['watch']);
}
{
"name": "jshawl.com",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-sass": "~0.3.0",
"grunt-contrib-watch": "~0.4.4",
"grunt-autoprefixer": "~0.2.20130806"
}
}
@pedrorvidal
Copy link
Author

pedrorvidal commented Jul 6, 2016

Seguir a mesma ideia mas usar este autoprefixe:
http://grunt-tasks.com/autoprefixer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment