create-kepo-plugin 1.0.24 → 1.0.25
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/index.js +3 -2
- package/package.json +1 -1
- package/template/GUIDE.md +3 -4
- package/template/VERSION.md +4 -0
- package/template/npmrc +3 -0
- package/template/package.json +1 -1
package/index.js
CHANGED
|
@@ -253,10 +253,11 @@ async function init() {
|
|
|
253
253
|
fs.mkdirSync(destDir, { recursive: true })
|
|
254
254
|
for (const file of fs.readdirSync(srcDir)) {
|
|
255
255
|
const srcFile = path.resolve(srcDir, file)
|
|
256
|
-
const destFile = path.resolve(destDir, file)
|
|
257
256
|
|
|
258
257
|
// 计算相对于模板目录的路径
|
|
259
258
|
const relativePath = path.relative(templateDir, srcFile)
|
|
259
|
+
const targetFileName = relativePath === 'npmrc' ? '.npmrc' : file
|
|
260
|
+
const destFile = path.resolve(destDir, targetFileName)
|
|
260
261
|
|
|
261
262
|
// 如果启用 noExample 且当前文件是 example 文件,则跳过
|
|
262
263
|
if (noExample && exampleFiles.includes(relativePath.replace(/\\/g, '/'))) {
|
|
@@ -321,4 +322,4 @@ export default widgets;
|
|
|
321
322
|
|
|
322
323
|
init().catch((e) => {
|
|
323
324
|
console.error(e)
|
|
324
|
-
})
|
|
325
|
+
})
|
package/package.json
CHANGED
package/template/GUIDE.md
CHANGED
package/template/npmrc
ADDED