-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support loading TypeScript configs in v4 (#342)
* Load TypeScript configs with Jiti * Update tests * Update changelog * Update versions
- Loading branch information
1 parent
6d3fa07
commit 2530335
Showing
23 changed files
with
199 additions
and
61 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
@import 'tailwindcss'; | ||
|
||
/* Load ESM versions */ | ||
@config './esm/my-config.mjs'; | ||
@plugin './esm/my-plugin.mjs'; | ||
|
||
/* Load Common JS versions */ | ||
@config './cjs/my-config.cjs'; | ||
@plugin './cjs/my-plugin.cjs'; | ||
|
||
/* Load TypeScript versions */ | ||
@config './ts/my-config.ts'; | ||
@plugin './ts/my-plugin.ts'; | ||
|
||
/* Attempt to load files that do not exist */ | ||
@config './missing-confg.mjs'; | ||
@plugin './missing-plugin.mjs'; | ||
|
||
@theme { | ||
--color-tomato: tomato; | ||
} |
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,9 @@ | ||
module.exports = { | ||
theme: { | ||
extend: { | ||
colors: { | ||
'cjs-from-config': 'black', | ||
}, | ||
}, | ||
}, | ||
} |
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,24 @@ | ||
const plugin = require('tailwindcss/plugin') | ||
|
||
module.exports = plugin( | ||
({ addUtilities }) => { | ||
addUtilities({ | ||
'.utility-cjs-from-plugin': { | ||
color: 'black' | ||
}, | ||
'.utility-cjs-from-plugin-2': { | ||
width: '100%', | ||
height: '100%', | ||
}, | ||
}) | ||
}, | ||
{ | ||
theme: { | ||
extend: { | ||
colors: { | ||
'cjs-from-plugin': 'black', | ||
}, | ||
}, | ||
}, | ||
}, | ||
) |
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ export default { | |
theme: { | ||
extend: { | ||
colors: { | ||
"from-config": "#3490dc", | ||
'esm-from-config': 'black', | ||
}, | ||
}, | ||
}, | ||
}; | ||
} |
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,24 @@ | ||
import plugin from 'tailwindcss/plugin' | ||
|
||
export default plugin( | ||
({ addUtilities }) => { | ||
addUtilities({ | ||
'.utility-esm-from-plugin': { | ||
color: 'black' | ||
}, | ||
'.utility-esm-from-plugin-2': { | ||
width: '100%', | ||
height: '100%', | ||
}, | ||
}) | ||
}, | ||
{ | ||
theme: { | ||
extend: { | ||
colors: { | ||
'esm-from-plugin': 'black', | ||
}, | ||
}, | ||
}, | ||
}, | ||
) |
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,3 @@ | ||
<div | ||
class="sm:bg-tomato sm:utility-cjs-from-plugin sm:utility-cjs-from-plugin-2 sm:utility-esm-from-plugin sm:utility-esm-from-plugin-2 sm:utility-ts-from-plugin sm:utility-ts-from-plugin-2 sm:bg-cjs-from-config sm:bg-cjs-from-plugin sm:bg-esm-from-config sm:bg-esm-from-plugin sm:bg-ts-from-config sm:bg-ts-from-plugin bg-red-500 utility-cjs-from-plugin utility-esm-from-plugin utility-ts-from-plugin" | ||
></div> |
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,3 @@ | ||
<div | ||
class="bg-red-500 utility-cjs-from-plugin utility-esm-from-plugin utility-ts-from-plugin sm:utility-cjs-from-plugin-2 sm:utility-esm-from-plugin-2 sm:utility-ts-from-plugin-2 sm:bg-cjs-from-config sm:bg-cjs-from-plugin sm:bg-esm-from-config sm:bg-esm-from-plugin sm:bg-tomato sm:bg-ts-from-config sm:bg-ts-from-plugin sm:utility-cjs-from-plugin sm:utility-esm-from-plugin sm:utility-ts-from-plugin" | ||
></div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.