weapp-tailwindcss 2.3.4 → 2.4.0

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 CHANGED
@@ -1,9 +1,28 @@
1
- ![logo](./assets/logo.jpg)
2
1
 
3
- # weapp-tailwindcss
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
  ![star](https://badgen.net/github/stars/sonofmagic/weapp-tailwindcss-webpack-plugin)
6
- ![dm](https://badgen.net/npm/dm/weapp-tailwindcss-webpack-plugin)
24
+ ![dm0](https://badgen.net/npm/dm/weapp-tailwindcss)
25
+ ![dm1](https://badgen.net/npm/dm/weapp-tailwindcss-webpack-plugin)
7
26
  ![license](https://badgen.net/npm/license/weapp-tailwindcss-webpack-plugin)
8
27
  [![test](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/actions/workflows/test.yml)
9
28
  [![codecov](https://codecov.io/gh/sonofmagic/weapp-tailwindcss-webpack-plugin/branch/main/graph/badge.svg?token=zn05qXYznt)](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
- - [weapp-tailwindcss](#weapp-tailwindcss)
16
- - [Tips](#tips)
17
- - [特性](#特性)
18
- - [插件介绍](#插件介绍)
19
- - [使用方式](#使用方式)
20
- - [从 v1 迁移到 v2](#从-v1-迁移到-v2)
21
- - [配置项参考](#配置项参考)
22
- - [使用tailwindcss任意值(arbitrary values)](#使用tailwindcss任意值arbitrary-values)
23
- - [常见问题](#常见问题)
24
- - [变更日志](#变更日志)
25
- - [Related projects](#related-projects)
26
- - [CLI 工具](#cli-工具)
27
- - [模板 template](#模板-template)
28
- - [如何选择?](#如何选择)
29
- - [使用`uni-app cli`进行构建 `vscode`开发](#使用uni-app-cli进行构建-vscode开发)
30
- - [使用`hbuilderx` 进行构建和开发](#使用hbuilderx-进行构建和开发)
31
- - [使用`tarojs`进行构建 `vscode`开发](#使用tarojs进行构建-vscode开发)
32
- - [原生小程序开发模板](#原生小程序开发模板)
33
- - [tailwindcss plugin](#tailwindcss-plugin)
34
- - [tailwindcss preset](#tailwindcss-preset)
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
- ## [使用方式](https://weapp-tw.icebreaker.top/docs/quick-start/install)
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
 
@@ -1,4 +1,3 @@
1
- import generate from '@babel/generator';
2
- import { parse, parseExpression } from '@babel/parser';
3
- import traverse from '@babel/traverse';
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-7f22c17e.js');
4
- require('./shared-c2953d9d.js');
5
- require('tailwindcss-mangle-shared');
3
+ var options = require('./options-450d76c2.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('@babel/types');
10
+ require('./shared-9744fdd1.js');
11
+ require('tailwindcss-mangle-shared');
12
12
  require('postcss');
13
- require('./postcss-dc9eeafc.js');
13
+ require('./postcss-0c103b15.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-d1b3c0bf.mjs';
2
- import './shared-eae1dc7a.mjs';
3
- import 'tailwindcss-mangle-shared';
1
+ import { g as getOptions, c as createPatch } from './options-5c083791.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 '@babel/types';
8
+ import './shared-89ea7f77.mjs';
9
+ import 'tailwindcss-mangle-shared';
10
10
  import 'postcss';
11
- import './postcss-1f9a5153.mjs';
11
+ import './postcss-e3fcf6f1.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
 
@@ -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 options = require('./options-7f22c17e.js');
6
- var stream = require('stream');
7
- var shared = require('./shared-c2953d9d.js');
5
+ var stream = require('node:stream');
6
+ var options = require('./options-450d76c2.js');
7
+ var shared = require('./shared-9744fdd1.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-dc9eeafc.js');
15
+ require('./postcss-0c103b15.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 (typeof options$1.customReplaceDictionary === 'undefined') {
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 { g as getOptions, a as createTailwindcssPatcher } from './options-d1b3c0bf.mjs';
2
- import stream from 'stream';
3
- import { c as initStore, d as setRuntimeSet } from './shared-eae1dc7a.mjs';
1
+ import stream from 'node:stream';
2
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-5c083791.mjs';
3
+ import { c as initStore, d as setRuntimeSet } from './shared-89ea7f77.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-1f9a5153.mjs';
11
+ import './postcss-e3fcf6f1.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 (typeof options.customReplaceDictionary === 'undefined') {
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-7f22c17e.js');
9
- require('./shared-c2953d9d.js');
10
- require('tailwindcss-mangle-shared');
8
+ require('./options-450d76c2.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('@babel/types');
15
+ require('./shared-9744fdd1.js');
16
+ require('tailwindcss-mangle-shared');
17
17
  require('postcss');
18
- require('./postcss-dc9eeafc.js');
18
+ require('./postcss-0c103b15.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-d1b3c0bf.mjs';
5
- import './shared-eae1dc7a.mjs';
6
- import 'tailwindcss-mangle-shared';
4
+ import './options-5c083791.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 '@babel/types';
11
+ import './shared-89ea7f77.mjs';
12
+ import 'tailwindcss-mangle-shared';
13
13
  import 'postcss';
14
- import './postcss-1f9a5153.mjs';
14
+ import './postcss-e3fcf6f1.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';
@@ -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;