weapp-tailwindcss 2.3.3
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/LICENSE +21 -0
- package/README.md +674 -0
- package/bin/weapp-tailwindcss.js +7 -0
- package/dist/babel/index.d.ts +4 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.mjs +24 -0
- package/dist/constants.d.ts +6 -0
- package/dist/defaults.d.ts +2 -0
- package/dist/dic.d.ts +44 -0
- package/dist/env.d.ts +2 -0
- package/dist/escape.d.ts +3 -0
- package/dist/extractors/split.d.ts +3 -0
- package/dist/gulp/index.d.ts +8 -0
- package/dist/gulp.d.ts +1 -0
- package/dist/gulp.js +86 -0
- package/dist/gulp.mjs +78 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +31 -0
- package/dist/index.mjs +21 -0
- package/dist/js/index.d.ts +5 -0
- package/dist/mangle/store.d.ts +15 -0
- package/dist/options-3a695e84.js +574 -0
- package/dist/options-ed6f4a3a.mjs +542 -0
- package/dist/options.d.ts +4 -0
- package/dist/postcss/index.d.ts +3 -0
- package/dist/postcss/mp.d.ts +4 -0
- package/dist/postcss/plugin.d.ts +6 -0
- package/dist/postcss/preflight.d.ts +3 -0
- package/dist/postcss/selectorParser.d.ts +3 -0
- package/dist/postcss/shared.d.ts +1 -0
- package/dist/postcss-1f9a5153.mjs +105 -0
- package/dist/postcss-dc9eeafc.js +114 -0
- package/dist/postcss.d.ts +1 -0
- package/dist/postcss.js +22 -0
- package/dist/postcss.mjs +6 -0
- package/dist/reg.d.ts +26 -0
- package/dist/replace.d.ts +4 -0
- package/dist/replace.js +36 -0
- package/dist/replace.mjs +27 -0
- package/dist/shared-c2953d9d.js +354 -0
- package/dist/shared-eae1dc7a.mjs +333 -0
- package/dist/tailwindcss/patcher.d.ts +8 -0
- package/dist/tailwindcss/supportCustomUnit.d.ts +6 -0
- package/dist/types.d.ts +118 -0
- package/dist/utils.d.ts +9 -0
- package/dist/vite/index.d.ts +3 -0
- package/dist/vite.d.ts +1 -0
- package/dist/vite.js +82 -0
- package/dist/vite.mjs +78 -0
- package/dist/webpack/BaseUnifiedPlugin/v5.d.ts +9 -0
- package/dist/webpack/index.d.ts +1 -0
- package/dist/webpack.d.ts +1 -0
- package/dist/webpack.js +101 -0
- package/dist/webpack.mjs +97 -0
- package/dist/wxml/index.d.ts +3 -0
- package/dist/wxml/shared.d.ts +2 -0
- package/dist/wxml/utils.d.ts +7 -0
- package/package.json +224 -0
package/dist/webpack.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var options = require('./options-3a695e84.js');
|
|
6
|
+
var postcss = require('./postcss-dc9eeafc.js');
|
|
7
|
+
var shared = require('./shared-c2953d9d.js');
|
|
8
|
+
require('micromatch');
|
|
9
|
+
require('@babel/generator');
|
|
10
|
+
require('@babel/parser');
|
|
11
|
+
require('@babel/traverse');
|
|
12
|
+
require('./replace.js');
|
|
13
|
+
require('@babel/types');
|
|
14
|
+
require('postcss');
|
|
15
|
+
require('@csstools/postcss-is-pseudo-class');
|
|
16
|
+
require('path');
|
|
17
|
+
require('fs');
|
|
18
|
+
require('semver');
|
|
19
|
+
require('tailwindcss-patch');
|
|
20
|
+
require('postcss-selector-parser');
|
|
21
|
+
require('tailwindcss-mangle-shared');
|
|
22
|
+
|
|
23
|
+
class UnifiedWebpackPluginV5 {
|
|
24
|
+
constructor(options$1 = {}) {
|
|
25
|
+
if (typeof options$1.customReplaceDictionary === 'undefined') {
|
|
26
|
+
options$1.customReplaceDictionary = 'simple';
|
|
27
|
+
}
|
|
28
|
+
this.options = options.getOptions(options$1, ['style', 'patch', 'templete', 'js']);
|
|
29
|
+
this.appType = this.options.appType;
|
|
30
|
+
}
|
|
31
|
+
apply(compiler) {
|
|
32
|
+
const { mainCssChunkMatcher, disabled, onLoad, onUpdate, onEnd, onStart, styleHandler, patch, templeteHandler, jsHandler, mangle } = this.options;
|
|
33
|
+
if (disabled) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
patch === null || patch === void 0 ? void 0 : patch();
|
|
37
|
+
shared.initStore(mangle);
|
|
38
|
+
const Compilation = compiler.webpack.Compilation;
|
|
39
|
+
const { ConcatSource } = compiler.webpack.sources;
|
|
40
|
+
const twPatcher = options.createTailwindcssPatcher();
|
|
41
|
+
function getClassSet() {
|
|
42
|
+
let set = twPatcher.getClassSet();
|
|
43
|
+
if (!set.size) {
|
|
44
|
+
const cacheSet = twPatcher.getCache();
|
|
45
|
+
if (cacheSet && cacheSet.size) {
|
|
46
|
+
set = cacheSet;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return set;
|
|
50
|
+
}
|
|
51
|
+
onLoad();
|
|
52
|
+
compiler.hooks.compilation.tap(postcss.pluginName, (compilation) => {
|
|
53
|
+
compilation.hooks.processAssets.tap({
|
|
54
|
+
name: postcss.pluginName,
|
|
55
|
+
stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
|
|
56
|
+
}, (assets) => {
|
|
57
|
+
onStart();
|
|
58
|
+
const entries = Object.entries(assets);
|
|
59
|
+
const groupedEntries = shared.getGroupedEntries(entries, this.options);
|
|
60
|
+
const set = getClassSet();
|
|
61
|
+
shared.setRuntimeSet(set);
|
|
62
|
+
if (Array.isArray(groupedEntries.html)) {
|
|
63
|
+
for (let i = 0; i < groupedEntries.html.length; i++) {
|
|
64
|
+
const [file, originalSource] = groupedEntries.html[i];
|
|
65
|
+
const rawSource = originalSource.source().toString();
|
|
66
|
+
const wxml = templeteHandler(rawSource);
|
|
67
|
+
const source = new ConcatSource(wxml);
|
|
68
|
+
compilation.updateAsset(file, source);
|
|
69
|
+
onUpdate(file, rawSource, wxml);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (Array.isArray(groupedEntries.js)) {
|
|
73
|
+
for (let i = 0; i < groupedEntries.js.length; i++) {
|
|
74
|
+
const [file, originalSource] = groupedEntries.js[i];
|
|
75
|
+
const rawSource = originalSource.source().toString();
|
|
76
|
+
const { code } = jsHandler(rawSource, set);
|
|
77
|
+
const source = new ConcatSource(code);
|
|
78
|
+
compilation.updateAsset(file, source);
|
|
79
|
+
onUpdate(file, rawSource, code);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (Array.isArray(groupedEntries.css)) {
|
|
83
|
+
for (let i = 0; i < groupedEntries.css.length; i++) {
|
|
84
|
+
const [file, originalSource] = groupedEntries.css[i];
|
|
85
|
+
const rawSource = originalSource.source().toString();
|
|
86
|
+
const css = styleHandler(rawSource, {
|
|
87
|
+
isMainChunk: mainCssChunkMatcher(file, this.appType)
|
|
88
|
+
});
|
|
89
|
+
const source = new ConcatSource(css);
|
|
90
|
+
compilation.updateAsset(file, source);
|
|
91
|
+
onUpdate(file, rawSource, css);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
onEnd();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
UnifiedWebpackPluginV5.NS = postcss.NS;
|
|
100
|
+
|
|
101
|
+
exports.UnifiedWebpackPluginV5 = UnifiedWebpackPluginV5;
|
package/dist/webpack.mjs
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { g as getOptions, a as createTailwindcssPatcher } from './options-ed6f4a3a.mjs';
|
|
2
|
+
import { a as pluginName, N as NS } from './postcss-1f9a5153.mjs';
|
|
3
|
+
import { c as initStore, g as getGroupedEntries, d as setRuntimeSet } from './shared-eae1dc7a.mjs';
|
|
4
|
+
import 'micromatch';
|
|
5
|
+
import '@babel/generator';
|
|
6
|
+
import '@babel/parser';
|
|
7
|
+
import '@babel/traverse';
|
|
8
|
+
import './replace.mjs';
|
|
9
|
+
import '@babel/types';
|
|
10
|
+
import 'postcss';
|
|
11
|
+
import '@csstools/postcss-is-pseudo-class';
|
|
12
|
+
import 'path';
|
|
13
|
+
import 'fs';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'tailwindcss-patch';
|
|
16
|
+
import 'postcss-selector-parser';
|
|
17
|
+
import 'tailwindcss-mangle-shared';
|
|
18
|
+
|
|
19
|
+
class UnifiedWebpackPluginV5 {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
if (typeof options.customReplaceDictionary === 'undefined') {
|
|
22
|
+
options.customReplaceDictionary = 'simple';
|
|
23
|
+
}
|
|
24
|
+
this.options = getOptions(options, ['style', 'patch', 'templete', 'js']);
|
|
25
|
+
this.appType = this.options.appType;
|
|
26
|
+
}
|
|
27
|
+
apply(compiler) {
|
|
28
|
+
const { mainCssChunkMatcher, disabled, onLoad, onUpdate, onEnd, onStart, styleHandler, patch, templeteHandler, jsHandler, mangle } = this.options;
|
|
29
|
+
if (disabled) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
patch === null || patch === void 0 ? void 0 : patch();
|
|
33
|
+
initStore(mangle);
|
|
34
|
+
const Compilation = compiler.webpack.Compilation;
|
|
35
|
+
const { ConcatSource } = compiler.webpack.sources;
|
|
36
|
+
const twPatcher = createTailwindcssPatcher();
|
|
37
|
+
function getClassSet() {
|
|
38
|
+
let set = twPatcher.getClassSet();
|
|
39
|
+
if (!set.size) {
|
|
40
|
+
const cacheSet = twPatcher.getCache();
|
|
41
|
+
if (cacheSet && cacheSet.size) {
|
|
42
|
+
set = cacheSet;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return set;
|
|
46
|
+
}
|
|
47
|
+
onLoad();
|
|
48
|
+
compiler.hooks.compilation.tap(pluginName, (compilation) => {
|
|
49
|
+
compilation.hooks.processAssets.tap({
|
|
50
|
+
name: pluginName,
|
|
51
|
+
stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
|
|
52
|
+
}, (assets) => {
|
|
53
|
+
onStart();
|
|
54
|
+
const entries = Object.entries(assets);
|
|
55
|
+
const groupedEntries = getGroupedEntries(entries, this.options);
|
|
56
|
+
const set = getClassSet();
|
|
57
|
+
setRuntimeSet(set);
|
|
58
|
+
if (Array.isArray(groupedEntries.html)) {
|
|
59
|
+
for (let i = 0; i < groupedEntries.html.length; i++) {
|
|
60
|
+
const [file, originalSource] = groupedEntries.html[i];
|
|
61
|
+
const rawSource = originalSource.source().toString();
|
|
62
|
+
const wxml = templeteHandler(rawSource);
|
|
63
|
+
const source = new ConcatSource(wxml);
|
|
64
|
+
compilation.updateAsset(file, source);
|
|
65
|
+
onUpdate(file, rawSource, wxml);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (Array.isArray(groupedEntries.js)) {
|
|
69
|
+
for (let i = 0; i < groupedEntries.js.length; i++) {
|
|
70
|
+
const [file, originalSource] = groupedEntries.js[i];
|
|
71
|
+
const rawSource = originalSource.source().toString();
|
|
72
|
+
const { code } = jsHandler(rawSource, set);
|
|
73
|
+
const source = new ConcatSource(code);
|
|
74
|
+
compilation.updateAsset(file, source);
|
|
75
|
+
onUpdate(file, rawSource, code);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (Array.isArray(groupedEntries.css)) {
|
|
79
|
+
for (let i = 0; i < groupedEntries.css.length; i++) {
|
|
80
|
+
const [file, originalSource] = groupedEntries.css[i];
|
|
81
|
+
const rawSource = originalSource.source().toString();
|
|
82
|
+
const css = styleHandler(rawSource, {
|
|
83
|
+
isMainChunk: mainCssChunkMatcher(file, this.appType)
|
|
84
|
+
});
|
|
85
|
+
const source = new ConcatSource(css);
|
|
86
|
+
compilation.updateAsset(file, source);
|
|
87
|
+
onUpdate(file, rawSource, css);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
onEnd();
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
UnifiedWebpackPluginV5.NS = NS;
|
|
96
|
+
|
|
97
|
+
export { UnifiedWebpackPluginV5 };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RawSource, ICommonReplaceOptions, ITempleteHandlerOptions } from "../types";
|
|
2
|
+
export declare function generateCode(match: string, options?: ICommonReplaceOptions): string;
|
|
3
|
+
export declare function extractSource(original: string): RawSource[];
|
|
4
|
+
export declare function templeteReplacer(original: string, options?: ICommonReplaceOptions): string;
|
|
5
|
+
export declare function templeteHandler(rawSource: string, options?: ICommonReplaceOptions): string;
|
|
6
|
+
export declare function customTempleteHandler(rawSource: string, options?: ITempleteHandlerOptions): string;
|
|
7
|
+
export declare function createTempleteHandler(options?: ITempleteHandlerOptions): (rawSource: string, opt?: ITempleteHandlerOptions) => string;
|
package/package.json
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "weapp-tailwindcss",
|
|
3
|
+
"version": "2.3.3",
|
|
4
|
+
"description": "把tailwindcss jit引擎,带给小程序开发者们\nbring tailwindcss jit engine to our miniprogram developers!",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"./replace": {
|
|
15
|
+
"types": "./dist/replace.d.ts",
|
|
16
|
+
"require": "./dist/replace.js",
|
|
17
|
+
"import": "./dist/replace.mjs"
|
|
18
|
+
},
|
|
19
|
+
"./postcss": {
|
|
20
|
+
"types": "./dist/postcss.d.ts",
|
|
21
|
+
"require": "./dist/postcss.js",
|
|
22
|
+
"import": "./dist/postcss.mjs"
|
|
23
|
+
},
|
|
24
|
+
"./vite": {
|
|
25
|
+
"types": "./dist/vite.d.ts",
|
|
26
|
+
"require": "./dist/vite.js",
|
|
27
|
+
"import": "./dist/vite.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./webpack": {
|
|
30
|
+
"types": "./dist/webpack.d.ts",
|
|
31
|
+
"require": "./dist/webpack.js",
|
|
32
|
+
"import": "./dist/webpack.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./gulp": {
|
|
35
|
+
"types": "./dist/gulp.d.ts",
|
|
36
|
+
"require": "./dist/gulp.js",
|
|
37
|
+
"import": "./dist/gulp.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./*": "./*"
|
|
40
|
+
},
|
|
41
|
+
"typesVersions": {
|
|
42
|
+
"*": {
|
|
43
|
+
"*": [
|
|
44
|
+
"./dist/*"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin.git"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"bin",
|
|
54
|
+
"dist"
|
|
55
|
+
],
|
|
56
|
+
"bin": {
|
|
57
|
+
"weapp-tailwindcss-webpack-plugin": "bin/weapp-tailwindcss.js",
|
|
58
|
+
"weapp-tailwindcss": "bin/weapp-tailwindcss.js",
|
|
59
|
+
"weapp-tw": "bin/weapp-tailwindcss.js"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"registry": "https://registry.npmjs.org"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"tailwindcss",
|
|
67
|
+
"weapp",
|
|
68
|
+
"wechat",
|
|
69
|
+
"mini",
|
|
70
|
+
"miniprogram",
|
|
71
|
+
"mini app",
|
|
72
|
+
"weapp-tw",
|
|
73
|
+
"weapp-tailwindcss",
|
|
74
|
+
"taro",
|
|
75
|
+
"uni-app",
|
|
76
|
+
"remax",
|
|
77
|
+
"rax",
|
|
78
|
+
"mpx",
|
|
79
|
+
"jit",
|
|
80
|
+
"mp",
|
|
81
|
+
"android",
|
|
82
|
+
"ios",
|
|
83
|
+
"小程序",
|
|
84
|
+
"vite",
|
|
85
|
+
"postcss",
|
|
86
|
+
"webpack",
|
|
87
|
+
"webpack-plugin",
|
|
88
|
+
"gulp",
|
|
89
|
+
"gulp-plugin"
|
|
90
|
+
],
|
|
91
|
+
"author": "SonOfMagic <qq1324318532@gmail.com>",
|
|
92
|
+
"license": "MIT",
|
|
93
|
+
"bugs": {
|
|
94
|
+
"url": "https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues"
|
|
95
|
+
},
|
|
96
|
+
"homepage": "https://weapp-tw.icebreaker.top",
|
|
97
|
+
"devDependencies": {
|
|
98
|
+
"@babel/core": "^7.21.4",
|
|
99
|
+
"@babel/preset-react": "^7.18.6",
|
|
100
|
+
"@icebreakers/cli": "^0.1.1",
|
|
101
|
+
"@icebreakers/eslint-config-ts": "^1.0.4",
|
|
102
|
+
"@icebreakers/readme": "0.1.0",
|
|
103
|
+
"@rollup/plugin-alias": "^5.0.0",
|
|
104
|
+
"@rollup/plugin-commonjs": "^25.0.0",
|
|
105
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
106
|
+
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
107
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
108
|
+
"@rollup/plugin-typescript": "^11.1.1",
|
|
109
|
+
"@tsconfig/recommended": "^1.0.2",
|
|
110
|
+
"@types/babel__generator": "^7.6.4",
|
|
111
|
+
"@types/babel__traverse": "^7.18.5",
|
|
112
|
+
"@types/cssesc": "^3.0.0",
|
|
113
|
+
"@types/file-saver": "^2.0.5",
|
|
114
|
+
"@types/fs-extra": "^11.0.1",
|
|
115
|
+
"@types/gulp": "^4.0.10",
|
|
116
|
+
"@types/gulp-postcss": "^8.0.3",
|
|
117
|
+
"@types/jest": "^29.5.1",
|
|
118
|
+
"@types/lodash": "^4.14.194",
|
|
119
|
+
"@types/micromatch": "^4.0.2",
|
|
120
|
+
"@types/node": "^20.2.0",
|
|
121
|
+
"@types/react": "^18.2.6",
|
|
122
|
+
"@types/semver": "^7.5.0",
|
|
123
|
+
"@types/vinyl": "^2.0.7",
|
|
124
|
+
"@types/webpack": "^5.28.1",
|
|
125
|
+
"@types/webpack-sources": "^3.2.0",
|
|
126
|
+
"@vitest/coverage-c8": "^0.31.1",
|
|
127
|
+
"autoprefixer": "^10.4.14",
|
|
128
|
+
"babel-loader": "^9.1.2",
|
|
129
|
+
"bumpp": "^9.1.0",
|
|
130
|
+
"chalk": "4.1.2",
|
|
131
|
+
"cross-env": "^7.0.3",
|
|
132
|
+
"css-loader": "^6.7.3",
|
|
133
|
+
"cssesc": "^3.0.0",
|
|
134
|
+
"defu": "6.1.2",
|
|
135
|
+
"del": "^6.1.1",
|
|
136
|
+
"eslint": "8.40.0",
|
|
137
|
+
"execa": "5",
|
|
138
|
+
"fast-glob": "^3.2.12",
|
|
139
|
+
"fs-extra": "^11.1.1",
|
|
140
|
+
"gulp": "^4.0.2",
|
|
141
|
+
"gulp-postcss": "^9.0.1",
|
|
142
|
+
"html-loader": "^4.2.0",
|
|
143
|
+
"jest": "^29.5.0",
|
|
144
|
+
"lodash": "^4.17.21",
|
|
145
|
+
"memfs": "^3.5.1",
|
|
146
|
+
"mini-css-extract-plugin": "^2.7.5",
|
|
147
|
+
"miniprogram-automator": "^0.12.0",
|
|
148
|
+
"pkg-types": "^1.0.3",
|
|
149
|
+
"postcss-load-config": "^4.0.1",
|
|
150
|
+
"postcss-loader": "^7.3.0",
|
|
151
|
+
"postcss-rem-to-responsive-pixel": "^5.1.3",
|
|
152
|
+
"prettier": "^2.8.8",
|
|
153
|
+
"rollup": "^3.22.0",
|
|
154
|
+
"rollup-plugin-visualizer": "^5.9.0",
|
|
155
|
+
"simple-functional-loader": "^1.2.1",
|
|
156
|
+
"style-loader": "^3.3.2",
|
|
157
|
+
"tailwind-children": "^0.5.0",
|
|
158
|
+
"tailwindcss": "^3.3.2",
|
|
159
|
+
"ts-jest": "^29.1.0",
|
|
160
|
+
"ts-node": "^10.9.1",
|
|
161
|
+
"ts-patch": "^2.1.0",
|
|
162
|
+
"tsd": "^0.28.1",
|
|
163
|
+
"tslib": "^2.5.1",
|
|
164
|
+
"ttypescript": "^1.5.15",
|
|
165
|
+
"typescript": "^4.9.5",
|
|
166
|
+
"typescript-transform-paths": "^3.4.6",
|
|
167
|
+
"vinyl": "^3.0.0",
|
|
168
|
+
"vite": "^4.3.7",
|
|
169
|
+
"vitest": "^0.31.1",
|
|
170
|
+
"weapp-tailwindcss-children": "^0.1.0",
|
|
171
|
+
"webpack": "^5.83.1"
|
|
172
|
+
},
|
|
173
|
+
"dependencies": {
|
|
174
|
+
"@babel/generator": "^7.21.4",
|
|
175
|
+
"@babel/parser": "^7.21.4",
|
|
176
|
+
"@babel/traverse": "^7.21.4",
|
|
177
|
+
"@babel/types": "^7.21.4",
|
|
178
|
+
"@csstools/postcss-is-pseudo-class": "^3.2.0",
|
|
179
|
+
"file-saver": "^2.0.5",
|
|
180
|
+
"micromatch": "^4.0.5",
|
|
181
|
+
"postcss": "8.4.23",
|
|
182
|
+
"postcss-selector-parser": "^6.0.13",
|
|
183
|
+
"semver": "^7.5.1",
|
|
184
|
+
"tailwindcss-mangle-shared": "^1.2.1",
|
|
185
|
+
"tailwindcss-patch": "^1.2.1"
|
|
186
|
+
},
|
|
187
|
+
"packageManager": "pnpm@8.5.1",
|
|
188
|
+
"scripts": {
|
|
189
|
+
"dev": "yarn clean && yarn dts && cross-env NODE_ENV=development rollup -c rollup.config.ts --configPlugin typescript -w",
|
|
190
|
+
"build": "yarn clean && cross-env NODE_ENV=production rollup -c rollup.config.ts --configPlugin typescript && yarn dts",
|
|
191
|
+
"build:demo": "yarn demo:del-dist && cross-env NODE_ENV=demo rollup -c rollup.config.ts --configPlugin typescript && yarn demo:sync-dist",
|
|
192
|
+
"build:tsc": "cross-env NODE_ENV=development tsc --build tsconfig.json",
|
|
193
|
+
"dts": "tsc --emitDeclarationOnly -p tsconfig.dts.json",
|
|
194
|
+
"test": "jest && vitest run",
|
|
195
|
+
"jest-u": "jest -u",
|
|
196
|
+
"vitest:test": "vitest",
|
|
197
|
+
"vitest:coverage": "vitest run --coverage",
|
|
198
|
+
"test:all": "cross-env JEST_INVALID_SKIP_CASES=1 jest",
|
|
199
|
+
"init:rename": "node scripts/init/rename.js",
|
|
200
|
+
"clean": "node scripts/clean.js",
|
|
201
|
+
"debug:web": "cd demo/web && yarn dev",
|
|
202
|
+
"raw": "ts-node scripts/raw",
|
|
203
|
+
"demo:dev": "node scripts/demo/dev.js",
|
|
204
|
+
"demo:build": "node scripts/demo/build.js",
|
|
205
|
+
"demo:build:local": "node scripts/demo/build.js --local",
|
|
206
|
+
"demo:e2e": "ts-node scripts/demo/e2e.js",
|
|
207
|
+
"demo:link": "node scripts/demo/link.js",
|
|
208
|
+
"demo:install": "node scripts/demo/install.js",
|
|
209
|
+
"demo:install:beta": "node scripts/demo/install.js --beta",
|
|
210
|
+
"demo:remove-deps": "node scripts/demo/del.js",
|
|
211
|
+
"demo:remove-test-coms": "node scripts/demo/remove-test-coms.js",
|
|
212
|
+
"demo:sync-dist": "node scripts/demo/copy-dist.js",
|
|
213
|
+
"demo:del-dist": "node scripts/demo/del-dist.js",
|
|
214
|
+
"sync": "cnpm sync weapp-tailwindcss-webpack-plugin",
|
|
215
|
+
"generate:readme": "ts-node scripts/readme/write.ts",
|
|
216
|
+
"format": "prettier --check \"src/**/*.{ts,js}\" -w",
|
|
217
|
+
"format:test": "prettier --check \"test/**/*.test.{ts,js}\" -w",
|
|
218
|
+
"ls:pack": "npm pack --dry-run",
|
|
219
|
+
"cli:patch": "node bin/weapp-tailwindcss.js patch",
|
|
220
|
+
"release": "bumpp",
|
|
221
|
+
"-------": "-----------",
|
|
222
|
+
"postinstall": "node bin/weapp-tailwindcss.js patch"
|
|
223
|
+
}
|
|
224
|
+
}
|