Skip to content

Commit

Permalink
feat: use pnpm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Jun 30, 2022
1 parent ae243b7 commit 5d8c815
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ jobs:
- name: Publish
run: |
if [ '${{ github.event_name }}' == 'pull_request' ] ; then
pnpm -r --filter=./packages/* exec npm publish
pnpm -r --filter=./packages/* exec pnpm publish
elif [ '${{ github.event_name }}' == 'push' ] ; then
pnpm -r --filter=./packages/* exec npm publish ${{ env.PUBLISH_PARAMS }}
pnpm -r --filter=./packages/* exec pnpm publish ${{ env.PUBLISH_PARAMS }}
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion packages/postcss-pxtransform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ module.exports = postcss.plugin('postcss-pxtransform', function (options = {}) {
switch (options.platform) {
case 'h5': {
options.rootValue = (input, m) => {
const val = Math.max(Math.min(1 / options.deviceRatio[designWidth(input)] * (designWidth(input) / 16), options.max ?? 40), options.mix ?? 20)
const rv = 1 / options.deviceRatio[designWidth(input)] * (designWidth(input) / 16)
const val = Math.max(Math.min(rv, options.max ?? 40), options.mix ?? 20)
return m.indexOf('rpx') >= 0 ? val / 0.5 : val
}
targetUnit = 'rem'
Expand Down

0 comments on commit 5d8c815

Please sign in to comment.