This commit is contained in:
pengfeizhou 2021-02-26 18:53:28 +08:00 committed by osborn
parent 3c05025f51
commit eee76858f8

View File

@ -18,7 +18,6 @@ async function shellCopy(dist: string, src: string) {
} }
async function initJS(dir: string, name: string) { async function initJS(dir: string, name: string) {
console.log(`Project location ${dir}`);
await fs.promises.writeFile( await fs.promises.writeFile(
path.resolve(dir, "package.json"), path.resolve(dir, "package.json"),
(await fs.promises.readFile(path.resolve(targetJSPath, "_package.json"), "utf-8")) (await fs.promises.readFile(path.resolve(targetJSPath, "_package.json"), "utf-8"))
@ -87,6 +86,7 @@ export default async function create(name: string) {
return; return;
} }
await fs.promises.mkdir(name) await fs.promises.mkdir(name)
console.log(`Create doric project at ${cwd}`);
await initJS(cwd, name) await initJS(cwd, name)
const androidDir = `${cwd}/android` const androidDir = `${cwd}/android`
if (fs.existsSync(androidDir)) { if (fs.existsSync(androidDir)) {