Socket
Socket
Sign inDemoInstall

rework

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rework - npm Package Compare versions

Comparing version 0.10.2 to 0.11.0

2

component.json
{
"name": "rework",
"version": "0.10.2",
"version": "0.11.0",
"description": "CSS manipulations built on CSSOM",

@@ -5,0 +5,0 @@ "keywords": ["css", "manipulation", "preprocess", "transform"],

0.11.0 / 2013-01-16
==================
* fix extend nesting. Closes #22
* fix hyphenated property references. Closes #20
0.10.2 / 2012-12-14

@@ -3,0 +9,0 @@ ==================

@@ -18,4 +18,4 @@

if (!rule.declarations) return;
rule.selectors.forEach(function(selector){
map[selector] = rule;
rule.selectors.forEach(function(sel){
map[sel] = rule;
});

@@ -41,10 +41,19 @@ visit(rule, map);

if (!/^extends?$/.test(key)) continue;
var extend = map[val];
if (!extend) throw new Error('failed to extend "' + val + '"');
debug('extend %j with %j', rule.selectors, extend.selectors);
extend.selectors = extend.selectors.concat(rule.selectors);
var keys = Object.keys(map);
keys.forEach(function(key){
if (0 != key.indexOf(val)) return;
var extend = map[key];
var suffix = key.replace(val, '');
debug('extend %j with %j', rule.selectors, extend.selectors);
extend.selectors = extend.selectors.concat(rule.selectors.map(function(sel){
return sel + suffix;
}));
});
rule.declarations.splice(i--, 1);
}
}
}

@@ -44,9 +44,9 @@

decl.value = val.replace(/@(\w+)/g, function(_, name){
decl.value = val.replace(/@([-\w]+)/g, function(_, name){
if (null == map[name]) throw new Error('@' + name + ' is not defined in this scope');
return map[name];
});
map[key] = decl.value;
}
}
}
{
"name": "rework",
"version": "0.10.2",
"version": "0.11.0",
"description": "CSS manipulations built on CSSOM",

@@ -5,0 +5,0 @@ "keywords": ["css", "manipulation", "preprocess", "transform"],

@@ -6,10 +6,90 @@

var whitespace = require('css-whitespace');
str = whitespace(str);
var mixins = require('rework-mixins');
console.log(rework(str)
var vendors = ['-ms-', '-moz-', '-webkit-'];
var props = [
'animation',
'animation-delay',
'animation-direction',
'animation-duration',
'animation-fill-mode',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
'appearance',
'background-visibility',
'background-clip',
'background-composite',
'background-origin',
'background-size',
'blend-mode',
'border-bottom-left-radius',
'border-bottom-right-radius',
'border-fit',
'border-image',
'border-radius',
'border-top-left-radius',
'border-top-right-radius',
'border-vertical-spacing',
'box-align',
'box-direction',
'box-flex',
'box-flex-group',
'box-lines',
'box-ordinal-group',
'box-orient',
'box-pack',
'box-reflect',
'box-shadow',
'box-sizing',
'clip-path',
'flex',
'flex-basis',
'flex-direction',
'flex-flow',
'flex-grow',
'flex-shrink',
'flex-wrap',
'flex-flow-from',
'flex-flow-into',
'font-smoothing',
'transform',
'transform-origin',
'transform-origin-x',
'transform-origin-y',
'transform-origin-z',
'transform-style',
'transition',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
'user-drag',
'user-modify',
'user-select',
'wrap',
'wrap-flow',
'wrap-margin',
'wrap-padding',
'wrap-through'
];
str = whitespace(str);
str = rework(str)
.vendors(vendors)
.use(rework.colors())
.use(rework.mixins(mixins))
.toString());
.use(rework.references())
.use(rework.keyframes())
.use(rework.ease())
.use(rework.prefixValue('transform'))
.use(rework.prefix(props))
.use(rework.mixin(mixins))
.use(rework.at2x())
.toString();
console.log(str);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc