Skip to content

Commit

Permalink
fix: 修复文档遗漏部分,添加完整化版本生成和日志生成
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-lau committed Mar 21, 2022
1 parent a308642 commit 10f4af5
Show file tree
Hide file tree
Showing 5 changed files with 1,446 additions and 22 deletions.
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## [2.0.4](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/v2.0.3...v2.0.4) (2022-03-20)


### Bug Fixes

* 修复在baseSize中不提供vw或者rem时,保留了px的问题 ([581099b](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/581099b09bb2f80531a0eb7f1205ab3456d63afb))



## [2.0.3](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/v2.0.2...v2.0.3) (2021-10-26)



## [2.0.2](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/v2.0.1...v2.0.2) (2021-09-09)



## [2.0.1](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/v2.0.0...v2.0.1) (2021-09-09)



# [2.0.0](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/v1.0.2...v2.0.0) (2021-08-27)


### Bug Fixes

* update doc for typos ([ffb4b24](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/ffb4b247520c49a3410ad71fbe301727563b5538))
* update readme ([79cc4e5](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/79cc4e5edcafff2fcdd1e9bbb34a416c3260f7b0))


### Features

* postcss version 8 compact ([5ba4352](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/5ba43520897e25bd010ed705e3d99465ff223fcf))
* update doc ([b8de4d8](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/b8de4d8a6e92242a5f6f6f02cfa4f2dc5630918d))



## [1.0.2](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/v1.0.1...v1.0.2) (2021-08-27)


### Bug Fixes

* postcss v7 plugin ([de339c4](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/de339c405b9db88f496aa6a63f370c7e1c670dd0))



## [1.0.1](https://github.com/ben-lau/postcss-pixel-to-remvw/compare/283ea567445aac4c833588ad73316e9585fe95b7...v1.0.1) (2021-08-27)


### Bug Fixes

* change package name ([fb0c683](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/fb0c683613895feb70c48c0203f23bb1a6936757))
* older postcss version ([028a4c7](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/028a4c7465dfdd5bba12c049e4fd895774b3b306))


### Features

* first commit ([283ea56](https://github.com/ben-lau/postcss-pixel-to-remvw/commit/283ea567445aac4c833588ad73316e9585fe95b7))



28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# postcss-pixel-to-remvw

[![Package Quality](https://packagequality.com/badge/postcss-pixel-to-remvw.png)](https://packagequality.com/#?package=postcss-pixel-to-remvw)

a postcss plugin for converting px to rem and vw, also you can choose only convert one of then.

**This version requires `postcss` version 8**
Expand Down Expand Up @@ -98,17 +100,33 @@ h1 {
## In Webpack

```javascript
const pxtoremvw = require('postcss-pixel-to-remvw');
export default {
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader!css-loader!postcss-loader',
loader: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [
[
'postcss-pixel-to-remvw',
{
// Options
},
],
],
},
},
},
],
},
],
},
postcss: [pxtoremvw(/*options*/)],
};
```

Expand Down Expand Up @@ -154,8 +172,8 @@ default:
```

- `baseSize` {Object} the base size config, default is { rem: 75, vw: 7.5 }
- `rem` {Number} the root element font size, means 1rem = [your setting] px
- `vw` {Number} the base ratio for viewport width, means 1vw = [your setting] px
- `rem` {Number | undefined} the root element font size, means 1rem = [your setting] px; It won't convert to rem while `rem` is undefined
- `vw` {Number | undefined} the base ratio for viewport width, means 1vw = [your setting] px; It won't convert to vw while `vw` is undefined
- `unitPrecision` {Number} the digital accurarcy of converted stylesheet
- `selectorBlackList` {string[]} The selectors list to ignore conversion
- If value is string, it checks to see if selector contains the string.['body'] will match .body-class
Expand Down
Loading

0 comments on commit 10f4af5

Please sign in to comment.