@wolfstar/create-http-framework 2.5.1-next-20260914150239 → 2.5.1-next-20260914181351
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 +3 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -186,6 +186,7 @@ function json(value) {
|
|
|
186
186
|
function buildScripts(ctx) {
|
|
187
187
|
const scripts = {
|
|
188
188
|
dev: "stars dev",
|
|
189
|
+
...ctx.language === "ts" && ctx.buildTool === "tsdown" ? { postinstall: "stars prepare" } : {},
|
|
189
190
|
...ctx.language === "js" ? {} : { build: "stars build" },
|
|
190
191
|
start: ctx.language === "js" ? "node src/main.js" : "node dist/main.js"
|
|
191
192
|
};
|
|
@@ -279,26 +280,15 @@ const sharedCompilerOptions = {
|
|
|
279
280
|
experimentalDecorators: true,
|
|
280
281
|
emitDecoratorMetadata: true
|
|
281
282
|
};
|
|
282
|
-
/**
|
|
283
|
-
* The `paths` that make `stars`' built-in aliases type-check. Only the `tsdown` build resolves them, so only its
|
|
284
|
-
* tsconfig declares them: `tsc` emits imports untouched and would leave `~/lib/…` in the output.
|
|
285
|
-
*/
|
|
286
|
-
const STARS_ALIAS_PATHS = {
|
|
287
|
-
"~/*": ["./src/*"],
|
|
288
|
-
"@/*": ["./src/*"],
|
|
289
|
-
"~~/*": ["./*"],
|
|
290
|
-
"@@/*": ["./*"]
|
|
291
|
-
};
|
|
292
283
|
/** Writes the tsconfig(s). The tsc branches use a composite build so `tsc -b src` resolves `src/tsconfig.json`. */
|
|
293
284
|
function writeTsconfig(targetDir, ctx) {
|
|
294
285
|
if (ctx.language === "js") return;
|
|
295
286
|
if (ctx.buildTool === "tsdown") {
|
|
296
287
|
writeFile(join(targetDir, "tsconfig.json"), json({
|
|
288
|
+
extends: "./.stars/tsconfig.json",
|
|
297
289
|
compilerOptions: {
|
|
298
|
-
...sharedCompilerOptions,
|
|
299
290
|
outDir: "./dist",
|
|
300
|
-
rootDir: "./src"
|
|
301
|
-
paths: STARS_ALIAS_PATHS
|
|
291
|
+
rootDir: "./src"
|
|
302
292
|
},
|
|
303
293
|
include: ["src/**/*.ts", ".stars/*.d.ts"],
|
|
304
294
|
exclude: ["node_modules", "dist"]
|