Setup Grunt to compile and autoprefix the SASS

Type `npm install` to install all dependencies.
Type `grunt` everytime you want to rebuild the css.
This commit is contained in:
2014-11-20 15:44:54 +01:00
parent b1657cd534
commit a9fea342eb
3 changed files with 34 additions and 2 deletions

2
.gitignore vendored
View File

@@ -6,3 +6,5 @@ blender-bfct/config.py
blender-bfct/runserver.wsgi
node_modules
blender-bfct/application/static/assets/css/main.css
.sass-cache/
*css.map

25
Gruntfile.js Normal file
View File

@@ -0,0 +1,25 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'compressed'
},
files: {
'blender-bfct/application/static/assets/css/main.css': 'blender-bfct/application/static/assets/sass/main.sass'
}
}
},
autoprefixer: {
no_dest: { src: 'blender-bfct/application/static/assets/css/main.css' }
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.registerTask('default', ['sass', 'autoprefixer']);
};

View File

@@ -5,5 +5,10 @@
"url": "git://git.blender.org/blender-bfct.git"
},
"author": "Blender Foundation",
"license": "GPL"
"license": "GPL",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-autoprefixer": "^2.0.0",
"grunt-contrib-sass": "^0.8.1"
}
}