mirror of
https://github.com/pure-css/pure
synced 2025-02-16 03:24:27 +01:00
Revert "remove grid_units grunt task, add pure_grids task"
This reverts commit e91b2bef4c
.
This commit is contained in:
parent
e91b2bef4c
commit
c4f2a087ef
23
Gruntfile.js
23
Gruntfile.js
@ -181,22 +181,9 @@ grunt.initConfig({
|
||||
|
||||
// -- Grid Units Config ----------------------------------------------------
|
||||
|
||||
pure_grids: {
|
||||
main: {
|
||||
dest : 'build/grids-units.css',
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
grid_units: {
|
||||
dest : 'build/grids-units.css',
|
||||
units: [5, 24]
|
||||
},
|
||||
|
||||
// -- CSS Selectors Config -------------------------------------------------
|
||||
@ -237,8 +224,6 @@ grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-compress');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-css-selectors');
|
||||
grunt.loadNpmTasks('grunt-pure-grids');
|
||||
|
||||
|
||||
// Local tasks.
|
||||
grunt.loadTasks('tasks/');
|
||||
@ -249,7 +234,7 @@ grunt.registerTask('test', ['csslint']);
|
||||
grunt.registerTask('build', [
|
||||
'clean:build',
|
||||
'copy:build',
|
||||
'pure_grids',
|
||||
'grid_units',
|
||||
'concat:build',
|
||||
'clean:build_res',
|
||||
'css_selectors:base',
|
||||
|
14
tasks/grid_units.js
Normal file
14
tasks/grid_units.js
Normal file
@ -0,0 +1,14 @@
|
||||
'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.');
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue
Block a user