create-rsc-kit 0.29.7 → 0.29.9
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/init.js +4 -2
- package/dist/templates.d.ts +6 -3
- package/dist/templates.js +5 -6
- package/package.json +1 -1
package/dist/init.js
CHANGED
|
@@ -394,7 +394,7 @@ function manualPluginStep(o, existing) {
|
|
|
394
394
|
const p = t.paths(o);
|
|
395
395
|
const shown = [
|
|
396
396
|
`sourceDir: '${p.sourceDir}'`,
|
|
397
|
-
`outDir: '${p.outDir}'
|
|
397
|
+
...(p.outDir ? [`outDir: '${p.outDir}'`] : []),
|
|
398
398
|
...(p.hotFile ? [`hotFile: '${p.hotFile}'`] : []),
|
|
399
399
|
].join(', ');
|
|
400
400
|
return {
|
|
@@ -559,7 +559,9 @@ function gitignore(o, dir) {
|
|
|
559
559
|
// Everything the build writes: the bundles, Nitro's output, and the hot
|
|
560
560
|
// file. The hot file is the worst of them to commit — it points every other
|
|
561
561
|
// machine at a dev server that is not running there.
|
|
562
|
-
|
|
562
|
+
// dist: the compiled binary or a static export. *.bun-build: what
|
|
563
|
+
// bun build --compile leaves behind in the project.
|
|
564
|
+
const all = ['.output', 'dist', '*.bun-build', ...(p.outDir ? [p.outDir] : []), ...(p.hotFile ? [p.hotFile] : [])];
|
|
563
565
|
const outputs = all.filter((path) => !all.some((other) => other !== path && path.startsWith(other + '/')));
|
|
564
566
|
// A backend's secret lives in .env, which is the file whose commit is
|
|
565
567
|
// noticed late. Only when there is one: a project without a backend has
|
package/dist/templates.d.ts
CHANGED
|
@@ -2,8 +2,11 @@ import type { Host, Options } from './options.js';
|
|
|
2
2
|
export interface Paths {
|
|
3
3
|
/** Where the app/ route tree lives. */
|
|
4
4
|
sourceDir: string;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Where the build writes the route table, its report and the server
|
|
7
|
+
* entries. Left out, the default: .rsc-kit/, beside the generated types.
|
|
8
|
+
*/
|
|
9
|
+
outDir?: string;
|
|
7
10
|
/** Written while the dev server runs, for a backend that has to find it. */
|
|
8
11
|
hotFile?: string;
|
|
9
12
|
}
|
|
@@ -98,7 +101,7 @@ export declare function counter(o: Options): string;
|
|
|
98
101
|
* and nothing warns — the page just arrives unstyled.
|
|
99
102
|
*/
|
|
100
103
|
export declare const styles = "@import 'tailwindcss';\n\n/* The whole source tree, not just this directory. A client component is found\n automatically because it enters the browser bundle; a server component never\n does, so anything it uses has to be declared here or it is silently absent\n from the stylesheet. */\n@source '../';\n";
|
|
101
|
-
export declare const gitignore = "node_modules\
|
|
104
|
+
export declare const gitignore = "node_modules\n.output\ndist\n*.bun-build\n*.log\n.DS_Store\n\n# Rewritten by the build every run: the types, the route table and the build\n# report, and the stub module the app imports its server actions from.\n.rsc-kit/\nsrc/server-actions.generated.ts\n\n# Secrets. The example is the one to commit.\n.env\n.env.*\n!.env.example\n";
|
|
102
105
|
/**
|
|
103
106
|
* oxlint, with the React Compiler's own rules turned on.
|
|
104
107
|
*
|
package/dist/templates.js
CHANGED
|
@@ -20,7 +20,7 @@ const PORT = 3000;
|
|
|
20
20
|
*/
|
|
21
21
|
export function paths(o) {
|
|
22
22
|
if (o.host !== 'laravel') {
|
|
23
|
-
return { sourceDir: o.sourceDir
|
|
23
|
+
return { sourceDir: o.sourceDir };
|
|
24
24
|
}
|
|
25
25
|
return {
|
|
26
26
|
sourceDir: o.sourceDir,
|
|
@@ -235,7 +235,7 @@ export function viteConfig(o) {
|
|
|
235
235
|
// .output/public and serves them itself.
|
|
236
236
|
const options = [
|
|
237
237
|
`sourceDir: '${p.sourceDir}'`,
|
|
238
|
-
`outDir: '${p.outDir}'
|
|
238
|
+
...(p.outDir ? [`outDir: '${p.outDir}'`] : []),
|
|
239
239
|
...(p.hotFile ? [`hotFile: '${p.hotFile}'`] : []),
|
|
240
240
|
// The actions and functions PHP offers, written as dev and every build
|
|
241
241
|
// start - reflection through Composer's autoloader, which only PHP has.
|
|
@@ -511,15 +511,14 @@ export const styles = `@import 'tailwindcss';
|
|
|
511
511
|
@source '../';
|
|
512
512
|
`;
|
|
513
513
|
export const gitignore = `node_modules
|
|
514
|
-
build
|
|
515
514
|
.output
|
|
516
|
-
.rsc
|
|
517
515
|
dist
|
|
516
|
+
*.bun-build
|
|
518
517
|
*.log
|
|
519
518
|
.DS_Store
|
|
520
519
|
|
|
521
|
-
# Rewritten by the build every run: the
|
|
522
|
-
# module the app imports its server actions from.
|
|
520
|
+
# Rewritten by the build every run: the types, the route table and the build
|
|
521
|
+
# report, and the stub module the app imports its server actions from.
|
|
523
522
|
.rsc-kit/
|
|
524
523
|
src/server-actions.generated.ts
|
|
525
524
|
|