@blocklet/component-studio-cli 0.4.144 → 0.4.146
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/dist/commands/migrate.js +2 -2
- package/package.json +1 -1
package/dist/commands/migrate.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import fetch from 'node-fetch';
|
|
4
|
-
import { createWriteStream, mkdirSync, readdirSync, readFileSync, rmSync } from 'node:fs';
|
|
4
|
+
import { createWriteStream, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
5
5
|
import { join, relative } from 'node:path';
|
|
6
6
|
import { pipeline } from 'node:stream/promises';
|
|
7
7
|
import ora from 'ora';
|
|
@@ -125,7 +125,7 @@ export function createMigrateCommand() {
|
|
|
125
125
|
catch (err) {
|
|
126
126
|
// 是文件,直接复制
|
|
127
127
|
const content = readFileSync(sourcePath);
|
|
128
|
-
|
|
128
|
+
writeFileSync(targetPath, content);
|
|
129
129
|
// 检查index.tsx文件是否引用了@blocklet/pages-kit
|
|
130
130
|
if (file === 'index.tsx') {
|
|
131
131
|
if (checkPackageReference(targetPath, '@blocklet/pages-kit')) {
|