@fluid-app/create-fluid-site 0.0.0-stage → 0.1.1

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.
Files changed (3) hide show
  1. package/README.md +27 -2
  2. package/dist/index.mjs +16 -0
  3. package/package.json +74 -3
package/README.md CHANGED
@@ -1,3 +1,28 @@
1
- # Temporary Holding Version
1
+ # create-fluid-site
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Start a Fluid site in a new folder, then put it live with `fluid deploy`.
4
+
5
+ ```sh
6
+ npm create @fluid-app/fluid-site my-thing # Vite + React (or: npx @fluid-app/create-fluid-site)
7
+ npm create @fluid-app/fluid-site launch-page -- --template html # plain HTML, no build
8
+ cd my-thing
9
+ fluid login # once
10
+ fluid deploy # builds, publishes and prints the address
11
+ ```
12
+
13
+ `create-fluid-site` is `fluid sites init` for someone who has not installed
14
+ the Fluid CLI yet. It needs no login: the site is created by the first
15
+ `fluid deploy`.
16
+
17
+ ## Starters
18
+
19
+ | `--template` | What you get |
20
+ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `vite-react` (default) | The public [member-site-template](https://github.com/Fluid-WeCommerce/member-site-template): Vite, React, `config/meta.json`, `config/access.json` |
22
+ | `html` | `index.html`, `style.css` and `config/meta.json` |
23
+ | `astro` | Coming soon. Start one with `npm create astro@latest`; `fluid deploy` builds and publishes an Astro project as it is |
24
+
25
+ The folder must be new or empty (a `.git` folder is fine). The Vite + React
26
+ starter is downloaded from `codeload.github.com` only, at most 5 MiB, and
27
+ unpacked as plain files and folders: an archive with a link, an absolute path
28
+ or a `..` path is refused whole and nothing is left behind.
package/dist/index.mjs ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ import { createInitCommand } from "@fluid-app/fluid-cli-member-site";
3
+ //#region src/run.ts
4
+ /**
5
+ * `npx create-fluid-site [dir] [--template vite-react|html]`: the same
6
+ * starter as `fluid sites init`, for someone who has not installed the Fluid
7
+ * CLI yet. It needs no login: the site is made by the first `fluid deploy`.
8
+ */
9
+ async function runCreateFluidSite(argv) {
10
+ await createInitCommand("create-fluid-site").parseAsync(argv, { from: "user" });
11
+ }
12
+ //#endregion
13
+ //#region src/index.ts
14
+ await runCreateFluidSite(process.argv.slice(2));
15
+ //#endregion
16
+ export {};
package/package.json CHANGED
@@ -1,6 +1,77 @@
1
1
  {
2
2
  "name": "@fluid-app/create-fluid-site",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "description": "Start a Fluid site in a new folder: npm create @fluid-app/fluid-site my-thing, then fluid deploy",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/fluid-commerce/fluid.git",
8
+ "directory": "packages/cli/create-fluid-site"
9
+ },
10
+ "bin": {
11
+ "create-fluid-site": "./dist/index.mjs"
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "README.md"
16
+ ],
17
+ "type": "module",
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "dependencies": {
22
+ "@fluid-app/fluid-cli-member-site": "0.1.269"
23
+ },
24
+ "devDependencies": {
25
+ "@fluid-app/typescript-config": "0.0.0",
26
+ "@swc/core": "^1.15.18",
27
+ "@swc/jest": "^0.2.39",
28
+ "@types/jest": "^29.5.14",
29
+ "@types/node": "24.10.12",
30
+ "jest": "^29.7.0",
31
+ "tsdown": "^0.21.0",
32
+ "typescript": "^5"
33
+ },
34
+ "engines": {
35
+ "node": ">=24.0.0"
36
+ },
37
+ "nx": {
38
+ "targets": {
39
+ "typecheck": {
40
+ "dependsOn": [
41
+ {
42
+ "target": "build",
43
+ "projects": [
44
+ "@fluid-app/fluid-cli"
45
+ ]
46
+ }
47
+ ]
48
+ },
49
+ "test": {
50
+ "dependsOn": [
51
+ {
52
+ "target": "build",
53
+ "projects": [
54
+ "@fluid-app/fluid-cli"
55
+ ]
56
+ }
57
+ ]
58
+ },
59
+ "build": {
60
+ "dependsOn": [
61
+ "typecheck",
62
+ {
63
+ "target": "build",
64
+ "projects": [
65
+ "@fluid-app/fluid-cli"
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ }
71
+ },
72
+ "scripts": {
73
+ "build": "tsdown",
74
+ "typecheck": "tsgo --noEmit",
75
+ "test": "jest"
76
+ }
6
77
  }