bmdl-sdk 1.3.3 → 1.3.5

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/init.js CHANGED
@@ -1,8 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import {
4
+ copyFileSync,
5
+ existsSync,
6
+ mkdirSync,
7
+ readFileSync,
8
+ writeFileSync,
9
+ } from 'fs'
3
10
  import { basename, dirname, resolve } from 'path'
4
11
  import { fileURLToPath } from 'url'
5
- import { existsSync, mkdirSync, copyFileSync, readFileSync, writeFileSync } from 'fs'
6
12
 
7
13
  const __dirname = dirname(fileURLToPath(import.meta.url))
8
14
  const projectRoot = process.cwd()
@@ -55,8 +61,8 @@ updatePackageJson(projectRoot)
55
61
 
56
62
  console.log('✅ Project initialized successfully!')
57
63
  console.log('\nNext steps:')
58
- console.log(' 1. yarn install')
59
- console.log(' 2. yarn run dev')
64
+ console.log(' 1. yarn run dev')
65
+ console.log(' 2. yarn run build')
60
66
 
61
67
  //////
62
68
 
@@ -78,7 +84,10 @@ function updateTypesPath(filePath) {
78
84
  const fileCode = readFileSync(filePath, 'utf-8')
79
85
 
80
86
  let finalCode = fileCode.replace("from '../'", "from 'bmdl-sdk'")
81
- finalCode = fileCode.replace("NameComponent", kebabToCapitalize(`${sdf}-component`))
87
+ finalCode = finalCode.replace(
88
+ /NameComponent/g,
89
+ kebabToCapitalize(`${projectName}-component`),
90
+ )
82
91
 
83
92
  return finalCode
84
93
  }
@@ -89,5 +98,5 @@ function kebabToCapitalize(str) {
89
98
  return str
90
99
  .split('-')
91
100
  .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
92
- .join('');
93
- }
101
+ .join('')
102
+ }
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmdl-sdk",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {