create-plasmic-app 0.0.104 → 0.0.106
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/cpa-out/.gitignore +4 -0
- package/cpa-out/react-codegen-js/eslint.config.js +9 -13
- package/cpa-out/react-codegen-js/package.json +12 -12
- package/cpa-out/react-codegen-js/plasmic.json +2 -2
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +8 -0
- package/cpa-out/react-codegen-ts/eslint.config.js +10 -15
- package/cpa-out/react-codegen-ts/package.json +14 -14
- package/cpa-out/react-codegen-ts/plasmic.json +2 -2
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +9 -0
- package/cpa-out/tanstack-codegen-ts/package.json +42 -0
- package/cpa-out/tanstack-codegen-ts/plasmic.json +136 -0
- package/cpa-out/tanstack-codegen-ts/src/components/Button.tsx +35 -0
- package/cpa-out/tanstack-codegen-ts/src/components/Header.tsx +21 -0
- package/cpa-out/tanstack-codegen-ts/src/components/RandomDynamicPageButton.tsx +44 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +870 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +309 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +28 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +351 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +279 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx +44 -0
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
- package/cpa-out/tanstack-codegen-ts/src/routeTree.gen.ts +95 -0
- package/cpa-out/tanstack-codegen-ts/src/router.tsx +24 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/__root.tsx +37 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/dynamic/$slug/index.tsx +49 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/index.tsx +49 -0
- package/cpa-out/tanstack-codegen-ts/src/routes/plasmic-host.tsx +20 -0
- package/cpa-out/tanstack-codegen-ts/tsconfig.json +28 -0
- package/cpa-out/tanstack-codegen-ts/vite.config.ts +26 -0
- package/dist/tanstack/tanstack.js +1 -1
- package/dist/tanstack/templates/file-router/config.d.ts +1 -1
- package/dist/tanstack/templates/file-router/config.js +27 -27
- package/package.json +2 -2
- package/src/tanstack/tanstack.ts +3 -3
- package/src/tanstack/templates/file-router/config.ts +25 -25
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
3
|
+
import viteTsConfigPaths from 'vite-tsconfig-paths'
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
5
|
+
|
|
6
|
+
const config = defineConfig({
|
|
7
|
+
ssr: {
|
|
8
|
+
noExternal: [
|
|
9
|
+
"@plasmicapp/data-sources",
|
|
10
|
+
"@plasmicapp/data-sources-context",
|
|
11
|
+
"@plasmicapp/prepass",
|
|
12
|
+
"@plasmicapp/query",
|
|
13
|
+
"@plasmicapp/react-web",
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
plugins: [
|
|
17
|
+
// this is the plugin that enables path aliases
|
|
18
|
+
viteTsConfigPaths({
|
|
19
|
+
projects: ['./tsconfig.json'],
|
|
20
|
+
}),
|
|
21
|
+
tailwindcss(),
|
|
22
|
+
tanstackStart(),
|
|
23
|
+
],
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export default config
|
|
@@ -55,7 +55,7 @@ exports.tanstackStrategy = {
|
|
|
55
55
|
* them to work properly during ssr phase.
|
|
56
56
|
*/
|
|
57
57
|
if (jsOrTs === "ts") {
|
|
58
|
-
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "
|
|
58
|
+
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "vite.config.ts"), (0, config_1.makeCustomViteConfig_file_router_codegen)());
|
|
59
59
|
}
|
|
60
60
|
}),
|
|
61
61
|
generateFiles: (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function makeCustomViteConfig_file_router_codegen(): string;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
5
|
-
return `import { defineConfig } from
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
exports.makeCustomViteConfig_file_router_codegen = void 0;
|
|
4
|
+
function makeCustomViteConfig_file_router_codegen() {
|
|
5
|
+
return `import { defineConfig } from 'vite'
|
|
6
|
+
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
7
|
+
import viteTsConfigPaths from 'vite-tsconfig-paths'
|
|
8
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
projects: ["./tsconfig.json"],
|
|
18
|
-
}),
|
|
19
|
-
tailwindcss(),
|
|
10
|
+
const config = defineConfig({
|
|
11
|
+
ssr: {
|
|
12
|
+
noExternal: [
|
|
13
|
+
"@plasmicapp/data-sources",
|
|
14
|
+
"@plasmicapp/data-sources-context",
|
|
15
|
+
"@plasmicapp/prepass",
|
|
16
|
+
"@plasmicapp/query",
|
|
17
|
+
"@plasmicapp/react-web",
|
|
20
18
|
],
|
|
21
|
-
ssr: {
|
|
22
|
-
noExternal: [
|
|
23
|
-
"@plasmicapp/data-sources",
|
|
24
|
-
"@plasmicapp/data-sources-context",
|
|
25
|
-
"@plasmicapp/prepass",
|
|
26
|
-
"@plasmicapp/query",
|
|
27
|
-
"@plasmicapp/react-web",
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
19
|
},
|
|
31
|
-
|
|
20
|
+
plugins: [
|
|
21
|
+
// this is the plugin that enables path aliases
|
|
22
|
+
viteTsConfigPaths({
|
|
23
|
+
projects: ['./tsconfig.json'],
|
|
24
|
+
}),
|
|
25
|
+
tailwindcss(),
|
|
26
|
+
tanstackStart(),
|
|
27
|
+
],
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export default config
|
|
31
|
+
`;
|
|
32
32
|
}
|
|
33
|
-
exports.
|
|
33
|
+
exports.makeCustomViteConfig_file_router_codegen = makeCustomViteConfig_file_router_codegen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-plasmic-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.106",
|
|
4
4
|
"description": "Create Plasmic-powered React apps",
|
|
5
5
|
"main": "./dist/lib.js",
|
|
6
6
|
"types": "./dist/lib.d.ts",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"validate-npm-package-name": "^3.0.0",
|
|
47
47
|
"yargs": "^16.2.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "b1b13b4f03d13517cc8a8bb7526deb862c8deeb8"
|
|
50
50
|
}
|
package/src/tanstack/tanstack.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { spawnOrFail } from "../utils/cmd-utils";
|
|
|
4
4
|
import { installCodegenDeps, runCodegenSync } from "../utils/codegen";
|
|
5
5
|
import { deleteGlob } from "../utils/file-utils";
|
|
6
6
|
import { CPAStrategy, GenerateFilesArgs } from "../utils/strategy";
|
|
7
|
-
import {
|
|
7
|
+
import { makeCustomViteConfig_file_router_codegen } from "./templates/file-router/config";
|
|
8
8
|
import { makePlasmicHostPage_fileRouter_codegen } from "./templates/file-router/plasmic-host";
|
|
9
9
|
import { makeCustomRoot_file_router_codegen } from "./templates/file-router/root";
|
|
10
10
|
|
|
@@ -50,8 +50,8 @@ export const tanstackStrategy: CPAStrategy = {
|
|
|
50
50
|
*/
|
|
51
51
|
if (jsOrTs === "ts") {
|
|
52
52
|
await fs.writeFile(
|
|
53
|
-
path.join(projectPath, "
|
|
54
|
-
|
|
53
|
+
path.join(projectPath, "vite.config.ts"),
|
|
54
|
+
makeCustomViteConfig_file_router_codegen()
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
},
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export function
|
|
2
|
-
return `import { defineConfig } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
export function makeCustomViteConfig_file_router_codegen(): string {
|
|
2
|
+
return `import { defineConfig } from 'vite'
|
|
3
|
+
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
4
|
+
import viteTsConfigPaths from 'vite-tsconfig-paths'
|
|
5
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
projects: ["./tsconfig.json"],
|
|
15
|
-
}),
|
|
16
|
-
tailwindcss(),
|
|
7
|
+
const config = defineConfig({
|
|
8
|
+
ssr: {
|
|
9
|
+
noExternal: [
|
|
10
|
+
"@plasmicapp/data-sources",
|
|
11
|
+
"@plasmicapp/data-sources-context",
|
|
12
|
+
"@plasmicapp/prepass",
|
|
13
|
+
"@plasmicapp/query",
|
|
14
|
+
"@plasmicapp/react-web",
|
|
17
15
|
],
|
|
18
|
-
ssr: {
|
|
19
|
-
noExternal: [
|
|
20
|
-
"@plasmicapp/data-sources",
|
|
21
|
-
"@plasmicapp/data-sources-context",
|
|
22
|
-
"@plasmicapp/prepass",
|
|
23
|
-
"@plasmicapp/query",
|
|
24
|
-
"@plasmicapp/react-web",
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
16
|
},
|
|
28
|
-
|
|
17
|
+
plugins: [
|
|
18
|
+
// this is the plugin that enables path aliases
|
|
19
|
+
viteTsConfigPaths({
|
|
20
|
+
projects: ['./tsconfig.json'],
|
|
21
|
+
}),
|
|
22
|
+
tailwindcss(),
|
|
23
|
+
tanstackStart(),
|
|
24
|
+
],
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
export default config
|
|
28
|
+
`;
|
|
29
29
|
}
|