@wolfstar/create-http-framework 2.4.1 → 2.5.0-next-20260913191701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -321,23 +321,15 @@ function writeTsconfig(targetDir, ctx) {
|
|
|
321
321
|
}));
|
|
322
322
|
}
|
|
323
323
|
/**
|
|
324
|
-
* Writes the `stars.config.*` file read by the `stars` CLI (`dev`, `build`, `info`, `codegen` scripts).
|
|
325
|
-
*
|
|
326
|
-
* what `future.compatibilityVersion: 4` means for a generated project.
|
|
324
|
+
* Writes the `stars.config.*` file read by the `stars` CLI (`dev`, `build`, `info`, `codegen` scripts). Conventional
|
|
325
|
+
* JavaScript and tsdown projects need no options; an explicit tsc selection is the only generated override.
|
|
327
326
|
*/
|
|
328
327
|
function writeStarsConfig(targetDir, ctx) {
|
|
329
328
|
const isJs = ctx.language === "js";
|
|
330
|
-
const isTsdown = !isJs && ctx.buildTool === "tsdown";
|
|
331
329
|
const content = [
|
|
332
330
|
"import { defineConfig } from '@wolfstar/http-framework/config';",
|
|
333
331
|
"",
|
|
334
|
-
|
|
335
|
-
`\tentry: 'src/main.${isJs ? "js" : "ts"}',`,
|
|
336
|
-
`\tbuild: ${isJs ? "{ tool: 'none' }" : isTsdown ? "{ tool: 'tsdown' }" : "{ tool: 'tsc', tsconfig: 'src/tsconfig.json' }"},`,
|
|
337
|
-
" // The next major's defaults: auto imports wired into the build, and `tsdown` configured from this file.",
|
|
338
|
-
" future: { compatibilityVersion: 4 }",
|
|
339
|
-
...isTsdown ? [" // The build needs nothing else. Add a `tsdown` block for what the defaults cannot know,", " // such as a plugin that copies assets into dist/."] : [],
|
|
340
|
-
"});",
|
|
332
|
+
`export default defineConfig(${!isJs && ctx.buildTool !== "tsdown" ? "{ build: { tool: 'tsc' } }" : "{}"});`,
|
|
341
333
|
""
|
|
342
334
|
].join("\n");
|
|
343
335
|
writeFile(join(targetDir, isJs ? "stars.config.js" : "stars.config.ts"), content);
|
package/package.json
CHANGED