-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(css): add support for Lightning CSS (#12807)
- Loading branch information
1 parent
7f241e9
commit c6c5d49
Showing
29 changed files
with
677 additions
and
20 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
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,25 @@ | ||
import { Extractor, ExtractorConfig } from '@microsoft/api-extractor' | ||
|
||
const result = Extractor.invoke( | ||
ExtractorConfig.loadFileAndPrepare('./api-extractor.json'), | ||
{ | ||
messageCallback: (message) => { | ||
const ignore = () => { | ||
// @ts-expect-error TS requires to use the const enum, which is not available as the named export in tsx | ||
message.logLevel = 'none' | ||
} | ||
if (message.sourceFilePath?.includes('lightningcss')) { | ||
ignore() | ||
} | ||
if (message.messageId === 'ae-forgotten-export') { | ||
if (message.sourceFilePath?.endsWith('/src/types/lightningcss.d.ts')) { | ||
// We only expose LightningCSS types via prefixed types to avoid | ||
// having confusing name like "Targets" in Vite types | ||
ignore() | ||
} | ||
} | ||
}, | ||
}, | ||
) | ||
|
||
if (!result.succeeded) process.exit(1) |
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
Oops, something went wrong.