Skip to content

Commit

Permalink
3.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Frischmann committed Mar 8, 2017
1 parent 1e8b248 commit d10d4bb
Show file tree
Hide file tree
Showing 12 changed files with 2,197 additions and 307 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog

## 3.0

### 3.0.1
* performance improvements (~10% faster) ( [#115](https://github.com/rofrischmann/inline-style-prefixer/pull/115) ) ( [#116](https://github.com/rofrischmann/inline-style-prefixer/pull/116) )
* ordering prefixed properties correctly ( [#117](https://github.com/rofrischmann/inline-style-prefixer/pull/117) )

### 3.0.0

#### Complete Rewrite
Expand All @@ -10,6 +15,8 @@
* new documentation using gitbook
* integrated flowtype

------

## 2.0
### 2.0.5
* added style sorting to prepend prefixed properties ( [#105](https://github.com/rofrischmann/inline-style-prefixer/issues/105) )
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ If you're still using npm, you may run `npm i --save inline-style-prefixer`.
We also provide [UMD](https://github.com/umdjs/umd) builds for each package in the `dist` folder. You can easily use them via [unpkg](https://unpkg.com/).
```HTML
<!-- Unminified versions -->
<script src="https://unpkg.com/[email protected].0/dist/inline-style-prefixer.js"></script>
<script src="https://unpkg.com/[email protected].0/dist/inline-style-prefix-all.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/inline-style-prefixer.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/inline-style-prefix-all.js"></script>
<!-- Minified versions -->
<script src="https://unpkg.com/[email protected].0/dist/inline-style-prefixer.min.js"></script>
<script src="https://unpkg.com/[email protected].0/dist/inline-style-prefix-all.min.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/inline-style-prefixer.min.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/inline-style-prefix-all.min.js"></script>
```

## Browser Support
Expand Down
2 changes: 1 addition & 1 deletion benchmark/packages/301/static/createPrefixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function createPrefixer(_ref) {
style[property] = _processedValue;
}

(0, _prefixProperty2.default)(prefixMap, property, style);
style = (0, _prefixProperty2.default)(prefixMap, property, style);
}
}

Expand Down
26 changes: 21 additions & 5 deletions benchmark/packages/301/utils/prefixProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@ var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function prefixProperty(prefixProperties, property, style) {
if (prefixProperties.hasOwnProperty(property)) {
var requiredPrefixes = prefixProperties[property];
for (var i = 0, len = requiredPrefixes.length; i < len; ++i) {
style[requiredPrefixes[i] + (0, _capitalizeString2.default)(property)] = style[property];
}
if (!prefixProperties.hasOwnProperty(property)) {
return style;
}

// We need to preserve the order of the styles while inserting new prefixed
// styles. Object order is not guaranteed, but this is better than nothing.
// Note that this is brittle and is likely to break in older versions of
// Node (e.g. Node 4).
var newStyle = {};
Object.keys(style).forEach(function (styleProperty) {
if (styleProperty === property) {
// We've found the style we need to prefix.
var requiredPrefixes = prefixProperties[property];
for (var i = 0, len = requiredPrefixes.length; i < len; ++i) {
newStyle[requiredPrefixes[i] + (0, _capitalizeString2.default)(property)] = style[property];
}
}

newStyle[styleProperty] = style[styleProperty];
});

return newStyle;
}
module.exports = exports['default'];
45 changes: 30 additions & 15 deletions dist/inline-style-prefix-all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/inline-style-prefix-all.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/inline-style-prefix-all.min.js

Large diffs are not rendered by default.

61 changes: 38 additions & 23 deletions dist/inline-style-prefixer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/inline-style-prefixer.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/inline-style-prefixer.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit d10d4bb

Please sign in to comment.