@fragno-dev/create 0.0.2
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/.turbo/turbo-build.log +12 -0
- package/.turbo/turbo-test.log +66 -0
- package/.turbo/turbo-types$colon$check.log +1 -0
- package/CHANGELOG.md +7 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +154 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
- package/src/index.ts +84 -0
- package/src/integration.test.ts +97 -0
- package/src/package-json.ts +67 -0
- package/src/utils.test.ts +9 -0
- package/src/utils.ts +69 -0
- package/templates/fragment/AGENTS.md +220 -0
- package/templates/fragment/README.md +16 -0
- package/templates/fragment/package.template.json +65 -0
- package/templates/fragment/src/client/react.ts +7 -0
- package/templates/fragment/src/client/svelte.ts +7 -0
- package/templates/fragment/src/client/vanilla.ts +7 -0
- package/templates/fragment/src/client/vue.ts +7 -0
- package/templates/fragment/src/index.ts +94 -0
- package/templates/fragment/tsconfig.base.json +34 -0
- package/templates/fragment/tsconfig.json +10 -0
- package/templates/optional/builder/esbuild.config.js +34 -0
- package/templates/optional/builder/rollup.config.js +58 -0
- package/templates/optional/builder/rspack.config.js +93 -0
- package/templates/optional/builder/tsdown.config.ts +30 -0
- package/templates/optional/builder/vite.config.ts +25 -0
- package/templates/optional/builder/webpack.config.js +79 -0
- package/tsconfig.json +10 -0
- package/tsdown.config.ts +10 -0
- package/vitest.config.ts +4 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineConfig } from "tsdown";
|
|
2
|
+
|
|
3
|
+
import unpluginFragno from "@fragno-dev/unplugin-fragno/rollup";
|
|
4
|
+
|
|
5
|
+
export default defineConfig([
|
|
6
|
+
{
|
|
7
|
+
ignoreWatch: ["./dist"],
|
|
8
|
+
entry: [
|
|
9
|
+
"./src/index.ts",
|
|
10
|
+
"./src/client/react.ts",
|
|
11
|
+
"./src/client/svelte.ts",
|
|
12
|
+
"./src/client/vanilla.ts",
|
|
13
|
+
"./src/client/vue.ts",
|
|
14
|
+
],
|
|
15
|
+
dts: true,
|
|
16
|
+
platform: "browser",
|
|
17
|
+
outDir: "./dist/browser",
|
|
18
|
+
plugins: [unpluginFragno({ platform: "browser" })],
|
|
19
|
+
noExternal: [/^@fragno-dev\/core\//],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
ignoreWatch: ["./dist"],
|
|
23
|
+
entry: "./src/index.ts",
|
|
24
|
+
dts: true,
|
|
25
|
+
platform: "node",
|
|
26
|
+
outDir: "./dist/node",
|
|
27
|
+
plugins: [unpluginFragno({ platform: "node" })],
|
|
28
|
+
unbundle: true,
|
|
29
|
+
},
|
|
30
|
+
]);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import unpluginFragno from "@fragno-dev/unplugin-fragno/vite";
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [unpluginFragno({ platform: "browser" })],
|
|
6
|
+
// https://vite.dev/guide/build.html#library-mode
|
|
7
|
+
build: {
|
|
8
|
+
lib: {
|
|
9
|
+
entry: {
|
|
10
|
+
index: "./src/index.ts",
|
|
11
|
+
"client/react": "./src/client/react.ts",
|
|
12
|
+
"client/svelte": "./src/client/svelte.ts",
|
|
13
|
+
"client/vanilla": "./src/client/vanilla.ts",
|
|
14
|
+
"client/vue": "./src/client/vue.ts",
|
|
15
|
+
},
|
|
16
|
+
formats: ["es"],
|
|
17
|
+
},
|
|
18
|
+
rollupOptions: {
|
|
19
|
+
external: ["react", "vue", "svelte", "zod"],
|
|
20
|
+
},
|
|
21
|
+
outDir: "./dist/browser",
|
|
22
|
+
sourcemap: true,
|
|
23
|
+
target: "es2020",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import unpluginFragno from "@fragno-dev/unplugin-fragno/webpack";
|
|
4
|
+
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
|
|
7
|
+
/** @type {import('webpack').Configuration[]} */
|
|
8
|
+
export default [
|
|
9
|
+
// Browser build
|
|
10
|
+
{
|
|
11
|
+
name: "browser",
|
|
12
|
+
mode: "production",
|
|
13
|
+
entry: {
|
|
14
|
+
index: "./src/index.ts",
|
|
15
|
+
"client/react": "./src/client/react.ts",
|
|
16
|
+
"client/svelte": "./src/client/svelte.ts",
|
|
17
|
+
"client/vanilla": "./src/client/vanilla.ts",
|
|
18
|
+
"client/vue": "./src/client/vue.ts",
|
|
19
|
+
},
|
|
20
|
+
output: {
|
|
21
|
+
path: path.resolve(__dirname, "dist/browser"),
|
|
22
|
+
filename: "[name].js",
|
|
23
|
+
library: {
|
|
24
|
+
type: "module",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
experiments: {
|
|
28
|
+
outputModule: true,
|
|
29
|
+
},
|
|
30
|
+
resolve: {
|
|
31
|
+
extensions: [".ts", ".js"],
|
|
32
|
+
},
|
|
33
|
+
module: {
|
|
34
|
+
rules: [
|
|
35
|
+
{
|
|
36
|
+
test: /\.ts$/,
|
|
37
|
+
use: "ts-loader",
|
|
38
|
+
exclude: /node_modules/,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
plugins: [unpluginFragno({ platform: "browser" })],
|
|
43
|
+
devtool: "source-map",
|
|
44
|
+
externals: ["react", "vue", "svelte", "zod"],
|
|
45
|
+
},
|
|
46
|
+
// Node build
|
|
47
|
+
{
|
|
48
|
+
name: "node",
|
|
49
|
+
mode: "production",
|
|
50
|
+
entry: {
|
|
51
|
+
index: "./src/index.ts",
|
|
52
|
+
},
|
|
53
|
+
output: {
|
|
54
|
+
path: path.resolve(__dirname, "dist/node"),
|
|
55
|
+
filename: "[name].js",
|
|
56
|
+
library: {
|
|
57
|
+
type: "module",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
experiments: {
|
|
61
|
+
outputModule: true,
|
|
62
|
+
},
|
|
63
|
+
resolve: {
|
|
64
|
+
extensions: [".ts", ".js"],
|
|
65
|
+
},
|
|
66
|
+
module: {
|
|
67
|
+
rules: [
|
|
68
|
+
{
|
|
69
|
+
test: /\.ts$/,
|
|
70
|
+
use: "ts-loader",
|
|
71
|
+
exclude: /node_modules/,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
plugins: [unpluginFragno({ platform: "node" })],
|
|
76
|
+
devtool: "source-map",
|
|
77
|
+
externals: ["zod"],
|
|
78
|
+
},
|
|
79
|
+
];
|
package/tsconfig.json
ADDED
package/tsdown.config.ts
ADDED
package/vitest.config.ts
ADDED