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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fff-app",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Scaffold a new fff-stack project",
5
5
  "bin": {
6
6
  "create-fff-app": "src/index.ts"
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
- mkdirSync(dirname(destPath), { recursive: true });
40
- writeFileSync(destPath, content, 'utf-8');
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
@@ -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
- "dev": "concurrently \"bun run dev:templates\" \"bun run dev:page-templates\" \"bun run dev:client\" \"wrangler dev\"",
17
- "dev:client": "fable src/client/Client.fsproj --watch --outDir dist/client/fable",
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?dataset?island |> string
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))
@@ -20,4 +20,4 @@ bucket_name = "fff-stack-bucket" # replace with your bucket name
20
20
  # preview_bucket_name = "fff-stack-bucket-dev" # optional local dev bucket
21
21
 
22
22
  [build]
23
- command = "bun run build"
23
+ command = "bun run build:wrangler"