create-fff-app 0.1.4 → 0.1.6
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/package.json +1 -1
- package/src/index.ts +5 -3
- package/template/gitignore +23 -0
- package/template/package.json +5 -4
- package/template/src/client/App.fs +1 -1
- package/template/wrangler.toml +1 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -34,10 +34,12 @@ function copyDir(src: string, dest: string, projectName: string) {
|
|
|
34
34
|
copyDir(srcPath, destPath, projectName);
|
|
35
35
|
} else {
|
|
36
36
|
const raw = readFileSync(srcPath, 'utf-8');
|
|
37
|
-
// Replace template project name placeholder
|
|
38
37
|
const content = raw.replace(/fff-stack-app/g, projectName);
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
// npm strips .gitignore from published packages; stored as "gitignore"
|
|
39
|
+
const outName = entry.name === 'gitignore' ? '.gitignore' : entry.name;
|
|
40
|
+
const outPath = join(dirname(destPath), outName);
|
|
41
|
+
mkdirSync(dirname(outPath), { recursive: true });
|
|
42
|
+
writeFileSync(outPath, content, 'utf-8');
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build output
|
|
5
|
+
dist/
|
|
6
|
+
|
|
7
|
+
# F# / .NET
|
|
8
|
+
bin/
|
|
9
|
+
obj/
|
|
10
|
+
.fable/
|
|
11
|
+
*.nupkg
|
|
12
|
+
|
|
13
|
+
# Wrangler local state
|
|
14
|
+
.wrangler/
|
|
15
|
+
|
|
16
|
+
# Environment variables
|
|
17
|
+
.env
|
|
18
|
+
.env.local
|
|
19
|
+
.dev.vars
|
|
20
|
+
|
|
21
|
+
# OS
|
|
22
|
+
.DS_Store
|
|
23
|
+
Thumbs.db
|
package/template/package.json
CHANGED
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
"build:page-templates": "fjsx --dir src/server/Endpoints/Pages --out dist/server/Pages",
|
|
12
12
|
"dev:templates": "fjsx-watcher --dir src/client --out dist/client/templates",
|
|
13
13
|
"dev:page-templates": "fjsx-watcher --dir src/server/Endpoints/Pages --out dist/server/Pages",
|
|
14
|
-
"build:client": "fable src/client/Client.fsproj --outDir dist/client/fable && bun build dist/client/fable/App.js --outdir dist/client --entry-naming bundle.js",
|
|
15
|
-
"build:server": "fable src/server/Server.fsproj --outDir dist/server",
|
|
16
|
-
"
|
|
17
|
-
"dev:client": "
|
|
14
|
+
"build:client": "dotnet fable src/client/Client.fsproj --outDir dist/client/fable --noCache && bun build dist/client/fable/App.js --outdir dist/client --entry-naming bundle.js",
|
|
15
|
+
"build:server": "dotnet fable src/server/Server.fsproj --outDir dist/server",
|
|
16
|
+
"build:wrangler": "bun run build:assets && bun run build:templates && bun run build:page-templates && bun run build:server",
|
|
17
|
+
"dev": "bun run build:client && concurrently \"bun run dev:templates\" \"bun run dev:page-templates\" \"bun run dev:client\" \"wrangler dev\"",
|
|
18
|
+
"dev:client": "dotnet fable src/client/Client.fsproj --watch --outDir dist/client/fable",
|
|
18
19
|
"deploy": "wrangler deploy",
|
|
19
20
|
"migrate": "bun run migrate.ts",
|
|
20
21
|
"migrate:remote": "bun run migrate.ts --remote",
|
|
@@ -25,7 +25,7 @@ let private ensureId (el: HTMLElement) (name: string) : string =
|
|
|
25
25
|
id
|
|
26
26
|
|
|
27
27
|
let private mountOne (el: HTMLElement) : unit =
|
|
28
|
-
let name = el
|
|
28
|
+
let name = el.getAttribute "data-island" |> string
|
|
29
29
|
let id = ensureId el name
|
|
30
30
|
// Add islands here when needed:
|
|
31
31
|
// | "MyComponent" -> Some (upcast MyComponent(id))
|
package/template/wrangler.toml
CHANGED