Skip to content

Commit

Permalink
fix: fs-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
xgChange committed May 17, 2023
1 parent bc4e6af commit 5e31338
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .changeset/green-grapes-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"mn-cli": patch
"mn-business": patch
"mn-core": patch
"mn-toolset": patch
---

fs-extra
5 changes: 4 additions & 1 deletion packages/cli/src/action/create.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ export class CreateAction extends AbstractAction {
name: `${this.prefixPkgName}-${pkgname}`,
version: '0.1.0',
scripts: {
build: "tsc --project ./tsconfig.json",
build: "tsc --project ./tsconfig.json && node ./script/build.js",
},
devDependencies: {
"fs-extra": "^11.1.1"
}
}
const indexTs = generateSubIndex(pkgname)
await mkdir(join(ctx, 'packages', pkgname), { recursive: true })
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const generateSubTsConfig = () => {
export const generateSubScript = (pkgname: string) => {
const script: Record<string, string> = {
'script/cp.js': `
const { copySync, removeSync } = require('fs')
const { copySync, removeSync } = require('fs-extra')
const { resolve } = require('path')
copySync(resolve(__dirname, '../dist/packages/<%= pkgname %>'), resolve(__dirname, '../dist'))
Expand Down

0 comments on commit 5e31338

Please sign in to comment.