chore: release 0.1.0

This commit is contained in:
zernonia 2023-09-06 13:29:48 +08:00
parent b89d7d3ce5
commit 16a42b1a27
3 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "shadcn-vue",
"type": "module",
"version": "0.0.3",
"version": "0.1.0",
"description": "Add components to your apps.",
"publishConfig": {
"access": "public"
@ -40,7 +40,7 @@
"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",
"pub:release": "pnpm build && pnpm publish --no-git-checks --access public",
"test": "vitest run",
"test:ui": "vitest --ui"
},

View File

@ -110,7 +110,7 @@ export const add = new Command()
const skippedDeps = new Set<string>()
for (const item of payload) {
spinner.text = `Installing ${item.name}...`
const targetDir = await getItemTargetPath(
const targetDir = getItemTargetPath(
config,
item,
options.path ? path.resolve(cwd, options.path) : undefined,

View File

@ -1,9 +1,16 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import fs from 'fs-extra'
import { type PackageJson } from 'type-fest'
export function getPackageInfo() {
const packageJsonPath = path.join('package.json')
const packageJsonPath = getPackageFilePath('../package.json')
return fs.readJSONSync(packageJsonPath) as PackageJson
}
function getPackageFilePath(filePath: string) {
const distPath = fileURLToPath(new URL('.', import.meta.url))
return path.resolve(distPath, filePath)
}