-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: .d.ts generation and treeshakeable injector options
- Loading branch information
Showing
13 changed files
with
129 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ | |
/coverage | ||
/docs | ||
/__tests__/fixtures/dist | ||
/__tests__/fixtures/**/*.d.ts | ||
/pnpm-lock.yaml | ||
/CHANGELOG.md |
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,2 @@ | ||
import style from "./style.css"; | ||
console.log(style.module); |
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,7 @@ | ||
.inject { | ||
color: red; | ||
} | ||
|
||
.module { | ||
color: royalblue; | ||
} |
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,5 @@ | ||
export const css: string; | ||
interface ModulesExports {"primary":"#BF4040","composition":"composed_composition composition2_compositioned"} | ||
interface ModulesExports {inject:()=>void} | ||
declare const modules_2a102cc5: ModulesExports; | ||
export default modules_2a102cc5; |
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,5 +1,6 @@ | ||
import style from "./style.css"; | ||
import composed from "./composed.css"; | ||
import "./composed.css"; | ||
import composition2 from "./subdir/composition2.css"; | ||
|
||
console.log(style.module, composed.composition, composition2.compositioned); | ||
if (composition2.inject) composition2.inject(); | ||
else console.log(style.module, composition2.compositioned); |
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,5 @@ | ||
export const css: string; | ||
interface ModulesExports {"primary":"#BF4040","secondary":"#1F4F7F","module":"style_module","module2":"style_module2 composed_composition composition2_compositioned"} | ||
interface ModulesExports {inject:()=>void} | ||
declare const modules_5a199c00: ModulesExports; | ||
export default modules_5a199c00; |
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,5 @@ | ||
export const css: string; | ||
interface ModulesExports {"compositioned":"composition2_compositioned"} | ||
interface ModulesExports {inject:()=>void} | ||
declare const modules_354770d7: ModulesExports; | ||
export default modules_354770d7; |
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,3 +1,6 @@ | ||
import * as style from "./style.css"; | ||
import style, { css } from "./style.css"; | ||
|
||
console.log(style); | ||
console.log(css); | ||
for (const name of Object.values(style)) { | ||
console.log(name); | ||
} |
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,7 @@ | ||
export const css: string; | ||
export const valid: "style_valid"; | ||
export const _new: "style_new"; | ||
export const _css: "style_css"; | ||
interface ModulesExports {"valid":"style_valid","new":"style_new","css":"style_css"} | ||
declare const modules_5a199c00: ModulesExports; | ||
export default modules_5a199c00; |
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