create-plasmic-app 0.0.95 → 0.0.97
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/react-codegen-js/eslint.config.js +38 -0
- package/cpa-out/react-codegen-js/package.json +22 -32
- package/cpa-out/react-codegen-js/plasmic.json +16 -10
- package/cpa-out/react-codegen-js/src/App.jsx +1 -1
- package/cpa-out/react-codegen-js/src/components/Button.jsx +1 -3
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +47 -96
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +35 -29
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +2 -14
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +24 -24
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +44 -58
- package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +2 -2
- package/cpa-out/react-codegen-js/src/main.jsx +10 -0
- package/cpa-out/react-codegen-js/vite.config.js +7 -0
- package/cpa-out/react-codegen-ts/eslint.config.js +28 -0
- package/cpa-out/react-codegen-ts/package.json +23 -37
- package/cpa-out/react-codegen-ts/plasmic.json +16 -10
- package/cpa-out/react-codegen-ts/src/App.tsx +1 -1
- package/cpa-out/react-codegen-ts/src/components/Button.tsx +4 -5
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +84 -62
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +73 -44
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +2 -14
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +62 -38
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +83 -70
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +3 -3
- package/cpa-out/react-codegen-ts/src/main.tsx +10 -0
- package/cpa-out/react-codegen-ts/src/vite-env.d.ts +1 -0
- package/cpa-out/react-codegen-ts/tsconfig.json +4 -23
- package/cpa-out/react-codegen-ts/vite.config.ts +7 -0
- package/dist/gatsby/template.js +2 -1
- package/dist/lib.js +1 -1
- package/dist/nextjs/templates/pages-codegen/app.js +2 -1
- package/dist/react/react.js +36 -11
- package/package.json +2 -2
- package/src/gatsby/template.ts +2 -1
- package/src/lib.ts +1 -1
- package/src/nextjs/templates/pages-codegen/app.ts +2 -1
- package/src/react/react.ts +47 -16
- package/cpa-out/react-codegen-js/src/index.js +0 -17
- package/cpa-out/react-codegen-js/src/reportWebVitals.js +0 -13
- package/cpa-out/react-codegen-js/src/setupTests.js +0 -5
- package/cpa-out/react-codegen-ts/src/index.tsx +0 -19
- package/cpa-out/react-codegen-ts/src/react-app-env.d.ts +0 -1
- package/cpa-out/react-codegen-ts/src/reportWebVitals.ts +0 -15
- package/cpa-out/react-codegen-ts/src/setupTests.ts +0 -5
- package/cpa-out/react-loader-js/package.json +0 -40
- package/cpa-out/react-loader-js/plasmic.json +0 -127
- package/cpa-out/react-loader-js/src/App.jsx +0 -9
- package/cpa-out/react-loader-js/src/components/Button.jsx +0 -13
- package/cpa-out/react-loader-js/src/components/DynamicPage.jsx +0 -26
- package/cpa-out/react-loader-js/src/components/Homepage.jsx +0 -26
- package/cpa-out/react-loader-js/src/components/RandomDynamicPageButton.jsx +0 -24
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +0 -625
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +0 -166
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +0 -29
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +0 -210
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +0 -161
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +0 -39
- package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +0 -37
- package/cpa-out/react-loader-js/src/index.js +0 -17
- package/cpa-out/react-loader-js/src/reportWebVitals.js +0 -13
- package/cpa-out/react-loader-js/src/setupTests.js +0 -5
- package/cpa-out/react-loader-ts/package.json +0 -45
- package/cpa-out/react-loader-ts/plasmic.json +0 -127
- package/cpa-out/react-loader-ts/src/App.tsx +0 -9
- package/cpa-out/react-loader-ts/src/components/Button.tsx +0 -36
- package/cpa-out/react-loader-ts/src/components/DynamicPage.tsx +0 -45
- package/cpa-out/react-loader-ts/src/components/Homepage.tsx +0 -45
- package/cpa-out/react-loader-ts/src/components/RandomDynamicPageButton.tsx +0 -44
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +0 -725
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +0 -248
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +0 -31
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +0 -294
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +0 -240
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +0 -44
- package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +0 -41
- package/cpa-out/react-loader-ts/src/index.tsx +0 -19
- package/cpa-out/react-loader-ts/src/react-app-env.d.ts +0 -1
- package/cpa-out/react-loader-ts/src/reportWebVitals.ts +0 -15
- package/cpa-out/react-loader-ts/src/setupTests.ts +0 -5
- package/cpa-out/react-loader-ts/tsconfig.json +0 -26
package/src/react/react.ts
CHANGED
|
@@ -16,10 +16,31 @@ export const reactStrategy: CPAStrategy = {
|
|
|
16
16
|
create: async (args) => {
|
|
17
17
|
const { projectPath, jsOrTs } = args;
|
|
18
18
|
let { template } = args;
|
|
19
|
-
const createCommand = `npx create-react-app@latest ${projectPath}`;
|
|
20
19
|
|
|
21
|
-
if
|
|
22
|
-
|
|
20
|
+
/* create-vite package checks if the targetDir doesn't exist then it creates the targetDir in the
|
|
21
|
+
current directory instead of the targetDir path. For example,
|
|
22
|
+
1. Let's say current directory is /tmp/cpa-out
|
|
23
|
+
2. npm create vite@latest /private/tmp/cpa-out/react-codegen-ts will create
|
|
24
|
+
/tmp/cpa-out/private/tmp/cpa-out/react-codegen-ts directory instead of /private/tmp/cpa-out/react-codegen-ts
|
|
25
|
+
|
|
26
|
+
To avoid this behaviour, we will ensure the fullProjectPath exists
|
|
27
|
+
1. we get the projectName (react-codegen-ts), and parentDir (/private/tmp/cpa-out)
|
|
28
|
+
2. change directory to parentDir and execute the command with projectName
|
|
29
|
+
*/
|
|
30
|
+
const fullProjectPath = path.isAbsolute(projectPath)
|
|
31
|
+
? projectPath
|
|
32
|
+
: path.resolve(process.cwd(), projectPath);
|
|
33
|
+
|
|
34
|
+
await fs.mkdir(fullProjectPath, { recursive: true });
|
|
35
|
+
|
|
36
|
+
const projectName = path.basename(fullProjectPath);
|
|
37
|
+
const parentDir = path.dirname(fullProjectPath);
|
|
38
|
+
process.chdir(parentDir);
|
|
39
|
+
|
|
40
|
+
const createCommand = `npm create vite@latest ${projectName} --`;
|
|
41
|
+
|
|
42
|
+
if (!template) {
|
|
43
|
+
template = jsOrTs === "ts" ? "react-ts" : "react";
|
|
23
44
|
}
|
|
24
45
|
|
|
25
46
|
const templateArg = template ? ` --template ${template}` : "";
|
|
@@ -35,7 +56,28 @@ export const reactStrategy: CPAStrategy = {
|
|
|
35
56
|
}
|
|
36
57
|
},
|
|
37
58
|
overwriteConfig: async (args) => {
|
|
38
|
-
|
|
59
|
+
const { projectPath, jsOrTs } = args;
|
|
60
|
+
|
|
61
|
+
if (jsOrTs === "ts") {
|
|
62
|
+
const tsConfigJsonPath = path.join(projectPath, "tsconfig.app.json");
|
|
63
|
+
let tsConfigJson = await fs.readFile(tsConfigJsonPath, "utf8");
|
|
64
|
+
|
|
65
|
+
/* tsconfig.app.json has comments such as /* Bundler mode */ /* Linting */
|
|
66
|
+
/* We need to remove them before parsing the json */
|
|
67
|
+
tsConfigJson = tsConfigJson.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
68
|
+
tsConfigJson = tsConfigJson.replace(/\/\/.*$/gm, "");
|
|
69
|
+
|
|
70
|
+
const tsConfig = JSON.parse(tsConfigJson);
|
|
71
|
+
/* In our codegen, we have components where React is imported but not used, we need to
|
|
72
|
+
turn off the `noUnusedLocals` rule to ensure the project builds successfully.
|
|
73
|
+
*/
|
|
74
|
+
tsConfig.compilerOptions = {
|
|
75
|
+
...tsConfig.compilerOptions,
|
|
76
|
+
noUnusedLocals: false,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
await fs.writeFile(tsConfigJsonPath, JSON.stringify(tsConfig, null, 2));
|
|
80
|
+
}
|
|
39
81
|
},
|
|
40
82
|
generateFiles: async ({
|
|
41
83
|
scheme,
|
|
@@ -47,7 +89,7 @@ export const reactStrategy: CPAStrategy = {
|
|
|
47
89
|
if (scheme === "loader") {
|
|
48
90
|
// Nothing to do
|
|
49
91
|
} else {
|
|
50
|
-
// Delete existing
|
|
92
|
+
// Delete existing App.tsx and related test
|
|
51
93
|
deleteGlob(path.join(projectPath, "src", "App*"));
|
|
52
94
|
|
|
53
95
|
await runCodegenSync({
|
|
@@ -89,17 +131,6 @@ export const reactStrategy: CPAStrategy = {
|
|
|
89
131
|
await fs.writeFile(indexPath, content);
|
|
90
132
|
}
|
|
91
133
|
|
|
92
|
-
// Deactivate React.StrictMode from index.js or index.tsx
|
|
93
|
-
const indexFileName = path.join(
|
|
94
|
-
projectPath,
|
|
95
|
-
"src",
|
|
96
|
-
`index.${jsOrTs === "js" ? "js" : "tsx"}`
|
|
97
|
-
);
|
|
98
|
-
let indexFile = (await fs.readFile(indexFileName)).toString();
|
|
99
|
-
indexFile = indexFile.replace("<React.StrictMode>", "");
|
|
100
|
-
indexFile = indexFile.replace("</React.StrictMode>", "");
|
|
101
|
-
await fs.writeFile(indexFileName, indexFile);
|
|
102
|
-
|
|
103
134
|
return;
|
|
104
135
|
},
|
|
105
136
|
build: async (args) => {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import './index.css';
|
|
4
|
-
import App from './App';
|
|
5
|
-
import reportWebVitals from './reportWebVitals';
|
|
6
|
-
|
|
7
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
8
|
-
root.render(
|
|
9
|
-
|
|
10
|
-
<App />
|
|
11
|
-
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
// If you want to start measuring performance in your app, pass a function
|
|
15
|
-
// to log results (for example: reportWebVitals(console.log))
|
|
16
|
-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
17
|
-
reportWebVitals();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const reportWebVitals = onPerfEntry => {
|
|
2
|
-
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
-
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
4
|
-
getCLS(onPerfEntry);
|
|
5
|
-
getFID(onPerfEntry);
|
|
6
|
-
getFCP(onPerfEntry);
|
|
7
|
-
getLCP(onPerfEntry);
|
|
8
|
-
getTTFB(onPerfEntry);
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default reportWebVitals;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import './index.css';
|
|
4
|
-
import App from './App';
|
|
5
|
-
import reportWebVitals from './reportWebVitals';
|
|
6
|
-
|
|
7
|
-
const root = ReactDOM.createRoot(
|
|
8
|
-
document.getElementById('root') as HTMLElement
|
|
9
|
-
);
|
|
10
|
-
root.render(
|
|
11
|
-
|
|
12
|
-
<App />
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
// If you want to start measuring performance in your app, pass a function
|
|
17
|
-
// to log results (for example: reportWebVitals(console.log))
|
|
18
|
-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
19
|
-
reportWebVitals();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="react-scripts" />
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReportHandler } from 'web-vitals';
|
|
2
|
-
|
|
3
|
-
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
|
|
4
|
-
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
5
|
-
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
6
|
-
getCLS(onPerfEntry);
|
|
7
|
-
getFID(onPerfEntry);
|
|
8
|
-
getFCP(onPerfEntry);
|
|
9
|
-
getLCP(onPerfEntry);
|
|
10
|
-
getTTFB(onPerfEntry);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default reportWebVitals;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-loader-js",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"@plasmicapp/cli": "^0.1.231",
|
|
7
|
-
"@plasmicapp/react-web": "^0.2.174",
|
|
8
|
-
"@testing-library/jest-dom": "^5.14.1",
|
|
9
|
-
"@testing-library/react": "^13.0.0",
|
|
10
|
-
"@testing-library/user-event": "^13.2.1",
|
|
11
|
-
"react": "^18.2.0",
|
|
12
|
-
"react-dom": "^18.2.0",
|
|
13
|
-
"react-scripts": "5.0.1",
|
|
14
|
-
"web-vitals": "^2.1.0"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"start": "react-scripts start",
|
|
18
|
-
"build": "react-scripts build",
|
|
19
|
-
"test": "react-scripts test",
|
|
20
|
-
"eject": "react-scripts eject"
|
|
21
|
-
},
|
|
22
|
-
"eslintConfig": {
|
|
23
|
-
"extends": [
|
|
24
|
-
"react-app",
|
|
25
|
-
"react-app/jest"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"browserslist": {
|
|
29
|
-
"production": [
|
|
30
|
-
">0.2%",
|
|
31
|
-
"not dead",
|
|
32
|
-
"not op_mini all"
|
|
33
|
-
],
|
|
34
|
-
"development": [
|
|
35
|
-
"last 1 chrome version",
|
|
36
|
-
"last 1 firefox version",
|
|
37
|
-
"last 1 safari version"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"platform": "react",
|
|
3
|
-
"code": {
|
|
4
|
-
"lang": "js",
|
|
5
|
-
"scheme": "blackbox",
|
|
6
|
-
"reactRuntime": "classic"
|
|
7
|
-
},
|
|
8
|
-
"style": {
|
|
9
|
-
"scheme": "css-modules",
|
|
10
|
-
"defaultStyleCssFilePath": "plasmic/plasmic__default_style.css"
|
|
11
|
-
},
|
|
12
|
-
"images": {
|
|
13
|
-
"scheme": "files",
|
|
14
|
-
"publicDir": "../../public",
|
|
15
|
-
"publicUrlPrefix": "/static/"
|
|
16
|
-
},
|
|
17
|
-
"tokens": {
|
|
18
|
-
"scheme": "theo",
|
|
19
|
-
"tokensFilePath": "plasmic-tokens.theo.json"
|
|
20
|
-
},
|
|
21
|
-
"srcDir": "src/components",
|
|
22
|
-
"defaultPlasmicDir": "./plasmic",
|
|
23
|
-
"projects": [
|
|
24
|
-
{
|
|
25
|
-
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
26
|
-
"projectApiToken": "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
|
|
27
|
-
"projectName": "create-plasmic-app",
|
|
28
|
-
"version": "latest",
|
|
29
|
-
"cssFilePath": "plasmic/create_plasmic_app/plasmic_create_plasmic_app.module.css",
|
|
30
|
-
"components": [
|
|
31
|
-
{
|
|
32
|
-
"id": "6uuAAE1jiCew",
|
|
33
|
-
"name": "Homepage",
|
|
34
|
-
"type": "managed",
|
|
35
|
-
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
36
|
-
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.jsx",
|
|
37
|
-
"importSpec": {
|
|
38
|
-
"modulePath": "Homepage.jsx"
|
|
39
|
-
},
|
|
40
|
-
"cssFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.module.css",
|
|
41
|
-
"scheme": "blackbox",
|
|
42
|
-
"componentType": "page"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"id": "AO44A-w7hh",
|
|
46
|
-
"name": "DynamicPage",
|
|
47
|
-
"type": "managed",
|
|
48
|
-
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
49
|
-
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.jsx",
|
|
50
|
-
"importSpec": {
|
|
51
|
-
"modulePath": "DynamicPage.jsx"
|
|
52
|
-
},
|
|
53
|
-
"cssFilePath": "plasmic/create_plasmic_app/PlasmicDynamicPage.module.css",
|
|
54
|
-
"scheme": "blackbox",
|
|
55
|
-
"componentType": "page"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"id": "TQcvW_pSKi3",
|
|
59
|
-
"name": "Button",
|
|
60
|
-
"type": "managed",
|
|
61
|
-
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
62
|
-
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicButton.jsx",
|
|
63
|
-
"importSpec": {
|
|
64
|
-
"modulePath": "Button.jsx"
|
|
65
|
-
},
|
|
66
|
-
"cssFilePath": "plasmic/create_plasmic_app/PlasmicButton.module.css",
|
|
67
|
-
"scheme": "blackbox",
|
|
68
|
-
"componentType": "component",
|
|
69
|
-
"plumeType": "button"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"id": "Q23H1_1M_P",
|
|
73
|
-
"name": "RandomDynamicPageButton",
|
|
74
|
-
"type": "managed",
|
|
75
|
-
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
76
|
-
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx",
|
|
77
|
-
"importSpec": {
|
|
78
|
-
"modulePath": "RandomDynamicPageButton.jsx"
|
|
79
|
-
},
|
|
80
|
-
"cssFilePath": "plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.module.css",
|
|
81
|
-
"scheme": "blackbox",
|
|
82
|
-
"componentType": "component"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"icons": [
|
|
86
|
-
{
|
|
87
|
-
"id": "gj-_D7n31Ho",
|
|
88
|
-
"name": "ChecksvgIcon",
|
|
89
|
-
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"id": "6PNxx3YMyDQ",
|
|
93
|
-
"name": "IconIcon",
|
|
94
|
-
"moduleFilePath": "plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx"
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
"images": [],
|
|
98
|
-
"indirect": false,
|
|
99
|
-
"globalContextsFilePath": "",
|
|
100
|
-
"codeComponents": [
|
|
101
|
-
{
|
|
102
|
-
"id": "P6aGdYWZ2R",
|
|
103
|
-
"name": "PlasmicHead",
|
|
104
|
-
"componentImportPath": "@plasmicapp/react-web"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"id": "8G2A-uTjGa",
|
|
108
|
-
"name": "Fetcher",
|
|
109
|
-
"componentImportPath": "@plasmicapp/react-web/lib/data-sources"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"globalVariants": {
|
|
115
|
-
"variantGroups": [
|
|
116
|
-
{
|
|
117
|
-
"id": "SCBjPXGDXDZBV",
|
|
118
|
-
"name": "Screen",
|
|
119
|
-
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
|
|
120
|
-
"contextFilePath": "plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx"
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
"wrapPagesWithGlobalContexts": true,
|
|
125
|
-
"cliVersion": "0.1.231",
|
|
126
|
-
"$schema": "https://unpkg.com/@plasmicapp/cli@0.1.231/dist/plasmic.schema.json"
|
|
127
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { PlasmicButton } from "./plasmic/create_plasmic_app/PlasmicButton";
|
|
3
|
-
|
|
4
|
-
function Button_(props, ref) {
|
|
5
|
-
const { plasmicProps } = PlasmicButton.useBehavior(props, ref);
|
|
6
|
-
return <PlasmicButton {...plasmicProps} />;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const Button = React.forwardRef(Button_);
|
|
10
|
-
|
|
11
|
-
export default Object.assign(Button, {
|
|
12
|
-
__plumeType: "button"
|
|
13
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// This is a skeleton starter React component generated by Plasmic.
|
|
2
|
-
// This file is owned by you, feel free to edit as you see fit.
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { PlasmicDynamicPage } from "./plasmic/create_plasmic_app/PlasmicDynamicPage";
|
|
5
|
-
|
|
6
|
-
function DynamicPage_(props, ref) {
|
|
7
|
-
// Use PlasmicDynamicPage to render this component as it was
|
|
8
|
-
// designed in Plasmic, by activating the appropriate variants,
|
|
9
|
-
// attaching the appropriate event handlers, etc. You
|
|
10
|
-
// can also install whatever React hooks you need here to manage state or
|
|
11
|
-
// fetch data.
|
|
12
|
-
//
|
|
13
|
-
// Props you can pass into PlasmicDynamicPage are:
|
|
14
|
-
// 1. Variants you want to activate,
|
|
15
|
-
// 2. Contents for slots you want to fill,
|
|
16
|
-
// 3. Overrides for any named node in the component to attach behavior and data,
|
|
17
|
-
// 4. Props to set on the root node.
|
|
18
|
-
//
|
|
19
|
-
// By default, we are just piping all DynamicPageProps here, but feel free
|
|
20
|
-
// to do whatever works for you.
|
|
21
|
-
return <PlasmicDynamicPage root={{ ref }} {...props} />;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const DynamicPage = React.forwardRef(DynamicPage_);
|
|
25
|
-
|
|
26
|
-
export default DynamicPage;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// This is a skeleton starter React component generated by Plasmic.
|
|
2
|
-
// This file is owned by you, feel free to edit as you see fit.
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { PlasmicHomepage } from "./plasmic/create_plasmic_app/PlasmicHomepage";
|
|
5
|
-
|
|
6
|
-
function Homepage_(props, ref) {
|
|
7
|
-
// Use PlasmicHomepage to render this component as it was
|
|
8
|
-
// designed in Plasmic, by activating the appropriate variants,
|
|
9
|
-
// attaching the appropriate event handlers, etc. You
|
|
10
|
-
// can also install whatever React hooks you need here to manage state or
|
|
11
|
-
// fetch data.
|
|
12
|
-
//
|
|
13
|
-
// Props you can pass into PlasmicHomepage are:
|
|
14
|
-
// 1. Variants you want to activate,
|
|
15
|
-
// 2. Contents for slots you want to fill,
|
|
16
|
-
// 3. Overrides for any named node in the component to attach behavior and data,
|
|
17
|
-
// 4. Props to set on the root node.
|
|
18
|
-
//
|
|
19
|
-
// By default, we are just piping all HomepageProps here, but feel free
|
|
20
|
-
// to do whatever works for you.
|
|
21
|
-
return <PlasmicHomepage root={{ ref }} {...props} />;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const Homepage = React.forwardRef(Homepage_);
|
|
25
|
-
|
|
26
|
-
export default Homepage;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// This is a skeleton starter React component generated by Plasmic.
|
|
2
|
-
// This file is owned by you, feel free to edit as you see fit.
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { PlasmicRandomDynamicPageButton } from "./plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton";
|
|
5
|
-
|
|
6
|
-
function RandomDynamicPageButton(props) {
|
|
7
|
-
// Use PlasmicRandomDynamicPageButton to render this component as it was
|
|
8
|
-
// designed in Plasmic, by activating the appropriate variants,
|
|
9
|
-
// attaching the appropriate event handlers, etc. You
|
|
10
|
-
// can also install whatever React hooks you need here to manage state or
|
|
11
|
-
// fetch data.
|
|
12
|
-
//
|
|
13
|
-
// Props you can pass into PlasmicRandomDynamicPageButton are:
|
|
14
|
-
// 1. Variants you want to activate,
|
|
15
|
-
// 2. Contents for slots you want to fill,
|
|
16
|
-
// 3. Overrides for any named node in the component to attach behavior and data,
|
|
17
|
-
// 4. Props to set on the root node.
|
|
18
|
-
//
|
|
19
|
-
// By default, we are just piping all RandomDynamicPageButtonProps here, but feel free
|
|
20
|
-
// to do whatever works for you.
|
|
21
|
-
return <PlasmicRandomDynamicPageButton {...props} />;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default RandomDynamicPageButton;
|