Skip to content

Commit

Permalink
Merge pull request #6 from xlboy/release/0.6.0
Browse files Browse the repository at this point in the history
release: 0.6.0
  • Loading branch information
xlboy authored Oct 15, 2024
2 parents df66fbc + 556364f commit 8732e1b
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 135 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--disable-extensions",
"--enable-extension=asvetliakov.vscode-neovim"
// "--disable-extensions",
// "--enable-extension=asvetliakov.vscode-neovim"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.6.0 (2024-10-14)

## Added

- Added support for Vue and Svelte frameworks

# 0.5.0 (2024-09-20)

## Added
Expand Down
127 changes: 78 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,62 +30,91 @@ After installing the extension, simply configure it as follows.

## Configuration

- `twind-intellisense.enabled`: Enable the extension
### `twind-intellisense.enabled`

- Type: `boolean`
- Default: `true`
- Description: Enable the extension

- `twind-intellisense.presets`: Presets used in the project
- Type: `boolean`

- Type: `Array<'tailwind' | '[email protected]' | 'tailwind-forms' | 'autoprefix' | 'container-queries' | 'line-clamp' | 'radix-ui' | 'typography'>`
- Default: `["tailwind"]`
- Default: `true`

> Note: If your project uses the `tailwind` preset, be sure to add it.
> `[email protected]` corresponds to `@phoenix-twind/preset-tailwind`, supports the latest `[email protected]`.
> `tailwind` corresponds to `@twind/preset-tailwind`, and the others follow similarly.
### `twind-intellisense.presets`

- `twind-intellisense.configPath`: Path to the Twind configuration file
- Description: Presets used in the project

- Type: `string | undefined`
- Type: `Array<'tailwind' | '[email protected]' | 'tailwind-forms' | 'autoprefix' | 'container-queries' | 'line-clamp' | 'radix-ui' | 'typography'>`
- Default: `["tailwind"]`

> This can be the full path to the configuration file (e.g., `<...>/twind.config.js`).
> or the directory containing the configuration file (e.g., `<...>`, which will automatically look for `twind.config.(js|ts)`).
> If not specified, the extension will look for the configuration file in the workspace folder (e.g., `${workspaceFolder}/twind.config.(js|ts)`)
- Additional Notes:

- `twind-intellisense.colorPreview`:
- Type: `object`
- Properties:
- `enabled`:
- Type: `boolean`
- Default: `true`
- Description: Whether to enable the color preview feature
- Example:
```json
{
"twind-intellisense.colorPreview": {
"enabled": true
}
If your project uses the `tailwind` preset, be sure to add it.

`[email protected]` corresponds to `@phoenix-twind/preset-tailwind`, supports the latest `[email protected]`.

`tailwind` corresponds to `@twind/preset-tailwind`, and the others follow similarly.

### `twind-intellisense.configPath`

- Description: Path to the Twind configuration file

- Type: `string | undefined`

- Additional Notes:

This should be specified relative to the workspace root.

1. You can specify the full path to the configuration file, e.g., `'path/to/twind.config.js'`
2. You can specify the directory containing the configuration file, e.g., `'path/to/'` (it will automatically look for `twind.config.js` or `twind.config.ts` in that directory)
3. If not specified, it will default to looking for `'twind.config.(js|ts)'` in the workspace root directory

Additionally, even on Windows systems, always use forward slashes (`/`) as path separators

### `twind-intellisense.colorPreview`

- Description: Color preview configuration

- Type: `object`

- Properties:

- `enabled`:
- Description: Whether to enable the color preview feature
- Type: `boolean`
- Default: `true`

- Example:
```json
{
"twind-intellisense.colorPreview": {
"enabled": true
}
```
- `twind-intellisense.classExtraction`: Configuration for class extraction

- Type: `object`
- Properties:
- `prefixes`:
- Type: `Array<string>`
- Description: The prefixes of classes to extract, as regex strings. For example: `"class(Name)?="`
- `ignorePrefixes`:
- Type: `Array<string>`
- Description: The prefixes of classes to ignore, as regex strings. For example: ``"css(?=`|\()"``
- Example:
```json
{
"twind-intellisense.classExtraction": {
"prefixes": ["class(Name)?="],
"ignorePrefixes": ["css(?=`|()"]
}
}
```

### `twind-intellisense.classExtraction`

- Description: Configuration for class extraction

- Type: `object`

- Properties:

- `prefixes`:
- Description: The prefixes of classes to extract, as regex strings. For example: `"class(Name)?="`
- Type: `Array<string>`
- `ignorePrefixes`:
- Description: The prefixes of classes to ignore, as regex strings. For example: ``"css(?=`|\()"``
- Type: `Array<string>`

- Example:
```json
{
"twind-intellisense.classExtraction": {
"prefixes": ["class(Name)?="],
"ignorePrefixes": ["css(?=`|()"]
}
```
}
```

## Language Support Status

Expand All @@ -94,9 +123,9 @@ After installing the extension, simply configure it as follows.
- [x] JavaScriptReact
- [x] TypeScript
- [x] TypeScriptReact
- [ ] Vue
- [ ] Svelte
- [ ] SolidJS
- [x] Vue
- [x] Svelte
- [x] SolidJS
- [ ] ...

## CHANGELOG
Expand Down
96 changes: 62 additions & 34 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,57 @@

## 配置

- `twind-intellisense.enabled`: 是否启用插件
### `twind-intellisense.enabled`

- 类型:`boolean`
- 默认值:`true`
- 描述:是否启用插件

- `twind-intellisense.presets`: 项目中使用到的预设
- 类型:`boolean`

- 类型:`Array<'tailwind' | '[email protected]' | 'tailwind-forms' | 'autoprefix' | 'container-queries' | 'line-clamp' | 'radix-ui' | 'typography'>`
- 默认值:`["tailwind"]`
> 请注意,如果你的项目中使用了 `tailwind` 预设,请务必添加。
> `[email protected]` 即为 `@phoenix-twind/preset-tailwind`(支持最新的 `[email protected]`
> `tailwind` 即为 `@twind/preset-tailwind`,其余的也是同理。
- 默认值:`true`

- `twind-intellisense.configPath`: Twind 配置文件路径
### `twind-intellisense.presets`

- 类型:`string | undefined`
> 可以是配置文件的完整路径(如:`<...>/lib/twind.ts`
> 或是包含配置文件的目录路径(如:`<...>/lib`,会自动在此目录下寻找 `twind.config.(js|ts)` 配置文件)
> 如果不填,将会在工作区文件夹中查找配置文件(如:`${workspaceFolder}/twind.config.(js|ts)`
- 描述:项目中使用到的预设

- `twind-intellisense.colorPreview`:
- 类型:`object`
- 属性:
- `enabled`:
- 类型:`boolean`
- 默认值:`true`
- 描述:是否启用颜色预览功能
- 类型:`Array<'tailwind' | '[email protected]' | 'tailwind-forms' | 'autoprefix' | 'container-queries' | 'line-clamp' | 'radix-ui' | 'typography'>`

- 默认值:`["tailwind"]`

- 额外说明:

请注意,如果你的项目中使用了 `tailwind` 预设,请务必添加。

`[email protected]` 即为 `@phoenix-twind/preset-tailwind`(支持最新的 `[email protected]`

`tailwind` 即为 `@twind/preset-tailwind`,其余的也是同理。

### `twind-intellisense.configPath`

- 描述:Twind 配置文件路径

- 类型:`string | undefined`

- 额外说明:

该路径应相对于工作区根目录。

1. 可填配置文件的完整路径,例如:`'path/to/twind.config.js'`
2. 可填包含配置文件的目录路径,例如:`'path/to/'`(将自动在该目录下查找 `twind.config.js``twind.config.ts`
3. 不填则默认在工作区根目录查找 `'twind.config.(js|ts)'`

另外,即使在 Windows 系统上,也请始终使用正斜杠(`/`)作为路径分隔符

### `twind-intellisense.colorPreview`

- 描述:颜色预览配置

- 类型:`object`

- 属性:
- `enabled`:
- 类型:`boolean`
- 默认值:`true`
- 描述:是否启用颜色预览功能
- 示例:
```json
{
Expand All @@ -65,16 +89,20 @@
}
}
```
- `twind-intellisense.classExtraction`: 提取类的相关配置

- 类型:`object`
- 属性:
- `prefixes`:
- 类型:`Array<string>`
- 描述:要提取的类前缀,参数类型为正则字符串,例如:`"class(Name)?="`
- `ignorePrefixes`:
- 类型:`Array<string>`
- 描述:要忽略的类前缀,参数类型为正则字符串,例如:``"css(?=`|\()"``

### `twind-intellisense.classExtraction`

- 描述:提取类的相关配置

- 类型:`object`

- 属性:
- `prefixes`:
- 类型:`Array<string>`
- 描述:要提取的类前缀,参数类型为正则字符串,例如:`"class(Name)?="`
- `ignorePrefixes`:
- 类型:`Array<string>`
- 描述:要忽略的类前缀,参数类型为正则字符串,例如:`"css(?=`|()"`
- 示例:
```json
{
Expand All @@ -92,9 +120,9 @@
- [x] JavaScriptReact
- [x] TypeScript
- [x] TypeScriptReact
- [ ] Vue
- [ ] Svelte
- [ ] SolidJS
- [x] Vue
- [x] Svelte
- [x] SolidJS
- [ ] ...

## CHANGELOG
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-twind-intellisense",
"publisher": "xlboy",
"displayName": "Twind Intellisense (Phoenix)",
"version": "0.5.0",
"version": "0.6.0",
"description": "[email protected] Intellisense for VSCode. Enhancing your Twind development experience.",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -69,7 +69,7 @@
},
"twind-intellisense.configPath": {
"type": "string",
"markdownDescription": "Path to the Twind configuration file.\n\nThis can be the full path to the configuration file (e.g., `<...>/twind.config.js`),\n\nor the directory containing the configuration file (e.g., `<...>`, which will automatically look for `twind.config.(js|ts)`).\n\nIf not specified, the extension will look for the configuration file in the workspace folder (e.g., `${workspaceFolder}/twind.config.(js|ts)`)."
"markdownDescription": "**This should be specified relative to the workspace root.**\n\n1. You can specify the full path to the configuration file, e.g., `'path/to/twind.config.js'`\n\n2. You can specify the directory containing the configuration file, e.g., `'path/to/'` (it will automatically look for `twind.config.js` or `twind.config.ts` in that directory) \n\n3. If not specified, it will default to looking for `'twind.config.(js|ts)'` in the workspace root directory \n\nAdditionally, even on Windows systems, always use forward slashes (`/`) as path separators"
},
"twind-intellisense.colorPreview": {
"type": "object",
Expand Down Expand Up @@ -114,7 +114,7 @@
},
"devDependencies": {
"@ctrl/tinycolor": "^4.1.0",
"@phoenix-twind/intellisense": "^1.1.4-alpha.4",
"@phoenix-twind/intellisense": "^1.1.4-alpha.5",
"@phoenix-twind/preset-tailwind": "^1.2.0-alpha.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@tsconfig/node20": "^20.1.4",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8732e1b

Please sign in to comment.