Skip to content

Commit

Permalink
fix: fix per code review
Browse files Browse the repository at this point in the history
  • Loading branch information
skyclouds2001 committed Dec 22, 2024
1 parent 55d9540 commit 3ee9eac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm i @sky-fly/template -g
Then generate a project:

```sh
create-template
create
```

Also directly use npx tool to generate a project without globally install it is available:
Expand All @@ -25,13 +25,13 @@ npx @sky-fly/template init
Can pass one CLI option as the project name, which will be used to decide the folder name where the generated project template will be placed.

```sh
create-template project-name
create project-name
```

Can also pass another CLI option as the package name, which will be used to overwrite the default in the project. If not specified, the project name will be used as the package name.

```sh
create-template project-name package-name
create project-name package-name
```

Other available CLI options are shown below:
Expand Down
16 changes: 8 additions & 8 deletions src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ import kleur from 'kleur'
/**
* templates enum
*/
export class Template {
static readonly 'vite-vue' = {
export const Template = {
'vite-vue': {
name: 'vite-vue',
template: 'vite-vue-template-sky',
color: kleur.green,
} as const
},

static readonly 'vite-react' = {
'vite-react': {
name: 'vite-react',
template: 'vite-react-template-sky',
color: kleur.blue,
} as const
},

static readonly 'rollup' = {
rollup: {
name: 'rollup',
template: 'rollup-template-sky',
color: kleur.magenta,
} as const
}
},
} as const

/**
* validate if a template name is valid and supported one
Expand Down

0 comments on commit 3ee9eac

Please sign in to comment.