commit
cabed13294
|
|
@ -20,7 +20,10 @@
|
|||
"eslint": "^8.43.0",
|
||||
"lint-staged": "^14.0.0",
|
||||
"pnpm": "^8.6.12",
|
||||
"simple-git-hooks": "^2.9.0"
|
||||
"simple-git-hooks": "^2.9.0",
|
||||
"turbo": "^1.10.13",
|
||||
"typescript": "^5.0.2",
|
||||
"vitest": "^0.34.3"
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
|
|
|
|||
75
packages/cli/package.json
Normal file
75
packages/cli/package.json
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"name": "shadcn-vue",
|
||||
"type": "module",
|
||||
"version": "0.1.0",
|
||||
"description": "Add components to your apps.",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/radix-vue/shadcn-vue.git",
|
||||
"directory": "packages/cli"
|
||||
},
|
||||
"keywords": [
|
||||
"components",
|
||||
"ui",
|
||||
"vue",
|
||||
"nuxt",
|
||||
"tailwind",
|
||||
"radix-ui",
|
||||
"radix-vue",
|
||||
"shadcn",
|
||||
"shadcn-vue"
|
||||
],
|
||||
"exports": "./dist/index.js",
|
||||
"bin": "./dist/index.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "tsup --watch",
|
||||
"build": "tsup",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"clean": "rimraf dist && rimraf components",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint --fix .",
|
||||
"start:dev": "cross-env COMPONENTS_REGISTRY_URL=http://localhost:3000 node dist/index.js",
|
||||
"start": "node dist/index.js",
|
||||
"release": "changeset version",
|
||||
"pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
|
||||
"pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
|
||||
"pub:release": "pnpm build && pnpm publish --access public",
|
||||
"test": "vitest run",
|
||||
"test:ui": "vitest --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/ni": "^0.21.6",
|
||||
"chalk": "5.3.0",
|
||||
"commander": "^11.0.0",
|
||||
"cosmiconfig": "^8.2.0",
|
||||
"diff": "^5.1.0",
|
||||
"execa": "^8.0.1",
|
||||
"fs-extra": "^11.1.1",
|
||||
"https-proxy-agent": "^7.0.1",
|
||||
"lodash.template": "^4.5.0",
|
||||
"node-fetch": "^3.3.2",
|
||||
"ora": "^7.0.1",
|
||||
"prompts": "^2.4.2",
|
||||
"recast": "^0.23.4",
|
||||
"ts-morph": "^19.0.0",
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"zod": "^3.22.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/diff": "^5.0.3",
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/lodash.template": "^4.5.1",
|
||||
"@types/prompts": "^2.4.4",
|
||||
"rimraf": "^5.0.1",
|
||||
"tsup": "^7.2.0",
|
||||
"type-fest": "^4.3.0",
|
||||
"typescript": "^5.2.2"
|
||||
}
|
||||
}
|
||||
0
packages/cli/src/commands/add.ts
Normal file
0
packages/cli/src/commands/add.ts
Normal file
0
packages/cli/src/commands/diff.ts
Normal file
0
packages/cli/src/commands/diff.ts
Normal file
0
packages/cli/src/commands/init.ts
Normal file
0
packages/cli/src/commands/init.ts
Normal file
22
packages/cli/src/index.ts
Normal file
22
packages/cli/src/index.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env node
|
||||
import process from 'node:process'
|
||||
|
||||
import { Command } from 'commander'
|
||||
|
||||
process.on('SIGINT', () => process.exit(0))
|
||||
process.on('SIGTERM', () => process.exit(0))
|
||||
|
||||
async function main() {
|
||||
const program = new Command()
|
||||
.name('shadcn-vue')
|
||||
.description('add components and dependencies to your project')
|
||||
.version(
|
||||
'1.0.0',
|
||||
'-v, --version',
|
||||
'display the version number',
|
||||
)
|
||||
|
||||
program.parse()
|
||||
}
|
||||
|
||||
await main()
|
||||
11
packages/cli/tsup.config.ts
Normal file
11
packages/cli/tsup.config.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { defineConfig } from 'tsup'
|
||||
|
||||
export default defineConfig({
|
||||
clean: true,
|
||||
dts: true,
|
||||
entry: ['src/index.ts'],
|
||||
format: ['esm'],
|
||||
sourcemap: true,
|
||||
target: 'esnext',
|
||||
outDir: 'dist',
|
||||
})
|
||||
5136
pnpm-lock.yaml
5136
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -1,2 +1,4 @@
|
|||
packages:
|
||||
- 'apps/*'
|
||||
- 'packages/*'
|
||||
- 'templates/*'
|
||||
|
|
|
|||
24
templates/nuxt-template/.gitignore
vendored
Normal file
24
templates/nuxt-template/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
1
templates/nuxt-template/.npmrc
Normal file
1
templates/nuxt-template/.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
shamefully-hoist=true
|
||||
63
templates/nuxt-template/README.md
Normal file
63
templates/nuxt-template/README.md
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# Nuxt 3 Minimal Starter
|
||||
|
||||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install the dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm run dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm run build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm run preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||
5
templates/nuxt-template/app.vue
Normal file
5
templates/nuxt-template/app.vue
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<NuxtWelcome />
|
||||
</div>
|
||||
</template>
|
||||
4
templates/nuxt-template/nuxt.config.ts
Normal file
4
templates/nuxt-template/nuxt.config.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
devtools: { enabled: true },
|
||||
})
|
||||
15
templates/nuxt-template/package.json
Normal file
15
templates/nuxt-template/package.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/devtools": "latest",
|
||||
"nuxt": "^3.7.0"
|
||||
}
|
||||
}
|
||||
BIN
templates/nuxt-template/public/favicon.ico
Normal file
BIN
templates/nuxt-template/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
3
templates/nuxt-template/server/tsconfig.json
Normal file
3
templates/nuxt-template/server/tsconfig.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
||||
4
templates/nuxt-template/tsconfig.json
Normal file
4
templates/nuxt-template/tsconfig.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
||||
24
turbo.json
Normal file
24
turbo.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"globalEnv": ["NODE_ENV"],
|
||||
"pipeline": {
|
||||
"lint": {
|
||||
"cache": false,
|
||||
"outputs": []
|
||||
},
|
||||
"lint:fix": {
|
||||
"cache": false,
|
||||
"outputs": []
|
||||
},
|
||||
"typecheck": {},
|
||||
"dev": {
|
||||
"cache": false
|
||||
},
|
||||
"check": {
|
||||
"cache": false
|
||||
},
|
||||
"test": {
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user