@modern-js/plugin-tailwindcss 0.0.0-next-1684308281289 → 0.0.0-next-1684333328522
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/CHANGELOG.md +10 -6
- package/dist/cjs/cli.js +16 -11
- package/dist/esm/cli.js +16 -11
- package/dist/esm-node/cli.js +16 -11
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
# @modern-js/plugin-tailwindcss
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1684333328522
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 25e28a949: fix(tailwindcss): avoid unnecessary rebuild when running dev
|
|
8
|
+
|
|
9
|
+
fix(tailwindcss): 修复 dev 模式下不必要的重新构建
|
|
10
|
+
|
|
11
|
+
- 6b9d90aec: chore: remove @babel/runtime. add @swc/helper and enable `externalHelper` config.
|
|
8
12
|
chore: 移除 @babel/runtime 依赖. 增加 @swc/helpers 依赖并且开启 `externalHelpers` 配置
|
|
9
|
-
- Updated dependencies [
|
|
10
|
-
- Updated dependencies [
|
|
11
|
-
- @modern-js/utils@0.0.0-next-
|
|
12
|
-
- @modern-js/runtime@0.0.0-next-
|
|
13
|
+
- Updated dependencies [3c4e0a508]
|
|
14
|
+
- Updated dependencies [6b9d90aec]
|
|
15
|
+
- @modern-js/utils@0.0.0-next-1684333328522
|
|
16
|
+
- @modern-js/runtime@0.0.0-next-1684333328522
|
|
13
17
|
|
|
14
18
|
## 2.19.1
|
|
15
19
|
|
package/dist/cjs/cli.js
CHANGED
|
@@ -23,6 +23,21 @@ const supportCssInJsLibrary = "styled-components";
|
|
|
23
23
|
const getRandomTwConfigFileName = (internalDirectory) => {
|
|
24
24
|
return (0, _utils.slash)(_path.default.join(internalDirectory, `tailwind.config.${Date.now()}.${(0, _utils.nanoid)()}.js`));
|
|
25
25
|
};
|
|
26
|
+
function getDefaultContent(appDirectory) {
|
|
27
|
+
const defaultContent = [
|
|
28
|
+
"./src/**/*.js",
|
|
29
|
+
"./src/**/*.jsx",
|
|
30
|
+
"./src/**/*.ts",
|
|
31
|
+
"./src/**/*.tsx"
|
|
32
|
+
];
|
|
33
|
+
if (_utils.fs.existsSync(_path.default.join(appDirectory, "storybook"))) {
|
|
34
|
+
defaultContent.push("./storybook/**/*");
|
|
35
|
+
}
|
|
36
|
+
if (_utils.fs.existsSync(_path.default.join(appDirectory, "config/html"))) {
|
|
37
|
+
defaultContent.push("./config/html/**/*.html", "./config/html/**/*.ejs", "./config/html/**/*.hbs");
|
|
38
|
+
}
|
|
39
|
+
return defaultContent;
|
|
40
|
+
}
|
|
26
41
|
const _default = ({ pluginName } = {
|
|
27
42
|
pluginName: "@modern-js/plugin-tailwindcss"
|
|
28
43
|
}) => {
|
|
@@ -40,17 +55,7 @@ const _default = ({ pluginName } = {
|
|
|
40
55
|
const haveTwinMacro = await (0, _utils1.checkTwinMacroExist)(appDirectory);
|
|
41
56
|
const tailwindPath = (0, _utils1.getTailwindPath)(appDirectory);
|
|
42
57
|
const tailwindVersion = (0, _utils1.getTailwindVersion)(appDirectory);
|
|
43
|
-
const defaultContent =
|
|
44
|
-
"./config/html/**/*.html",
|
|
45
|
-
"./config/html/**/*.ejs",
|
|
46
|
-
"./config/html/**/*.hbs",
|
|
47
|
-
"./src/**/*.js",
|
|
48
|
-
"./src/**/*.jsx",
|
|
49
|
-
"./src/**/*.ts",
|
|
50
|
-
"./src/**/*.tsx",
|
|
51
|
-
// about storybook
|
|
52
|
-
"./storybook/**/*"
|
|
53
|
-
];
|
|
58
|
+
const defaultContent = getDefaultContent(appDirectory);
|
|
54
59
|
return {
|
|
55
60
|
prepare() {
|
|
56
61
|
if (haveTwinMacro) {
|
package/dist/esm/cli.js
CHANGED
|
@@ -9,6 +9,21 @@ var supportCssInJsLibrary = "styled-components";
|
|
|
9
9
|
export var getRandomTwConfigFileName = function(internalDirectory) {
|
|
10
10
|
return slash(path.join(internalDirectory, "tailwind.config.".concat(Date.now(), ".").concat(nanoid(), ".js")));
|
|
11
11
|
};
|
|
12
|
+
function getDefaultContent(appDirectory) {
|
|
13
|
+
var defaultContent = [
|
|
14
|
+
"./src/**/*.js",
|
|
15
|
+
"./src/**/*.jsx",
|
|
16
|
+
"./src/**/*.ts",
|
|
17
|
+
"./src/**/*.tsx"
|
|
18
|
+
];
|
|
19
|
+
if (fs.existsSync(path.join(appDirectory, "storybook"))) {
|
|
20
|
+
defaultContent.push("./storybook/**/*");
|
|
21
|
+
}
|
|
22
|
+
if (fs.existsSync(path.join(appDirectory, "config/html"))) {
|
|
23
|
+
defaultContent.push("./config/html/**/*.html", "./config/html/**/*.ejs", "./config/html/**/*.hbs");
|
|
24
|
+
}
|
|
25
|
+
return defaultContent;
|
|
26
|
+
}
|
|
12
27
|
export default function() {
|
|
13
28
|
var pluginName = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
14
29
|
pluginName: "@modern-js/plugin-tailwindcss"
|
|
@@ -37,17 +52,7 @@ export default function() {
|
|
|
37
52
|
haveTwinMacro = _state.sent();
|
|
38
53
|
tailwindPath = getTailwindPath(appDirectory);
|
|
39
54
|
tailwindVersion = getTailwindVersion(appDirectory);
|
|
40
|
-
defaultContent =
|
|
41
|
-
"./config/html/**/*.html",
|
|
42
|
-
"./config/html/**/*.ejs",
|
|
43
|
-
"./config/html/**/*.hbs",
|
|
44
|
-
"./src/**/*.js",
|
|
45
|
-
"./src/**/*.jsx",
|
|
46
|
-
"./src/**/*.ts",
|
|
47
|
-
"./src/**/*.tsx",
|
|
48
|
-
// about storybook
|
|
49
|
-
"./storybook/**/*"
|
|
50
|
-
];
|
|
55
|
+
defaultContent = getDefaultContent(appDirectory);
|
|
51
56
|
return [
|
|
52
57
|
2,
|
|
53
58
|
{
|
package/dist/esm-node/cli.js
CHANGED
|
@@ -7,6 +7,21 @@ const supportCssInJsLibrary = "styled-components";
|
|
|
7
7
|
export const getRandomTwConfigFileName = (internalDirectory) => {
|
|
8
8
|
return slash(path.join(internalDirectory, `tailwind.config.${Date.now()}.${nanoid()}.js`));
|
|
9
9
|
};
|
|
10
|
+
function getDefaultContent(appDirectory) {
|
|
11
|
+
const defaultContent = [
|
|
12
|
+
"./src/**/*.js",
|
|
13
|
+
"./src/**/*.jsx",
|
|
14
|
+
"./src/**/*.ts",
|
|
15
|
+
"./src/**/*.tsx"
|
|
16
|
+
];
|
|
17
|
+
if (fs.existsSync(path.join(appDirectory, "storybook"))) {
|
|
18
|
+
defaultContent.push("./storybook/**/*");
|
|
19
|
+
}
|
|
20
|
+
if (fs.existsSync(path.join(appDirectory, "config/html"))) {
|
|
21
|
+
defaultContent.push("./config/html/**/*.html", "./config/html/**/*.ejs", "./config/html/**/*.hbs");
|
|
22
|
+
}
|
|
23
|
+
return defaultContent;
|
|
24
|
+
}
|
|
10
25
|
export default ({ pluginName } = {
|
|
11
26
|
pluginName: "@modern-js/plugin-tailwindcss"
|
|
12
27
|
}) => {
|
|
@@ -24,17 +39,7 @@ export default ({ pluginName } = {
|
|
|
24
39
|
const haveTwinMacro = await checkTwinMacroExist(appDirectory);
|
|
25
40
|
const tailwindPath = getTailwindPath(appDirectory);
|
|
26
41
|
const tailwindVersion = getTailwindVersion(appDirectory);
|
|
27
|
-
const defaultContent =
|
|
28
|
-
"./config/html/**/*.html",
|
|
29
|
-
"./config/html/**/*.ejs",
|
|
30
|
-
"./config/html/**/*.hbs",
|
|
31
|
-
"./src/**/*.js",
|
|
32
|
-
"./src/**/*.jsx",
|
|
33
|
-
"./src/**/*.ts",
|
|
34
|
-
"./src/**/*.tsx",
|
|
35
|
-
// about storybook
|
|
36
|
-
"./storybook/**/*"
|
|
37
|
-
];
|
|
42
|
+
const defaultContent = getDefaultContent(appDirectory);
|
|
38
43
|
return {
|
|
39
44
|
prepare() {
|
|
40
45
|
if (haveTwinMacro) {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1684333328522",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"babel-plugin-macros": "3.1.0",
|
|
50
50
|
"hoist-non-react-statics": "^3.3.2",
|
|
51
51
|
"@swc/helpers": "0.5.1",
|
|
52
|
-
"@modern-js/utils": "0.0.0-next-
|
|
52
|
+
"@modern-js/utils": "0.0.0-next-1684333328522"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/jest": "^29",
|
|
@@ -59,17 +59,17 @@
|
|
|
59
59
|
"jest": "^29",
|
|
60
60
|
"react": "^18",
|
|
61
61
|
"postcss": "8.4.21",
|
|
62
|
-
"@modern-js/core": "0.0.0-next-
|
|
63
|
-
"@modern-js/
|
|
64
|
-
"@modern-js/
|
|
65
|
-
"@modern-js/types": "0.0.0-next-
|
|
66
|
-
"@scripts/build": "0.0.0-next-
|
|
67
|
-
"@modern-js/app-tools": "0.0.0-next-
|
|
68
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
62
|
+
"@modern-js/core": "0.0.0-next-1684333328522",
|
|
63
|
+
"@modern-js/runtime": "0.0.0-next-1684333328522",
|
|
64
|
+
"@modern-js/module-tools": "0.0.0-next-1684333328522",
|
|
65
|
+
"@modern-js/types": "0.0.0-next-1684333328522",
|
|
66
|
+
"@scripts/build": "0.0.0-next-1684333328522",
|
|
67
|
+
"@modern-js/app-tools": "0.0.0-next-1684333328522",
|
|
68
|
+
"@scripts/jest-config": "0.0.0-next-1684333328522"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"tailwindcss": ">= 2.0.0 || >= 3.0.0",
|
|
72
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
72
|
+
"@modern-js/runtime": "0.0.0-next-1684333328522"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"@modern-js/runtime": {
|