Merge pull request #14 from mukundshah/dev

chore: add more stuffs
This commit is contained in:
Mukund Shah 2023-08-27 13:24:55 +05:45 committed by GitHub
commit cabed13294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 5243 additions and 151 deletions

View File

@ -20,7 +20,10 @@
"eslint": "^8.43.0", "eslint": "^8.43.0",
"lint-staged": "^14.0.0", "lint-staged": "^14.0.0",
"pnpm": "^8.6.12", "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": { "commitlint": {
"extends": [ "extends": [

75
packages/cli/package.json Normal file
View 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"
}
}

View File

View File

View File

22
packages/cli/src/index.ts Normal file
View 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()

View 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',
})

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,4 @@
packages: packages:
- 'apps/*' - 'apps/*'
- 'packages/*'
- 'templates/*'

24
templates/nuxt-template/.gitignore vendored Normal file
View 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

View File

@ -0,0 +1 @@
shamefully-hoist=true

View 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.

View File

@ -0,0 +1,5 @@
<template>
<div>
<NuxtWelcome />
</div>
</template>

View File

@ -0,0 +1,4 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
})

View 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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}

View File

@ -0,0 +1,4 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}

24
turbo.json Normal file
View 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
}
}
}