Created
May 2, 2024 18:41
-
-
Save spookyuser/c295d14654004d2ca7b735dce4e012e9 to your computer and use it in GitHub Desktop.
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
diff --git a/lib/config.js b/lib/config.js | |
index 14628a23a32369116a76a512a95cc584315122f9..bca2e1dab978960e2f735306a9b69fffd7215652 100644 | |
--- a/lib/config.js | |
+++ b/lib/config.js | |
@@ -8,7 +8,7 @@ const resolve_1 = require("./resolve"); | |
const just_task_logger_1 = require("just-task-logger"); | |
const enableTypeScript_1 = require("./enableTypeScript"); | |
function resolveConfigFile(args) { | |
- for (const entry of [args.config, './just.config.js', './just-task.js', './just.config.ts', args.defaultConfig]) { | |
+ for (const entry of [args.config, './just.config.js', './just.config.cjs', './just-task.js', './just.config.ts', 'just.config.cts',args.defaultConfig]) { | |
const configFile = resolve_1.resolve(entry); | |
if (configFile) { | |
return configFile; | |
@@ -23,7 +23,7 @@ function readConfig() { | |
const configFile = resolveConfigFile(args); | |
if (configFile && fs.existsSync(configFile)) { | |
const ext = path.extname(configFile); | |
- if (ext === '.ts' || ext === '.tsx') { | |
+ if (ext === '.ts' || ext === '.tsx' || ext===".cts") { | |
// TODO: add option to do typechecking as well | |
enableTypeScript_1.enableTypeScript({ transpileOnly: true, esm: args.esm }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment