weapp-tailwindcss 2.3.4 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -26
- package/dist/babel/index.d.ts +3 -4
- package/dist/cli.js +7 -7
- package/dist/cli.mjs +7 -7
- package/dist/gulp/index.d.ts +1 -1
- package/dist/gulp.js +8 -8
- package/dist/gulp.mjs +8 -8
- package/dist/index.js +8 -8
- package/dist/index.mjs +8 -8
- package/dist/js/index.d.ts +1 -1
- package/dist/{options-d1b3c0bf.mjs → options-3578215d.mjs} +179 -195
- package/dist/{options-7f22c17e.js → options-b3e419f1.js} +179 -195
- package/dist/postcss/plugin.d.ts +2 -2
- package/dist/{postcss-dc9eeafc.js → postcss-06f57f3f.js} +5 -6
- package/dist/{postcss-1f9a5153.mjs → postcss-564aef44.mjs} +5 -6
- package/dist/postcss.js +2 -2
- package/dist/postcss.mjs +2 -2
- package/dist/replace.d.ts +2 -3
- package/dist/replace.js +2 -2
- package/dist/replace.mjs +3 -3
- package/dist/{shared-eae1dc7a.mjs → shared-497eda3c.mjs} +59 -60
- package/dist/{shared-c2953d9d.js → shared-823d1fc1.js} +59 -60
- package/dist/tailwindcss/patcher.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +1 -3
- package/dist/vite.js +7 -7
- package/dist/vite.mjs +7 -7
- package/dist/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/webpack.js +9 -9
- package/dist/webpack.mjs +9 -9
- package/dist/wxml/index.d.ts +2 -3
- package/package.json +11 -15
package/README.md
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-

|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
<p align="center">
|
|
3
|
+
|
|
4
|
+
<a href="https://weapp-tw.icebreaker.top">
|
|
5
|
+
|
|
6
|
+
<img src="./assets/logo.png" alt="weapp-tailwindcss-logo" width="128">
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
<br>
|
|
10
|
+
|
|
11
|
+
<h1 align="center">weapp-tailwindcss</h1>
|
|
12
|
+
|
|
13
|
+
</p>
|
|
14
|
+
<!-- <p align="center">
|
|
15
|
+
<a href="https://weapp-tw.icebreaker.top#gh-light-mode-only">
|
|
16
|
+
<img src="./assets/logo-text-light.png#gh-light-mode-only" alt="weapp-tailwindcss-logo" width="300">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://weapp-tw.icebreaker.top#gh-dark-mode-only">
|
|
19
|
+
<img src="./assets/logo-text-dark.png#gh-dark-mode-only" alt="weapp-tailwindcss-logo" width="300">
|
|
20
|
+
</a>
|
|
21
|
+
<br> -->
|
|
4
22
|
|
|
5
23
|

|
|
6
|
-

|
|
25
|
+

|
|
7
26
|

|
|
8
27
|
[](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/actions/workflows/test.yml)
|
|
9
28
|
[](https://codecov.io/gh/sonofmagic/weapp-tailwindcss-webpack-plugin)
|
|
@@ -12,27 +31,26 @@
|
|
|
12
31
|
|
|
13
32
|
\[[国内部署的文档地址](https://weapp-tw.icebreaker.top)\] \| \[[备用Github Page](https://sonofmagic.github.io/weapp-tailwindcss-webpack-plugin/)\] \| \[[1.x文档]('./v1.md')\]
|
|
14
33
|
|
|
15
|
-
- [
|
|
16
|
-
|
|
17
|
-
- [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- [
|
|
26
|
-
|
|
27
|
-
- [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- [Bugs \& Issues](#bugs--issues)
|
|
34
|
+
- [Tips](#tips)
|
|
35
|
+
- [特性](#特性)
|
|
36
|
+
- [插件介绍](#插件介绍)
|
|
37
|
+
- [安装与使用方式](#安装与使用方式)
|
|
38
|
+
- [从 v1 迁移到 v2](#从-v1-迁移到-v2)
|
|
39
|
+
- [配置项参考](#配置项参考)
|
|
40
|
+
- [使用tailwindcss任意值(arbitrary values)](#使用tailwindcss任意值arbitrary-values)
|
|
41
|
+
- [常见问题](#常见问题)
|
|
42
|
+
- [变更日志](#变更日志)
|
|
43
|
+
- [Related projects](#related-projects)
|
|
44
|
+
- [CLI 工具](#cli-工具)
|
|
45
|
+
- [模板 template](#模板-template)
|
|
46
|
+
- [如何选择?](#如何选择)
|
|
47
|
+
- [使用`uni-app cli`进行构建 `vscode`开发](#使用uni-app-cli进行构建-vscode开发)
|
|
48
|
+
- [使用`hbuilderx` 进行构建和开发](#使用hbuilderx-进行构建和开发)
|
|
49
|
+
- [使用`tarojs`进行构建 `vscode`开发](#使用tarojs进行构建-vscode开发)
|
|
50
|
+
- [原生小程序开发模板](#原生小程序开发模板)
|
|
51
|
+
- [tailwindcss plugin](#tailwindcss-plugin)
|
|
52
|
+
- [tailwindcss preset](#tailwindcss-preset)
|
|
53
|
+
- [Bugs \& Issues](#bugs--issues)
|
|
36
54
|
|
|
37
55
|
## Tips
|
|
38
56
|
|
|
@@ -58,9 +76,9 @@
|
|
|
58
76
|
|
|
59
77
|
目前,这些插件支持最新版本的 `tailwindcss v3.x.x` 版本和 `webpack5`,`vite` 和 `gulp`。
|
|
60
78
|
|
|
61
|
-
> 如果你还在使用 `tailwindcss@2` 版本,那你应该使用本插件的 `1.x` 版本
|
|
79
|
+
> 如果你还在使用 `tailwindcss@2` 版本,那你应该使用本插件的 `1.x` 版本。另外请确保你的 `nodejs` 版本 `>=16`。目前低于 `16` 的长期维护版本(`偶数版本`) 都已经结束了生命周期,建议安装 `nodejs` 的 `LTS`版本,详见 [nodejs/release](https://github.com/nodejs/release)
|
|
62
80
|
|
|
63
|
-
## [
|
|
81
|
+
## [安装与使用方式](https://weapp-tw.icebreaker.top/docs/quick-start/install)
|
|
64
82
|
|
|
65
83
|
## [从 v1 迁移到 v2](https://weapp-tw.icebreaker.top/docs/migrations/v1)
|
|
66
84
|
|
package/dist/babel/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { generate, parseExpression, parse, traverse };
|
|
1
|
+
export { default as generate } from '@babel/generator';
|
|
2
|
+
export { parse, parseExpression } from '@babel/parser';
|
|
3
|
+
export { default as traverse } from '@babel/traverse';
|
package/dist/cli.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var options = require('./options-
|
|
4
|
-
require('./shared-c2953d9d.js');
|
|
5
|
-
require('tailwindcss-mangle-shared');
|
|
3
|
+
var options = require('./options-b3e419f1.js');
|
|
6
4
|
require('micromatch');
|
|
5
|
+
require('@babel/types');
|
|
7
6
|
require('@babel/generator');
|
|
8
7
|
require('@babel/parser');
|
|
9
8
|
require('@babel/traverse');
|
|
10
9
|
require('./replace.js');
|
|
11
|
-
require('
|
|
10
|
+
require('./shared-823d1fc1.js');
|
|
11
|
+
require('tailwindcss-mangle-shared');
|
|
12
12
|
require('postcss');
|
|
13
|
-
require('./postcss-
|
|
13
|
+
require('./postcss-06f57f3f.js');
|
|
14
14
|
require('postcss-selector-parser');
|
|
15
15
|
require('@csstools/postcss-is-pseudo-class');
|
|
16
|
-
require('path');
|
|
17
|
-
require('fs');
|
|
16
|
+
require('node:path');
|
|
17
|
+
require('node:fs');
|
|
18
18
|
require('semver');
|
|
19
19
|
require('tailwindcss-patch');
|
|
20
20
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { g as getOptions, c as createPatch } from './options-
|
|
2
|
-
import './shared-eae1dc7a.mjs';
|
|
3
|
-
import 'tailwindcss-mangle-shared';
|
|
1
|
+
import { g as getOptions, c as createPatch } from './options-3578215d.mjs';
|
|
4
2
|
import 'micromatch';
|
|
3
|
+
import '@babel/types';
|
|
5
4
|
import '@babel/generator';
|
|
6
5
|
import '@babel/parser';
|
|
7
6
|
import '@babel/traverse';
|
|
8
7
|
import './replace.mjs';
|
|
9
|
-
import '
|
|
8
|
+
import './shared-497eda3c.mjs';
|
|
9
|
+
import 'tailwindcss-mangle-shared';
|
|
10
10
|
import 'postcss';
|
|
11
|
-
import './postcss-
|
|
11
|
+
import './postcss-564aef44.mjs';
|
|
12
12
|
import 'postcss-selector-parser';
|
|
13
13
|
import '@csstools/postcss-is-pseudo-class';
|
|
14
|
-
import 'path';
|
|
15
|
-
import 'fs';
|
|
14
|
+
import 'node:path';
|
|
15
|
+
import 'node:fs';
|
|
16
16
|
import 'semver';
|
|
17
17
|
import 'tailwindcss-patch';
|
|
18
18
|
|
package/dist/gulp/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import stream from 'node:stream';
|
|
2
3
|
import { UserDefinedOptions } from "../types";
|
|
3
|
-
import stream from 'stream';
|
|
4
4
|
export declare function createPlugins(options?: UserDefinedOptions): {
|
|
5
5
|
transformWxss: () => stream.Transform;
|
|
6
6
|
transformWxml: () => stream.Transform;
|
package/dist/gulp.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var shared = require('./shared-
|
|
5
|
+
var stream = require('node:stream');
|
|
6
|
+
var options = require('./options-b3e419f1.js');
|
|
7
|
+
var shared = require('./shared-823d1fc1.js');
|
|
8
8
|
require('micromatch');
|
|
9
|
+
require('@babel/types');
|
|
9
10
|
require('@babel/generator');
|
|
10
11
|
require('@babel/parser');
|
|
11
12
|
require('@babel/traverse');
|
|
12
13
|
require('./replace.js');
|
|
13
|
-
require('@babel/types');
|
|
14
14
|
require('postcss');
|
|
15
|
-
require('./postcss-
|
|
15
|
+
require('./postcss-06f57f3f.js');
|
|
16
16
|
require('postcss-selector-parser');
|
|
17
17
|
require('@csstools/postcss-is-pseudo-class');
|
|
18
|
-
require('path');
|
|
19
|
-
require('fs');
|
|
18
|
+
require('node:path');
|
|
19
|
+
require('node:fs');
|
|
20
20
|
require('semver');
|
|
21
21
|
require('tailwindcss-patch');
|
|
22
22
|
require('tailwindcss-mangle-shared');
|
|
@@ -27,7 +27,7 @@ var stream__default = /*#__PURE__*/_interopDefaultCompat(stream);
|
|
|
27
27
|
|
|
28
28
|
const Transform = stream__default["default"].Transform;
|
|
29
29
|
function createPlugins(options$1 = {}) {
|
|
30
|
-
if (
|
|
30
|
+
if (options$1.customReplaceDictionary === undefined) {
|
|
31
31
|
options$1.customReplaceDictionary = 'simple';
|
|
32
32
|
}
|
|
33
33
|
const opts = options.getOptions(options$1, ['patch', 'style', 'templete', 'js']);
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { c as initStore, d as setRuntimeSet } from './shared-
|
|
1
|
+
import stream from 'node:stream';
|
|
2
|
+
import { g as getOptions, a as createTailwindcssPatcher } from './options-3578215d.mjs';
|
|
3
|
+
import { c as initStore, d as setRuntimeSet } from './shared-497eda3c.mjs';
|
|
4
4
|
import 'micromatch';
|
|
5
|
+
import '@babel/types';
|
|
5
6
|
import '@babel/generator';
|
|
6
7
|
import '@babel/parser';
|
|
7
8
|
import '@babel/traverse';
|
|
8
9
|
import './replace.mjs';
|
|
9
|
-
import '@babel/types';
|
|
10
10
|
import 'postcss';
|
|
11
|
-
import './postcss-
|
|
11
|
+
import './postcss-564aef44.mjs';
|
|
12
12
|
import 'postcss-selector-parser';
|
|
13
13
|
import '@csstools/postcss-is-pseudo-class';
|
|
14
|
-
import 'path';
|
|
15
|
-
import 'fs';
|
|
14
|
+
import 'node:path';
|
|
15
|
+
import 'node:fs';
|
|
16
16
|
import 'semver';
|
|
17
17
|
import 'tailwindcss-patch';
|
|
18
18
|
import 'tailwindcss-mangle-shared';
|
|
19
19
|
|
|
20
20
|
const Transform = stream.Transform;
|
|
21
21
|
function createPlugins(options = {}) {
|
|
22
|
-
if (
|
|
22
|
+
if (options.customReplaceDictionary === undefined) {
|
|
23
23
|
options.customReplaceDictionary = 'simple';
|
|
24
24
|
}
|
|
25
25
|
const opts = getOptions(options, ['patch', 'style', 'templete', 'js']);
|
package/dist/index.js
CHANGED
|
@@ -5,24 +5,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var webpack = require('./webpack.js');
|
|
6
6
|
var vite = require('./vite.js');
|
|
7
7
|
var gulp = require('./gulp.js');
|
|
8
|
-
require('./options-
|
|
9
|
-
require('./shared-c2953d9d.js');
|
|
10
|
-
require('tailwindcss-mangle-shared');
|
|
8
|
+
require('./options-b3e419f1.js');
|
|
11
9
|
require('micromatch');
|
|
10
|
+
require('@babel/types');
|
|
12
11
|
require('@babel/generator');
|
|
13
12
|
require('@babel/parser');
|
|
14
13
|
require('@babel/traverse');
|
|
15
14
|
require('./replace.js');
|
|
16
|
-
require('
|
|
15
|
+
require('./shared-823d1fc1.js');
|
|
16
|
+
require('tailwindcss-mangle-shared');
|
|
17
17
|
require('postcss');
|
|
18
|
-
require('./postcss-
|
|
18
|
+
require('./postcss-06f57f3f.js');
|
|
19
19
|
require('postcss-selector-parser');
|
|
20
20
|
require('@csstools/postcss-is-pseudo-class');
|
|
21
|
-
require('path');
|
|
22
|
-
require('fs');
|
|
21
|
+
require('node:path');
|
|
22
|
+
require('node:fs');
|
|
23
23
|
require('semver');
|
|
24
24
|
require('tailwindcss-patch');
|
|
25
|
-
require('stream');
|
|
25
|
+
require('node:stream');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export { UnifiedWebpackPluginV5 } from './webpack.mjs';
|
|
2
2
|
export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
|
|
3
3
|
export { createPlugins } from './gulp.mjs';
|
|
4
|
-
import './options-
|
|
5
|
-
import './shared-eae1dc7a.mjs';
|
|
6
|
-
import 'tailwindcss-mangle-shared';
|
|
4
|
+
import './options-3578215d.mjs';
|
|
7
5
|
import 'micromatch';
|
|
6
|
+
import '@babel/types';
|
|
8
7
|
import '@babel/generator';
|
|
9
8
|
import '@babel/parser';
|
|
10
9
|
import '@babel/traverse';
|
|
11
10
|
import './replace.mjs';
|
|
12
|
-
import '
|
|
11
|
+
import './shared-497eda3c.mjs';
|
|
12
|
+
import 'tailwindcss-mangle-shared';
|
|
13
13
|
import 'postcss';
|
|
14
|
-
import './postcss-
|
|
14
|
+
import './postcss-564aef44.mjs';
|
|
15
15
|
import 'postcss-selector-parser';
|
|
16
16
|
import '@csstools/postcss-is-pseudo-class';
|
|
17
|
-
import 'path';
|
|
18
|
-
import 'fs';
|
|
17
|
+
import 'node:path';
|
|
18
|
+
import 'node:fs';
|
|
19
19
|
import 'semver';
|
|
20
20
|
import 'tailwindcss-patch';
|
|
21
|
-
import 'stream';
|
|
21
|
+
import 'node:stream';
|
package/dist/js/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IJsHandlerOptions } from "../types";
|
|
2
1
|
import type { StringLiteral, TemplateElement } from '@babel/types';
|
|
2
|
+
import type { IJsHandlerOptions } from "../types";
|
|
3
3
|
export declare function handleValue(str: string, node: StringLiteral | TemplateElement, options: IJsHandlerOptions): string;
|
|
4
4
|
export declare function jsHandler(rawSource: string, options: IJsHandlerOptions): import("@babel/generator").GeneratorResult;
|
|
5
5
|
export declare function createjsHandler(options: Omit<IJsHandlerOptions, 'classNameSet'>): (rawSource: string, set: Set<string>) => import("@babel/generator").GeneratorResult;
|