-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Enable ESM and TS based config files #10785
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
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
25716e7
add `jiti` and `detective-typescript` dependencies
RobinMalfait e1bc353
use `jiti` and `detective-typescript`
RobinMalfait f1614c8
use `@swc/core` instead of the built-in `babel` form `jiti`
RobinMalfait dff3dc9
update changelog
RobinMalfait de52eb7
add `jiti` and `detective-typescript` dependencies to `stable`
RobinMalfait ca82433
use `sucrase` to transform the configs
RobinMalfait 44fffbb
add `sucrase` dependency to `stable` engine
RobinMalfait ff9540c
make loading the config easier
RobinMalfait 96f683e
use abstracted loading config utils
RobinMalfait 3a4a421
WIP: make `load` related files public API
RobinMalfait 59f2594
use new config loader in PostCSS plugin
RobinMalfait 08909e0
add list of default config files to look for
RobinMalfait 7498f39
cleanup unused arguments
RobinMalfait 90e3d8f
find default config path when using CLI
RobinMalfait ebec943
improve `init` command
RobinMalfait ddacbc8
make eslint happy
RobinMalfait b9dfa14
keep all files in `stubs` folder
RobinMalfait 30cf66f
add `tailwind.config.js` stub file
RobinMalfait b3c6086
Initialize PostCSS config using the same format as Tailwind config
adamwathan 33c3b04
Rename config content stubs to config.*.js
adamwathan 13b03d7
Improve option descriptions for init options
adamwathan 8283c2d
Remove unused code, remove `constants` file
adamwathan 9604485
Fix TS warning
adamwathan 76296e7
apply CLI changes to the Oxide version
RobinMalfait 1ec55a2
update `--help` output in CLI tests
RobinMalfait f114cb0
WIP: make tests work on CI
RobinMalfait 2367d02
wip
thecrypticace 74d51f6
remove unused `fs`
RobinMalfait 5f83b57
Fix init tests
thecrypticace 8435352
bump `napi-derive`
RobinMalfait eeb8eb4
list extensions we are interested in
RobinMalfait 407ab20
no-op the `removeFile` if file doesn't exist
RobinMalfait cbfae98
ensure all `init` flags work
RobinMalfait 6813c0c
ensure we cleanup the new files
RobinMalfait 1fd103f
test ESM/CJS generation based on package.json
RobinMalfait 3254069
remove unnecessary test
RobinMalfait e3102e8
only look for `TypeScript` files when the entryFile is `TypeScript` a…
RobinMalfait eaac06c
refactor `load` to be `loadConfig`
RobinMalfait 9fb6160
use the `config.full.js` stub instead of the `defaultConfig.stub.js` …
RobinMalfait 2e385d5
apply `load` -> `loadConfig` changes to `Oxide` engine CLI
RobinMalfait 9bcf8ba
ensure we write the config file in the Oxide engine
RobinMalfait 444b526
improve type in Oxide engine CLI
RobinMalfait f40fdc4
catch errors instead of checking if the file exists
RobinMalfait e853901
ensure we publish the correct stub files
RobinMalfait File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,4 @@ | ||
import type { Config } from './types/config' | ||
|
||
declare function loadConfig(path: string): Config | ||
export = loadConfig | ||
This file contains hidden or 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 @@ | ||
let loadConfig = require('./lib/public/load-config') | ||
module.exports = (loadConfig.__esModule ? loadConfig : { default: loadConfig }).default |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.