Skip to content

Commit 118c0ab

Browse files
committed
feat: remove tools.tailwindcss
1 parent 2886ad0 commit 118c0ab

File tree

21 files changed

+56
-202
lines changed

21 files changed

+56
-202
lines changed

packages/document/main-doc/docs/en/apis/app/commands.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Open the above HTML file in the browser, you can see the tile diagram of the bun
108108

109109
The `modern new` command is used to enable features in an existing project.
110110

111-
For example, add application entry, enable some optional features such as Tailwind CSS, micro frontend, etc.
111+
For example, add application entry, enable some optional features such as BFF, micro frontend, etc.
112112

113113
```bash
114114
Usage: modern new [options]
@@ -142,8 +142,7 @@ In the project, execute the `new` command to enable features as follows:
142142
$ npx modern new
143143
? Please select the operation you want: Enable Features
144144
? Please select the feature name: (Use arrow keys)
145-
❯ Enable Tailwind CSS
146-
Enable BFF
145+
❯ Enable BFF
147146
Enable SSG
148147
Enable Micro Frontend
149148
```

packages/document/main-doc/docs/en/configure/app/tools/tailwindcss.mdx

Lines changed: 0 additions & 66 deletions
This file was deleted.

packages/document/main-doc/docs/en/configure/app/usage.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ Due to the limitations of the JSON file format, only simple types such as number
150150
#### Notes
151151

152152
- It is not recommended to use both `package.json` and `modern.config.js` for configuration simultaneously. If both are used and conflicts arise, Modern.js will prompt an error in the command line.
153-
- The `@modern-js/runtime` exports a similarly named [defineConfig](/apis/app/runtime/app/define-config) API, so please be careful to distinguish between them.
154153

155154
### Local Debugging Configuration
156155

packages/document/main-doc/docs/en/guides/advanced-features/low-level.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ Currently provided is as follows:
3939
| Less | [tools.less](/configure/app/tools/less) |
4040
| Sass | [tools.sass](/configure/app/tools/sass) |
4141
| Minify CSS | [tools.minifyCss](/configure/app/tools/minify-css) |
42-
| Tailwind CSS | [tools.tailwind](/configure/app/tools/tailwindcss) |
4342
| Autoprefixer | [tools.autoprefixer](/configure/app/tools/autoprefixer) |

packages/document/main-doc/docs/en/guides/basic-features/css/tailwindcss.mdx

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,30 @@ module.exports = {
6565

6666
#### 5. Twin.macro Integration
6767

68-
If your project uses twin.macro, perform the following steps; otherwise, ignore:
69-
70-
- Manually install dependencies: `pnpm add twin.macro styled-components -D`
71-
- Add the `babel-plugin-macros.config.cjs` configuration file:
72-
73-
```js title="babel-plugin-macros.config.cjs"
74-
module.exports = {
75-
twin: {
76-
preset: 'styled-components',
77-
config: './tailwind.config.js',
68+
If the project uses twin.macro, perform the following steps; otherwise, ignore:
69+
70+
- Manually install dependencies: `pnpm add twin.macro styled-components babel-plugin-macros -D`
71+
- Configure the `babel-plugin-macros` Babel plugin:
72+
73+
```ts title="modern.config.ts"
74+
export default defineConfig({
75+
plugins: [appTools()],
76+
tools: {
77+
babel: {
78+
plugins: [
79+
[
80+
'babel-plugin-macros',
81+
{
82+
twin: {
83+
preset: 'styled-components',
84+
config: './tailwind.config.ts',
85+
},
86+
},
87+
],
88+
],
89+
},
7890
},
79-
};
91+
});
8092
```
8193

8294
#### Tailwind CSS V2 Migration

packages/document/main-doc/docs/en/guides/get-started/tech-stack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Modern.js uses [PostCSS](https://postcss.org/) to transform CSS code and enables
5252

5353
Modern.js supports enabling ["Lightning CSS"](/configure/app/tools/lightningcss-loader), which uses Lightning CSS to downgrade CSS syntax.
5454

55-
Modern.js supports enabling ["Tailwind CSS"](/guides/basic-features/css/tailwindcss) and is compatible with both Tailwind CSS v2 and v3.
55+
Modern.js supports enabling ["Tailwind CSS"](/guides/basic-features/css/tailwindcss) and is compatible with both Tailwind CSS v3 and v4.
5656

5757
## CSS Preprocessors
5858

packages/document/main-doc/docs/en/plugin/cli-plugins/api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Checks if a specified plugin is registered.
132132
- **Example:**
133133

134134
```typescript
135-
if (api.isPluginExists('@modern-js/plugin-tailwind')) {
136-
console.log('Tailwind CSS plugin is enabled');
135+
if (api.isPluginExists('@modern-js/plugin-bff')) {
136+
console.log('BFF plugin is enabled');
137137
}
138138
```
139139

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["plugin-tailwind", "plugin-bff", "plugin-ssg"]
1+
["plugin-bff", "plugin-ssg"]

packages/document/main-doc/docs/en/plugin/official/cli-plugins/plugin-tailwind.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/document/main-doc/docs/zh/apis/app/commands.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ info Production file sizes:
108108

109109
`modern new` 命令用于在已有项目中添加项目元素。
110110

111-
比如添加应用入口、启用一些可选功能如 Tailwind CSS、微前端开发模式等。
111+
比如添加应用入口、启用一些可选功能如 BFF、微前端开发模式等。
112112

113113
```bash
114114
Usage: modern new [options]
@@ -142,8 +142,7 @@ $ npx modern new
142142
$ npx modern new
143143
? 请选择你想要的操作 启用可选功能
144144
? 请选择功能名称 (Use arrow keys)
145-
❯ 启用 「Tailwind CSS」 支持
146-
启用「BFF」功能
145+
❯ 启用「BFF」功能
147146
启用「微前端」模式
148147
```
149148

0 commit comments

Comments
 (0)