-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: The main process of
lib template
is written
- Loading branch information
1 parent
55c56b6
commit 7ab3901
Showing
8 changed files
with
111 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ILibOption } from "../../../utils"; | ||
|
||
|
||
export const runRuntimeLib = async (option: ILibOption) => { | ||
console.log(option) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,44 @@ | ||
import chalk from 'chalk' | ||
import type { ICliOption } from '../../utils' | ||
import { runViteVue } from './vite-vue' | ||
export async function run(option: ICliOption) { | ||
import { runRuntimeVue } from './runtime-vue' | ||
import {ILibOption, IViteVueOption, PROJECTTYPE} from "../../utils"; | ||
import {runRuntimeLib} from "./runtime-lib"; | ||
export async function run(option: IViteVueOption & ILibOption) { | ||
const { | ||
projectName, | ||
projectType, | ||
projectPath, | ||
uiLibType, | ||
cssLibType, | ||
unitTestLibType, | ||
envType, | ||
buildLibType, | ||
} = option | ||
|
||
if (projectType === 'vue') { | ||
console.log(chalk.bgBlueBright.bold(`\nstart creating project <${projectName}> ...`)) | ||
console.log(chalk.bgBlueBright.bold(`\nstart creating project <${projectName}> ...`)) | ||
|
||
if (projectType === PROJECTTYPE.VUE) { | ||
const viteVueOption = { | ||
projectName, | ||
projectPath, | ||
uiLibType, | ||
cssLibType, | ||
projectType, | ||
unitTestLibType, | ||
} | ||
await runRuntimeVue(viteVueOption) | ||
return | ||
} | ||
|
||
if(projectType === PROJECTTYPE.LIB){ | ||
const libOption = { | ||
projectName, | ||
projectPath, | ||
projectType, | ||
unitTestLibType, | ||
envType, | ||
buildLibType, | ||
} | ||
await runViteVue(viteVueOption) | ||
await runRuntimeLib(libOption) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters