create-pb-app 1.1.0 → 1.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.
- package/package.json +1 -1
- package/src/templates.js +10 -20
package/package.json
CHANGED
package/src/templates.js
CHANGED
|
@@ -41,7 +41,7 @@ export function getTemplates(projectName) {
|
|
|
41
41
|
skipLibCheck: true,
|
|
42
42
|
outDir: './dist'
|
|
43
43
|
},
|
|
44
|
-
include: ['
|
|
44
|
+
include: ['app/**/*', 'pages/**/*']
|
|
45
45
|
}, null, 4) + '\n'
|
|
46
46
|
},
|
|
47
47
|
{
|
|
@@ -63,7 +63,7 @@ export default defineConfig({});
|
|
|
63
63
|
</head>
|
|
64
64
|
|
|
65
65
|
<body>
|
|
66
|
-
<script type="module" src="./
|
|
66
|
+
<script type="module" src="./app/app.tsx"></script>
|
|
67
67
|
</body>
|
|
68
68
|
|
|
69
69
|
</html>
|
|
@@ -87,17 +87,17 @@ dist
|
|
|
87
87
|
}, null, 4) + '\n'
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
filePath: '
|
|
90
|
+
filePath: 'app/app.tsx',
|
|
91
91
|
content: `import { render } from 'jsx-framework-test-pb';
|
|
92
|
-
import { Home } from '../
|
|
92
|
+
import { Home } from '../pages/home';
|
|
93
93
|
import { createRouter, RouterView } from 'looserouter-test-pb';
|
|
94
|
-
import {
|
|
94
|
+
import { Layout } from './layout';
|
|
95
95
|
import { makeStaticStyles } from 'css-engine-test-pb';
|
|
96
96
|
|
|
97
97
|
const useStaticStyles = makeStaticStyles({
|
|
98
98
|
'@font-face': {
|
|
99
99
|
fontFamily: 'Neue Montreal',
|
|
100
|
-
src: 'url("
|
|
100
|
+
src: 'url("/fonts/NeueMontreal.woff2") format("woff2")',
|
|
101
101
|
fontWeight: '1 999',
|
|
102
102
|
fontDisplay: 'block'
|
|
103
103
|
},
|
|
@@ -110,7 +110,7 @@ const useStaticStyles = makeStaticStyles({
|
|
|
110
110
|
useStaticStyles();
|
|
111
111
|
|
|
112
112
|
const router = createRouter({
|
|
113
|
-
'/': (ctx) => <
|
|
113
|
+
'/': (ctx) => <Layout><Home /></Layout>
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
const App = () => <RouterView router={router} />;
|
|
@@ -119,7 +119,7 @@ render(<App />, document.body);
|
|
|
119
119
|
`
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
filePath: '
|
|
122
|
+
filePath: 'pages/home.tsx',
|
|
123
123
|
content: `import { Text } from 'components-test-pb';
|
|
124
124
|
|
|
125
125
|
export function Home() {
|
|
@@ -132,13 +132,8 @@ export function Home() {
|
|
|
132
132
|
`
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
|
-
filePath: '
|
|
136
|
-
content: `export {
|
|
137
|
-
`
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
filePath: 'src/layouts/Main.tsx',
|
|
141
|
-
content: `export function Main({ children }) {
|
|
135
|
+
filePath: 'app/layout.tsx',
|
|
136
|
+
content: `export function Layout({ children }) {
|
|
142
137
|
return (
|
|
143
138
|
<>
|
|
144
139
|
<header></header>
|
|
@@ -147,11 +142,6 @@ export function Home() {
|
|
|
147
142
|
</>
|
|
148
143
|
);
|
|
149
144
|
}
|
|
150
|
-
`
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
filePath: 'src/layouts/index.ts',
|
|
154
|
-
content: `export { Main } from './Main';
|
|
155
145
|
`
|
|
156
146
|
}
|
|
157
147
|
];
|