Skip to content

Improve CSS syntax highlighting #1367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Run syntax tests
run: |
cd packages/tailwindcss-language-syntax &&
pnpm run build &&
pnpm run test

- name: Run service tests
run: |
cd packages/tailwindcss-language-service &&
pnpm run build &&
pnpm run test

- name: Run tests
run: |
cd packages/tailwindcss-language-server &&
Expand Down
11 changes: 9 additions & 2 deletions packages/tailwindcss-language-service/scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { spawnSync } from 'node:child_process'
import esbuild from 'esbuild'
import minimist from 'minimist'
import { nodeExternalsPlugin } from 'esbuild-node-externals'
import { fileURLToPath } from 'node:url'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = path.dirname(fileURLToPath(import.meta.url))

const args = minimist(process.argv.slice(2), {
boolean: ['watch', 'minify'],
Expand All @@ -30,7 +31,13 @@ let build = await esbuild.context({
// Call the tsc command to generate the types
spawnSync(
'tsc',
['-p', path.resolve(__dirname, './tsconfig.build.json'), '--emitDeclarationOnly', '--outDir', path.resolve(__dirname, '../dist')],
[
'-p',
path.resolve(__dirname, './tsconfig.build.json'),
'--emitDeclarationOnly',
'--outDir',
path.resolve(__dirname, '../dist'),
],
{
stdio: 'inherit',
},
Expand Down
16 changes: 16 additions & 0 deletions packages/tailwindcss-language-syntax/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@tailwindcss/language-syntax",
"version": "0.0.0",
"private": true,
"scripts": {
"test": "vitest",
"build": " "
},
"devDependencies": {
"@types/node": "^18.19.33",
"dedent": "^1.5.3",
"vitest": "^3.1.4",
"vscode-oniguruma": "^2.0.1",
"vscode-textmate": "^9.2.0"
}
}
Loading