create-pb-app 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/templates.js +16 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pb-app",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-pb-app": "./src/cli.js"
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: ['src/**/*']
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="./src/App/App.tsx"></script>
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: 'src/App/App.tsx',
90
+ filePath: 'app/app.tsx',
91
91
  content: `import { render } from 'jsx-framework-test-pb';
92
- import { Home } from '../Pages/Home';
92
+ import { Home } from '../pages';
93
93
  import { createRouter, RouterView } from 'looserouter-test-pb';
94
- import { Main } from '../layouts';
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("../../public/fonts/NeueMontreal.woff2") format("woff2")',
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) => <Main><Home /></Main>
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: 'src/Pages/Home/Home.tsx',
122
+ filePath: 'pages/home/home.tsx',
123
123
  content: `import { Text } from 'components-test-pb';
124
124
 
125
125
  export function Home() {
@@ -132,13 +132,16 @@ export function Home() {
132
132
  `
133
133
  },
134
134
  {
135
- filePath: 'src/Pages/Home/index.ts',
136
- content: `export { Home } from './Home';
137
- `
135
+ filePath: 'pages/home/index.ts',
136
+ content: `export { Home } from './home';`
137
+ },
138
+ {
139
+ filePath: 'pages/index.ts',
140
+ content: `export { Home } from './home;`
138
141
  },
139
142
  {
140
- filePath: 'src/layouts/Main.tsx',
141
- content: `export function Main({ children }) {
143
+ filePath: 'app/layout.tsx',
144
+ content: `export function Layout({ children }) {
142
145
  return (
143
146
  <>
144
147
  <header></header>
@@ -147,11 +150,6 @@ export function Home() {
147
150
  </>
148
151
  );
149
152
  }
150
- `
151
- },
152
- {
153
- filePath: 'src/layouts/index.ts',
154
- content: `export { Main } from './Main';
155
153
  `
156
154
  }
157
155
  ];