buner 1.0.1 → 1.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/bin/buner.js +10 -6
- package/cli/helpers/format-files.ts +9 -5
- package/package.json +1 -1
package/bin/buner.js
CHANGED
|
@@ -13,7 +13,7 @@ import { globby } from "globby";
|
|
|
13
13
|
import { exec } from "node:child_process";
|
|
14
14
|
import validateProjectName from "validate-npm-package-name";
|
|
15
15
|
const name = "buner";
|
|
16
|
-
const version = "1.0.
|
|
16
|
+
const version = "1.0.2";
|
|
17
17
|
const description = "Frontend build toolkit for Vite + React SSR projects — SCSS pipeline, prerender, SSR dev server, and backend integration.";
|
|
18
18
|
const type = "module";
|
|
19
19
|
const license = "MIT";
|
|
@@ -212,11 +212,15 @@ const formatFiles = async (root) => {
|
|
|
212
212
|
`;
|
|
213
213
|
await fs$1.writeFile(filePath, data + os.EOL);
|
|
214
214
|
filePath = path.join(root, "src/react-loader.tsx");
|
|
215
|
-
|
|
216
|
-
data =
|
|
217
|
-
|
|
218
|
-
"
|
|
219
|
-
|
|
215
|
+
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
216
|
+
data = [
|
|
217
|
+
"import { lazy } from 'react';",
|
|
218
|
+
"",
|
|
219
|
+
"export const blocks: { [name: string]: any } = {",
|
|
220
|
+
" root: lazy(() => import('./organisms/root/Root')),",
|
|
221
|
+
"};",
|
|
222
|
+
""
|
|
223
|
+
].join("\n");
|
|
220
224
|
await fs$1.writeFile(filePath, data);
|
|
221
225
|
filePath = path.join(root, "src/_types/atoms.d.ts");
|
|
222
226
|
await fs$1.writeFile(
|
|
@@ -28,11 +28,15 @@ const formatFiles = async (root: string) => {
|
|
|
28
28
|
|
|
29
29
|
// react loader
|
|
30
30
|
filePath = path.join(root, 'src/react-loader.tsx');
|
|
31
|
-
|
|
32
|
-
data =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
32
|
+
data = [
|
|
33
|
+
"import { lazy } from 'react';",
|
|
34
|
+
'',
|
|
35
|
+
'export const blocks: { [name: string]: any } = {',
|
|
36
|
+
"\troot: lazy(() => import('./organisms/root/Root')),",
|
|
37
|
+
'};',
|
|
38
|
+
'',
|
|
39
|
+
].join('\n');
|
|
36
40
|
|
|
37
41
|
await fs.writeFile(filePath, data);
|
|
38
42
|
|
package/package.json
CHANGED