Skip to content

Commit

Permalink
feat: ✨ add next starter
Browse files Browse the repository at this point in the history
  • Loading branch information
recallwei committed Dec 25, 2023
1 parent fe38825 commit 5f5cf75
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 32 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
"prepare": "husky install"
},
"dependencies": {
"vue": "^3.3.8"
"vue": "^3.3.13"
},
"devDependencies": {
"@brucesong/eslint-config-ts": "^1.0.15",
"@changesets/cli": "^2.26.2",
"@commitlint/cli": "^18.4.2",
"@commitlint/config-conventional": "^18.4.2",
"@brucesong/eslint-config-ts": "^1.0.17",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"commitizen": "^4.3.0",
"cspell": "^8.0.0",
"cz-git": "^1.7.1",
"eslint": "^8.54.0",
"cspell": "^8.2.3",
"cz-git": "^1.8.0",
"eslint": "^8.56.0",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"tornado-x": "workspace:^",
"unbuild": "^2.0.0"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/create-tornado/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# create-tornado

## 0.0.23

### Patch Changes

- add next start

## 0.0.22

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/create-tornado/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-tornado",
"version": "0.0.22",
"version": "0.0.23",
"description": "A CLI tool for scaffolding a project from an opinionated template for popular frameworks.",
"author": "Bruce Song <[email protected]> (https://github.com/recallwei/)",
"repository": {
Expand Down
51 changes: 30 additions & 21 deletions packages/create-tornado/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,39 @@ import { blue, cyan, green, lightBlue, lightGreen, lightRed } from 'kolorist'
import type { Framework } from './types'

export const FRAMEWORKS: Framework[] = [
{
name: 'react',
display: 'React',
color: cyan,
templates: [
{
name: 'react-starter',
display: 'React TypeScript Starter (React + TypeScript + antd + TailwindCSS)',
color: blue
}
]
},
{
name: 'vue',
display: 'Vue',
color: green,
templates: [
{
name: 'vue-ts-starter-template',
display:
'Vue TypeScript Starter Template (Vue + TypeScript + Naive UI + TailwindCSS)',
name: 'vue-starter',
display: 'Vue TypeScript Starter (Vue + TypeScript + Naive UI + TailwindCSS)',
color: green
}
]
},
{
name: 'react',
display: 'React',
color: cyan,
name: 'next',
display: 'Next',
color: lightBlue,
templates: [
{
name: 'react-ts-starter-template',
display:
'React TypeScript Starter Template (React + TypeScript + antd + TailwindCSS)',
color: blue
name: 'next-starter',
display: 'Next TypeScript Starter (Nuxt + TypeScript + TailwindCSS)',
color: lightGreen
}
]
},
Expand All @@ -35,9 +45,8 @@ export const FRAMEWORKS: Framework[] = [
color: lightGreen,
templates: [
{
name: 'nuxt-ts-starter-template',
display:
'Nuxt TypeScript Starter Template (Nuxt + TypeScript + TailwindCSS)',
name: 'nuxt-starter',
display: 'Nuxt TypeScript Starter (Nuxt + TypeScript + TailwindCSS)',
color: lightGreen
}
]
Expand All @@ -48,8 +57,8 @@ export const FRAMEWORKS: Framework[] = [
color: lightBlue,
templates: [
{
name: 'rspress-starter-template',
display: 'Rspress Starter Template (Rspress + TypeScript)',
name: 'rspress-starter',
display: 'Rspress Starter (Rspress + TypeScript)',
color: lightBlue
}
]
Expand All @@ -60,17 +69,17 @@ export const FRAMEWORKS: Framework[] = [
color: lightRed,
templates: [
{
name: 'nest-ts-starter-template',
display:
'Nest TypeScript Starter Template (Nest + TypeScript + Prisma + PostgreSQL)',
name: 'nest-starter',
display: 'Nest TypeScript Starter (Nest + TypeScript + Prisma + PostgreSQL)',
color: lightRed
}
]
}
]

export const TEMPLATES = FRAMEWORKS.map(
(f) => f.templates?.map((t) => t.name) || [f.name]
).reduce((a, b) => a.concat(b), [])
export const TEMPLATES = FRAMEWORKS.map((f) => f.templates?.map((t) => t.name) || [f.name]).reduce(
(a, b) => a.concat(b),
[]
)

export const DEFAULT_TARGET_DIR = 'tornado-app'

0 comments on commit 5f5cf75

Please sign in to comment.