remove grid_units grunt task, add pure_grids task

This commit is contained in:
Tilo Mitra 2014-02-27 18:40:54 -05:00
parent d1ab35aaff
commit e91b2bef4c
2 changed files with 19 additions and 18 deletions

View File

@ -181,10 +181,23 @@ grunt.initConfig({
// -- Grid Units Config ---------------------------------------------------- // -- Grid Units Config ----------------------------------------------------
grid_units: { pure_grids: {
main: {
dest : 'build/grids-units.css', dest : 'build/grids-units.css',
units: [5, 24] units: [5, 24]
}, },
responsive: {
dest: 'build/grids-responsive.css',
options: {
mediaQueries: {
sm : 'screen and (min-width: 35.5em)', // 568px
md: 'screen and (min-width: 48em)', // 768px
lg: 'screen and (min-width: 64em)', // 1024px
xl : 'screen and (min-width: 75em)' // 1200px
}
}
}
},
// -- CSS Selectors Config ------------------------------------------------- // -- CSS Selectors Config -------------------------------------------------
@ -224,6 +237,8 @@ grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-css-selectors'); grunt.loadNpmTasks('grunt-css-selectors');
grunt.loadNpmTasks('grunt-pure-grids');
// Local tasks. // Local tasks.
grunt.loadTasks('tasks/'); grunt.loadTasks('tasks/');
@ -234,7 +249,7 @@ grunt.registerTask('test', ['csslint']);
grunt.registerTask('build', [ grunt.registerTask('build', [
'clean:build', 'clean:build',
'copy:build', 'copy:build',
'grid_units', 'pure_grids',
'concat:build', 'concat:build',
'clean:build_res', 'clean:build_res',
'css_selectors:base', 'css_selectors:base',

View File

@ -1,14 +0,0 @@
'use strict';
var rework = require('rework'),
pureGrids = require('rework-pure-grids');
module.exports = function (grunt) {
grunt.registerTask('grid_units', 'Generates grid units.', function (target) {
var config = grunt.config.get(this.name),
css = rework('').use(pureGrids.units(config.units));
grunt.file.write(config.dest, css.toString({indent: ' '}));
grunt.log.writeln('File "' + config.dest + '" created.');
});
};