Skip to content

Commit

Permalink
- add mixins, custom-properties, and calc plugins to stylis preproces…
Browse files Browse the repository at this point in the history
…sor test

- update stylis to v3.2.0
  • Loading branch information
thysultan committed Jun 30, 2017
1 parent 025f434 commit 834073d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
"stylecow-plugin-variables": "^5.1.1",
"stylus": "^0.54.5",
"through2": "^2.0.3",
"stylis": "^3.0.5"
"stylis": "^3.2.0",
"stylis-mixin": "^0.0.1",
"stylis-calc": "^0.0.1",
"stylis-custom-properties": "^0.0.3"
},
"scripts": {
"lint-staged": "lint-staged",
Expand Down
3 changes: 2 additions & 1 deletion parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ var gonzales = require('gonzales');
var parserlib = require('parserlib');
var gonzalesPe = require('gonzales-pe');
var csstree = require('css-tree');
var stylis = require('stylis');
var Stylis = require('stylis');
var stylis = new Stylis();

module.exports = {
name: 'Bootstrap',
Expand Down
3 changes: 2 additions & 1 deletion prefixers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ var scssFile = path.join(__dirname, 'cache/bootstrap.prefixers.scss');
fs.writeFileSync(scssFile, scss);

// Stylis
var stylis = require('stylis');
var Stylis = require('stylis');
var stylis = new Stylis();

module.exports = {
name: 'Bootstrap',
Expand Down
9 changes: 8 additions & 1 deletion preprocessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ for ( i = 0; i < 100; i++ ) {
}

// Stylis
var stylis = require('stylis');
var Stylis = require('stylis');
var stylis = new Stylis();
var styi = css;
styi += ':root { --size: 100px; }';
for ( i = 0; i < 100; i++ ) {
Expand All @@ -114,6 +115,12 @@ for ( i = 0; i < 100; i++ ) {
styi += '.search { fill: black; width: 16px; height: 16px; }';
}

stylis.use([
require('stylis-mixin'),
require('stylis-calc'),
require('stylis-custom-properties')
]);

module.exports = {
name: 'Bootstrap',
maxTime: 15,
Expand Down

0 comments on commit 834073d

Please sign in to comment.