mirror of
https://github.com/pure-css/pure.git
synced 2024-11-07 21:34:24 +00:00
Use grunt-pure-grids package
This commit is contained in:
parent
a5b258742b
commit
3340b3371f
14
Gruntfile.js
14
Gruntfile.js
@ -190,11 +190,16 @@ grunt.initConfig({
|
||||
}
|
||||
},
|
||||
|
||||
// -- Grid Units Config ----------------------------------------------------
|
||||
// -- Pure Grids Units Config ----------------------------------------------
|
||||
|
||||
grid_units: {
|
||||
dest : 'build/grids-units.css',
|
||||
pure_grids: {
|
||||
default_units: {
|
||||
dest: 'build/grids-units.css',
|
||||
|
||||
options: {
|
||||
units: [5, 24]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// -- CSS Selectors Config -------------------------------------------------
|
||||
@ -235,6 +240,7 @@ 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/');
|
||||
@ -245,7 +251,7 @@ grunt.registerTask('test', ['csslint']);
|
||||
grunt.registerTask('build', [
|
||||
'clean:build',
|
||||
'copy:build',
|
||||
'grid_units',
|
||||
'pure_grids',
|
||||
'concat:build',
|
||||
'clean:build_res',
|
||||
'css_selectors:base',
|
||||
|
@ -18,6 +18,6 @@
|
||||
"grunt-contrib-csslint": "~0.2.0",
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
"grunt-css-selectors": "~1.0.0",
|
||||
"rework-pure-grids": "~0.3.0"
|
||||
"grunt-pure-grids": "0.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -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.');
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue
Block a user