Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 2.1.5 #167

Merged
merged 14 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.1.5 (2023-05-04)

### Features

- `js` 文件进行转义时,自动判断格式是 `cjs` 还是 `esm`
- 现在能针对 `eval` 包裹的 `js`脚本进行转义了
- 去除所有 `mangle` 相关代码,相关功能现在到 [tailwindcss-mangle](https://github.com/sonofmagic/tailwindcss-mangle)

### Chores

- 给之前的 `v1` 版本的插件打上 `deprecated` 标记,添加对应的 `jsdoc`
- 整理目录去除 `v1` 版本的 `markdown` 文件目录,相关转移到了 `website` 中

## 2.1.4 (2023-04-30)

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- [从 v1 迁移](#从-v1-迁移)
- [精确转化与忽略](#精确转化与忽略)
- [Options 配置项](#options-配置项)
- [使用 arbitrary values](#使用-arbitrary-values)
- [使用任意值(arbitrary values)](#使用任意值arbitrary-values)
- [变更日志](#变更日志)
- [常见问题](#常见问题)
- [Related projects](#related-projects)
Expand Down Expand Up @@ -601,9 +601,9 @@ cssPreflight: {

使用 `npm hooks` 的方式来给 `tailwindcss` 自动打 `patch`

## 使用 arbitrary values
## 使用任意值(arbitrary values)

详见 [tailwindcss/using-arbitrary-values 章节](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values) | [Sample](./docs/arbitrary-values.md)
详见 [tailwindcss/using-arbitrary-values 章节](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values)

## [变更日志](./CHANGELOG.md)

Expand Down
4 changes: 2 additions & 2 deletions demo/gulp-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
"sass": "^1.62.0",
"tailwind-css-variables-theme-generator": "^0.3.8",
"tailwindcss": "^3.3.1",
"tailwindcss-patch": "^1.1.0",
"tailwindcss-patch": "^1.1.1",
"tailwindcss-rem2px-preset": "^1.0.3",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"weapp-ide-cli": "^1.0.1",
"weapp-tailwindcss-children": "^0.1.0",
"weapp-tailwindcss-webpack-plugin": "^2.1.4"
"weapp-tailwindcss-webpack-plugin": "^2.1.5"
}
}
4 changes: 3 additions & 1 deletion demo/gulp-app/src/pages/index/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// index.js
// 获取应用实例
// const app = getApp()

Page({
data: {
motto: 'Hello World',
userInfo: {},
contentStyle: 'mt-[24px]'
contentStyle: 'mt-[24px]',
classNames: "bg-[url('https://xxx.com/xx.webp')] text-[#123456] text-[50px] bg-[#fff]"
},
onLoad: function () {},
copyText: function (e: any) {
Expand Down
1 change: 1 addition & 0 deletions demo/gulp-app/src/pages/index/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<view class="text-xs">px 和 rem 单位转小程序单位rpx</view>
<view class="text-xs">支持 typescript</view>
</view>
<view class="{{classNames}}"></view>
</view>
</view>
</view>
86 changes: 72 additions & 14 deletions demo/gulp-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,26 @@
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/generator@^7.21.5":
version "7.21.5"
resolved "https://registry.npmmirror.com/@babel/generator/-/generator-7.21.5.tgz#c0c0e5449504c7b7de8236d99338c3e2a340745f"
integrity sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==
dependencies:
"@babel/types" "^7.21.5"
"@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/helper-environment-visitor@^7.18.9":
version "7.18.9"
resolved "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz"
integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==

"@babel/helper-environment-visitor@^7.21.5":
version "7.21.5"
resolved "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz#c769afefd41d171836f7cb63e295bedf689d48ba"
integrity sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==

"@babel/helper-function-name@^7.21.0":
version "7.21.0"
resolved "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz"
Expand Down Expand Up @@ -51,6 +66,11 @@
resolved "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz"
integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==

"@babel/helper-string-parser@^7.21.5":
version "7.21.5"
resolved "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd"
integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==

"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1":
version "7.19.1"
resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz"
Expand All @@ -70,6 +90,11 @@
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.21.4.tgz"
integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==

"@babel/parser@^7.21.5":
version "7.21.5"
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.21.5.tgz#821bb520118fd25b982eaf8d37421cf5c64a312b"
integrity sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ==

"@babel/template@^7.20.7":
version "7.20.7"
resolved "https://registry.npmmirror.com/@babel/template/-/template-7.20.7.tgz"
Expand All @@ -95,6 +120,22 @@
debug "^4.1.0"
globals "^11.1.0"

"@babel/traverse@^7.21.5":
version "7.21.5"
resolved "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.21.5.tgz#ad22361d352a5154b498299d523cf72998a4b133"
integrity sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==
dependencies:
"@babel/code-frame" "^7.21.4"
"@babel/generator" "^7.21.5"
"@babel/helper-environment-visitor" "^7.21.5"
"@babel/helper-function-name" "^7.21.0"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/parser" "^7.21.5"
"@babel/types" "^7.21.5"
debug "^4.1.0"
globals "^11.1.0"

"@babel/types@^7.18.6", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.4":
version "7.21.4"
resolved "https://registry.npmmirror.com/@babel/types/-/types-7.21.4.tgz"
Expand All @@ -104,6 +145,15 @@
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"

"@babel/types@^7.21.5":
version "7.21.5"
resolved "https://registry.npmmirror.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6"
integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==
dependencies:
"@babel/helper-string-parser" "^7.21.5"
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"

"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.npmmirror.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz"
Expand Down Expand Up @@ -4332,6 +4382,14 @@ postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11:
cssesc "^3.0.0"
util-deprecate "^1.0.2"

postcss-selector-parser@^6.0.12:
version "6.0.12"
resolved "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz#2efae5ffab3c8bfb2b7fbf0c426e3bca616c4abb"
integrity sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==
dependencies:
cssesc "^3.0.0"
util-deprecate "^1.0.2"

postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
version "4.2.0"
resolved "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz"
Expand Down Expand Up @@ -5137,15 +5195,15 @@ tailwind-css-variables-theme-generator@^0.3.8:
dependencies:
consola "^2.15.3"

tailwindcss-patch@^1.1.0:
version "1.1.0"
resolved "https://registry.npmmirror.com/tailwindcss-patch/-/tailwindcss-patch-1.1.0.tgz#d0ae15cca5e22afe44d8c64384e267d71e560578"
integrity sha512-nbWm9mBobQOMLyYLiAhQs0/UtMZEsJZCTjLgpiHD3+G2lIWFKfc/ESRcvMDHc+b5Uq8aXcLQX3VWO0plc+3nlg==
tailwindcss-patch@^1.1.1:
version "1.1.1"
resolved "https://registry.npmmirror.com/tailwindcss-patch/-/tailwindcss-patch-1.1.1.tgz#f4ed3061a4e92f65fc842f4f0ee3153f440141f1"
integrity sha512-H4I8HbzHnAxNK0NA+6PFl05F0+pPbKuHIGOBsYa1Of+QQ47UcpgMlBdhsPYtpELmV8qqM8DwRUGRpIENDrv1Fw==
dependencies:
"@babel/generator" "^7.21.4"
"@babel/parser" "^7.21.4"
"@babel/traverse" "^7.21.4"
"@babel/types" "^7.21.4"
"@babel/generator" "^7.21.5"
"@babel/parser" "^7.21.5"
"@babel/traverse" "^7.21.5"
"@babel/types" "^7.21.5"
resolve "^1.22.2"
semver "^7.5.0"

Expand Down Expand Up @@ -5633,10 +5691,10 @@ weapp-tailwindcss-children@^0.1.0:
resolved "https://registry.npmmirror.com/weapp-tailwindcss-children/-/weapp-tailwindcss-children-0.1.0.tgz#0de102f04a89d77447ca3b984669bbe5ffa41aa1"
integrity sha512-HuDT78u6RbXpJIHbJzw4zW98JByWCz4elhTAT9QR/JWJuQpiRNbnqa5tL+ZTVCcT4bHt9Ppf/E2MNTohPgBE3g==

weapp-tailwindcss-webpack-plugin@^2.1.4:
version "2.1.4"
resolved "https://registry.npmmirror.com/weapp-tailwindcss-webpack-plugin/-/weapp-tailwindcss-webpack-plugin-2.1.4.tgz#958525480e12beaae41ebbc0c08c12b3e24d9032"
integrity sha512-qg753zBFZDmmOn+DwvuTvqnq7dcWI1PvYdU9UQeftkSsDI8fdeHqviIdEG/g++p+sFqGIq7imCCl6N/1UGavvg==
weapp-tailwindcss-webpack-plugin@^2.1.5:
version "2.1.5"
resolved "https://registry.npmmirror.com/weapp-tailwindcss-webpack-plugin/-/weapp-tailwindcss-webpack-plugin-2.1.5.tgz#c6f343ea86424a872aa4d30513b29a771d59cea8"
integrity sha512-Lsde6nw1FY54a2COTvfc0DsW6UbpiwnKU94KN/OXkLUvp2TsRqb1ICAwCkCOLkRXXyAqmi+QndukU5CFgomNhg==
dependencies:
"@babel/generator" "^7.21.4"
"@babel/parser" "^7.21.4"
Expand All @@ -5646,9 +5704,9 @@ weapp-tailwindcss-webpack-plugin@^2.1.4:
loader-utils "^2.0.2"
micromatch "^4.0.5"
postcss "8.4.23"
postcss-selector-parser "^6.0.11"
postcss-selector-parser "^6.0.12"
semver "^7.5.0"
tailwindcss-patch "^1.1.0"
tailwindcss-patch "^1.1.1"
webpack-sources "^3.2.3"

webpack-sources@^3.2.3:
Expand Down
51 changes: 0 additions & 51 deletions demo/html/defaultExtractor.ts

This file was deleted.

4 changes: 2 additions & 2 deletions demo/mpx-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
"sass-loader": "^13.2.0",
"tailwind-css-variables-theme-generator": "^0.3.8",
"tailwindcss": "^3.3.1",
"tailwindcss-patch": "^1.1.0",
"tailwindcss-patch": "^1.1.1",
"tailwindcss-rem2px-preset": "^1.0.3",
"typescript": "^4.9.5",
"vue-template-compiler": "^2.6.14",
"weapp-ide-cli": "^1.0.1",
"weapp-tailwindcss-children": "^0.1.0",
"weapp-tailwindcss-webpack-plugin": "^2.1.4",
"weapp-tailwindcss-webpack-plugin": "^2.1.5",
"webpack": "^5.76.1"
},
"browserslist": "ios >= 8, chrome >= 47"
Expand Down
Loading