-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Allow custom syntax fixes #37 * Update src/syntax/tailwind-syntax.js Co-authored-by: Milos Djermanovic <[email protected]> * Fix no-invalid-at-rules tests * Add tests for CSSLanguage * Generate types for /syntax * Include syntax/index.d.ts in JSR package --------- Co-authored-by: Milos Djermanovic <[email protected]>
- Loading branch information
1 parent
3da4963
commit 397888b
Showing
15 changed files
with
501 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
export default { | ||
input: "src/index.js", | ||
output: [ | ||
{ | ||
file: "dist/cjs/index.cjs", | ||
format: "cjs", | ||
}, | ||
{ | ||
file: "dist/esm/index.js", | ||
format: "esm", | ||
banner: '// @ts-self-types="./index.d.ts"', | ||
}, | ||
], | ||
}; | ||
export default [ | ||
{ | ||
input: "src/index.js", | ||
output: [ | ||
{ | ||
file: "dist/cjs/index.cjs", | ||
format: "cjs", | ||
}, | ||
{ | ||
file: "dist/esm/index.js", | ||
format: "esm", | ||
banner: '// @ts-self-types="./index.d.ts"', | ||
}, | ||
], | ||
}, | ||
{ | ||
input: "src/syntax/index.js", | ||
output: [ | ||
{ | ||
file: "dist/cjs/syntax/index.cjs", | ||
format: "cjs", | ||
}, | ||
{ | ||
file: "dist/esm/syntax/index.js", | ||
format: "esm", | ||
banner: '// @ts-self-types="./index.d.ts"', | ||
}, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @fileoverview Common extended CSSTree syntax definitions. | ||
* @author Nicholas C. Zakas | ||
*/ | ||
|
||
export { default as tailwindSyntax } from "./tailwind-syntax.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* @fileoverview CSSTree syntax for Tailwind CSS extensions. | ||
* @author Nicholas C. Zakas | ||
*/ | ||
export default { | ||
atrules: { | ||
apply: { | ||
prelude: "<ident>+", | ||
}, | ||
tailwind: { | ||
prelude: "base | components | utilities", | ||
}, | ||
config: { | ||
prelude: "<string>", | ||
}, | ||
}, | ||
|
||
/* | ||
* CSSTree doesn't currently support custom functions properly, so leaving | ||
* these out for now. | ||
* https://github.com/csstree/csstree/issues/292 | ||
*/ | ||
// types: { | ||
// "tailwind-theme-base": "spacing | colors", | ||
// "tailwind-theme-color": "<tailwind-theme-base> [ '.' [ <ident> | <integer> ] ]+", | ||
// "tailwind-theme-name": "<tailwind-theme-color>", | ||
// "tailwind-theme()": "theme( <tailwind-theme-name>)", | ||
// }, | ||
}; |
Oops, something went wrong.