@fedify/create 2.0.0-dev.0
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/LICENSE +20 -0
- package/README.md +46 -0
- package/dist/mod.js +16 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2024–2026 Hong Minhee
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@fedify/create: Create a new Fedify project
|
|
2
|
+
===========================================
|
|
3
|
+
|
|
4
|
+
[![npm][npm badge]][npm]
|
|
5
|
+
|
|
6
|
+
This package provides a standalone CLI tool for creating new [Fedify] projects.
|
|
7
|
+
It allows you to scaffold a new project without installing the full
|
|
8
|
+
[`@fedify/cli`] toolchain, powered by [`@fedify/init`] internally.
|
|
9
|
+
|
|
10
|
+
[npm badge]: https://img.shields.io/npm/v/@fedify/create?logo=npm
|
|
11
|
+
[npm]: https://www.npmjs.com/package/@fedify/create
|
|
12
|
+
[Fedify]: https://fedify.dev/
|
|
13
|
+
[`@fedify/cli`]: https://jsr.io/@fedify/cli
|
|
14
|
+
[`@fedify/init`]: https://jsr.io/@fedify/init
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Usage
|
|
18
|
+
-----
|
|
19
|
+
|
|
20
|
+
~~~~ sh
|
|
21
|
+
npm init @fedify my-project
|
|
22
|
+
pnpm create @fedify my-project
|
|
23
|
+
yarn create @fedify my-project
|
|
24
|
+
bunx @fedify/create my-project
|
|
25
|
+
~~~~
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Supported options
|
|
29
|
+
-----------------
|
|
30
|
+
|
|
31
|
+
The tool supports the same project configurations as `fedify init`:
|
|
32
|
+
|
|
33
|
+
- **Web frameworks**: [Hono], [Nitro], [Next.js], [Elysia], [Express]
|
|
34
|
+
- **Package managers**: Deno, pnpm, Bun, Yarn, npm
|
|
35
|
+
- **Key-value stores**: Deno KV, Redis, PostgreSQL
|
|
36
|
+
- **Message queues**: Deno KV, Redis, PostgreSQL, AMQP
|
|
37
|
+
|
|
38
|
+
See the [`@fedify/init`] package or the [Fedify CLI docs] for details on
|
|
39
|
+
available options (`-r`, `-p`, `-w`, `-k`, `-q`, `--dry-run`).
|
|
40
|
+
|
|
41
|
+
[Hono]: https://hono.dev/
|
|
42
|
+
[Nitro]: https://nitro.build/
|
|
43
|
+
[Next.js]: https://nextjs.org/
|
|
44
|
+
[Elysia]: https://elysiajs.com/
|
|
45
|
+
[Express]: https://expressjs.com/
|
|
46
|
+
[Fedify CLI docs]: https://fedify.dev/cli
|
package/dist/mod.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { initOptions, runInit } from "@fedify/init";
|
|
2
|
+
import { message, optionNames } from "@optique/core";
|
|
3
|
+
import { run } from "@optique/run";
|
|
4
|
+
import { merge } from "es-toolkit";
|
|
5
|
+
|
|
6
|
+
//#region src/mod.ts
|
|
7
|
+
const result = run(initOptions, {
|
|
8
|
+
programName: "@fedify/create",
|
|
9
|
+
description: message`Create a new Fedify project.
|
|
10
|
+
|
|
11
|
+
Unless you specify all options (${optionNames(["-w", "--web-framework"])}, ${optionNames(["-p", "--package-manager"])}, ${optionNames(["-k", "--kv-store"])}, and ${optionNames(["-m", "--message-queue"])}), it will prompt you to select the options interactively.`,
|
|
12
|
+
help: "both"
|
|
13
|
+
});
|
|
14
|
+
await runInit(merge(result, { command: "init" }));
|
|
15
|
+
|
|
16
|
+
//#endregion
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fedify/create",
|
|
3
|
+
"version": "2.0.0-dev.0",
|
|
4
|
+
"description": "Create a new Fedify application",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"fedify",
|
|
7
|
+
"activitypub",
|
|
8
|
+
"cli",
|
|
9
|
+
"init",
|
|
10
|
+
"fediverse"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://fedify.dev/",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/fedify-dev/fedify/issues"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Hong Minhee",
|
|
19
|
+
"email": "hong@minhee.org",
|
|
20
|
+
"url": "https://hongminhee.org/"
|
|
21
|
+
},
|
|
22
|
+
"funding": [
|
|
23
|
+
"https://opencollective.com/fedify",
|
|
24
|
+
"https://github.com/sponsors/dahlia"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/fedify-dev/fedify.git",
|
|
29
|
+
"directory": "packages/create"
|
|
30
|
+
},
|
|
31
|
+
"type": "module",
|
|
32
|
+
"bin": {
|
|
33
|
+
"@fedify/create": "./dist/mod.js"
|
|
34
|
+
},
|
|
35
|
+
"exports": "./dist/mod.js",
|
|
36
|
+
"files": [
|
|
37
|
+
"dist/",
|
|
38
|
+
"package.json",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20.0.0",
|
|
43
|
+
"bun": ">=1.2.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@optique/core": "^0.9.0",
|
|
47
|
+
"@optique/run": "^0.9.0",
|
|
48
|
+
"es-toolkit": "1.43.0",
|
|
49
|
+
"@fedify/init": "2.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^22.17.0",
|
|
53
|
+
"tsdown": "^0.12.9",
|
|
54
|
+
"typescript": "^5.9.3"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build:self": "tsdown",
|
|
58
|
+
"build": "pnpm --filter @fedify/create... run build:self",
|
|
59
|
+
"prepublish": "pnpm build"
|
|
60
|
+
}
|
|
61
|
+
}
|