Skip to content

Commit

Permalink
fix: add scripts error
Browse files Browse the repository at this point in the history
  • Loading branch information
Chieffo2021 committed Jul 4, 2022
1 parent 4a2a529 commit 08efa45
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/generate/genePackageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export function genePackageJson (rawPath: string, outPath: string, astParsingRes
}

// add vite dev script
if (!packageJson.scripts) {
packageJson.scripts = {}
}
packageJson.scripts['serve-vite'] = 'vite'
packageJson.scripts['build-vite'] = 'vite build'
packageJson.scripts['preview-vite'] = 'vite preview'
Expand Down Expand Up @@ -81,7 +84,7 @@ export function getGreaterVersion (versionA: string, versionB: string): string {
export function processDependencies (
originDependencies: object,
targetDependencies: object,
restDependencies: object
restDependencies: object,
): {
targetDependencies: object,
restDependencies: object
Expand All @@ -99,6 +102,6 @@ export function processDependencies (
})
return {
targetDependencies,
restDependencies
restDependencies,
}
}

0 comments on commit 08efa45

Please sign in to comment.