bmdl-sdk 1.3.11 → 1.4.0

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/dev.js ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from 'child_process'
4
+ import { resolve } from 'path'
5
+ import { fileURLToPath } from 'url'
6
+ import { dirname } from 'path'
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url))
9
+
10
+ // Запускаем Vite в режиме разработки
11
+ const vite = spawn('vite', ['--port', '3000'], {
12
+ stdio: 'inherit',
13
+ shell: true,
14
+ cwd: process.cwd()
15
+ })
16
+
17
+ vite.on('close', (code) => {
18
+ process.exit(code)
19
+ })
20
+
21
+ console.log('🚀 Development server started on http://localhost:3000')
22
+ console.log('📦 Hot reload enabled for App.tsx, dataOptions.ts, viewOptions.ts')
package/bin/init.js CHANGED
@@ -48,16 +48,10 @@ for (const [dest, template] of Object.entries(templateFiles)) {
48
48
  const templatePath = resolve(templatesDir, template)
49
49
 
50
50
  if (existsSync(templatePath) && !existsSync(destPath)) {
51
- console.log('dest', dest);
52
-
53
51
  if (dest.includes('src')) {
54
52
  const newCode = updateTypesPath(templatePath)
55
53
  writeFileSync(destPath, newCode)
56
54
  } else {
57
- console.log('templatePath', templatePath);
58
- console.log('destPath', destPath);
59
- console.log('//////////////');
60
-
61
55
  copyFileSync(templatePath, destPath)
62
56
  }
63
57
  }
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmdl-sdk",
3
- "version": "1.3.11",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -13,9 +13,11 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
+ "@types/react": "^19.2.17",
17
+ "@types/react-dom": "^19.2.3",
18
+ "@vitejs/plugin-react": "^6.0.3",
16
19
  "react": "^19.2.7",
17
20
  "react-dom": "^19.2.7",
18
- "@types/react": "^19.2.17",
19
- "@types/react-dom": "^19.2.3"
21
+ "vite": "^8.1.3"
20
22
  }
21
23
  }
package/vite.config.ts ADDED
@@ -0,0 +1,25 @@
1
+ import react from '@vitejs/plugin-react'
2
+ import { defineConfig } from 'vite'
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ server: {
7
+ port: 3000,
8
+ },
9
+ build: {
10
+ lib: {
11
+ entry: 'src/App/App.tsx',
12
+ name: 'WidgetComponent',
13
+ formats: ['es'],
14
+ },
15
+ rollupOptions: {
16
+ external: ['react', 'react-dom'],
17
+ output: {
18
+ globals: {
19
+ react: 'React',
20
+ 'react-dom': 'ReactDOM',
21
+ },
22
+ },
23
+ },
24
+ },
25
+ })
Binary file
Binary file
Binary file