|
| 1 | +> vp gen vite:library --no-interactive > /dev/null # create vite library with default values |
| 2 | +> ls vite-plus-library # check files created |
| 3 | +README.md |
| 4 | +package.json |
| 5 | +src |
| 6 | +tests |
| 7 | +tsconfig.json |
| 8 | +tsdown.config.ts |
| 9 | + |
| 10 | +> cat vite-plus-library/package.json # check package.json |
| 11 | +{ |
| 12 | + "name": "vite-plus-library", |
| 13 | + "version": "0.0.0", |
| 14 | + "description": "A starter for creating a TypeScript package.", |
| 15 | + "type": "module", |
| 16 | + "license": "MIT", |
| 17 | + "homepage": "https://github.com/author/library#readme", |
| 18 | + "bugs": { |
| 19 | + "url": "https://github.com/author/library/issues" |
| 20 | + }, |
| 21 | + "repository": { |
| 22 | + "type": "git", |
| 23 | + "url": "git+https://github.com/author/library.git" |
| 24 | + }, |
| 25 | + "author": "Author Name <author.name@mail.com>", |
| 26 | + "files": [ |
| 27 | + "dist" |
| 28 | + ], |
| 29 | + "main": "./dist/index.mjs", |
| 30 | + "module": "./dist/index.mjs", |
| 31 | + "types": "./dist/index.d.mts", |
| 32 | + "exports": { |
| 33 | + ".": "./dist/index.mjs", |
| 34 | + "./package.json": "./package.json" |
| 35 | + }, |
| 36 | + "scripts": { |
| 37 | + "build": "vite lib", |
| 38 | + "dev": "vite lib --watch", |
| 39 | + "test": "vite test", |
| 40 | + "typecheck": "tsc --noEmit", |
| 41 | + "prepublishOnly": "pnpm run build" |
| 42 | + }, |
| 43 | + "devDependencies": { |
| 44 | + "@types/node": "^24.10.1", |
| 45 | + "bumpp": "^10.3.1", |
| 46 | + "typescript": "^5.9.3", |
| 47 | + "vite": "npm:@voidzero-dev/vite-plus@latest" |
| 48 | + }, |
| 49 | + "packageManager": "pnpm@<semver>" |
| 50 | +} |
| 51 | + |
| 52 | +> cat vite-plus-library/.npmrc # check .npmrc |
| 53 | +//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} |
| 54 | +@voidzero-dev:registry=https://npm.pkg.github.com/ |
| 55 | + |
| 56 | +> cat vite-plus-library/tsconfig.json # check TypeScript setup |
| 57 | +{ |
| 58 | + "compilerOptions": { |
| 59 | + "target": "esnext", |
| 60 | + "lib": ["es2023"], |
| 61 | + "moduleDetection": "force", |
| 62 | + "module": "preserve", |
| 63 | + "moduleResolution": "bundler", |
| 64 | + "resolveJsonModule": true, |
| 65 | + "types": ["node"], |
| 66 | + "strict": true, |
| 67 | + "noUnusedLocals": true, |
| 68 | + "declaration": true, |
| 69 | + "emitDeclarationOnly": true, |
| 70 | + "esModuleInterop": true, |
| 71 | + "isolatedModules": true, |
| 72 | + "verbatimModuleSyntax": true, |
| 73 | + "skipLibCheck": true |
| 74 | + }, |
| 75 | + "include": ["src"] |
| 76 | +} |
| 77 | + |
| 78 | +> vp gen vite:library --no-interactive --directory my-vue -- --template vue > /dev/null # create vite library with custom template |
| 79 | +> ls my-vue # check files created |
| 80 | +README.md |
| 81 | +package.json |
| 82 | +playground |
| 83 | +src |
| 84 | +tests |
| 85 | +tsconfig.json |
| 86 | +tsdown.config.ts |
| 87 | +vite.config.ts |
| 88 | +vitest.config.ts |
| 89 | + |
| 90 | +> cat my-vue/package.json # check package.json |
| 91 | +{ |
| 92 | + "name": "my-vue", |
| 93 | + "version": "0.0.0", |
| 94 | + "description": "A starter for creating a Vue component library.", |
| 95 | + "type": "module", |
| 96 | + "license": "MIT", |
| 97 | + "homepage": "https://github.com/author/library#readme", |
| 98 | + "bugs": { |
| 99 | + "url": "https://github.com/author/library/issues" |
| 100 | + }, |
| 101 | + "repository": { |
| 102 | + "type": "git", |
| 103 | + "url": "git+https://github.com/author/library.git" |
| 104 | + }, |
| 105 | + "author": "Author Name <author.name@mail.com>", |
| 106 | + "files": [ |
| 107 | + "dist" |
| 108 | + ], |
| 109 | + "main": "./dist/index.js", |
| 110 | + "module": "./dist/index.js", |
| 111 | + "types": "./dist/index.d.ts", |
| 112 | + "exports": { |
| 113 | + ".": "./dist/index.js", |
| 114 | + "./package.json": "./package.json" |
| 115 | + }, |
| 116 | + "publishConfig": { |
| 117 | + "access": "public" |
| 118 | + }, |
| 119 | + "scripts": { |
| 120 | + "build": "vite lib", |
| 121 | + "dev": "vite lib --watch", |
| 122 | + "play": "vite", |
| 123 | + "test": "vite test", |
| 124 | + "typecheck": "vue-tsc --noEmit", |
| 125 | + "release": "bumpp && pnpm publish", |
| 126 | + "prepublishOnly": "pnpm run build" |
| 127 | + }, |
| 128 | + "peerDependencies": { |
| 129 | + "vue": "^3.0.0" |
| 130 | + }, |
| 131 | + "devDependencies": { |
| 132 | + "@types/node": "^24.10.1", |
| 133 | + "@vitejs/plugin-vue": "^6.0.1", |
| 134 | + "@vue/test-utils": "^2.4.6", |
| 135 | + "bumpp": "^10.3.1", |
| 136 | + "happy-dom": "^20.0.10", |
| 137 | + "typescript": "^5.9.3", |
| 138 | + "vue": "^3.5.24", |
| 139 | + "vue-tsc": "^3.1.4", |
| 140 | + "vite": "npm:@voidzero-dev/vite-plus@latest" |
| 141 | + }, |
| 142 | + "packageManager": "pnpm@<semver>" |
| 143 | +} |
0 commit comments