mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 10:54:44 +00:00
refactor(repo): add pathe lib to cli tool
This commit is contained in:
3
cli.ts
3
cli.ts
@@ -7,6 +7,7 @@ const PACKAGE_MANAGER = 'pnpm@8.15.6';
|
|||||||
const NODE_VERSION = '>=18.0.0';
|
const NODE_VERSION = '>=18.0.0';
|
||||||
const VITE_VERSION = '^5.2.8';
|
const VITE_VERSION = '^5.2.8';
|
||||||
const VITE_DTS_VERSION = '^3.8.1';
|
const VITE_DTS_VERSION = '^3.8.1';
|
||||||
|
const PATHE_VERSION = '^1.1.2'
|
||||||
const DEFAULT_DIR = 'packages';
|
const DEFAULT_DIR = 'packages';
|
||||||
|
|
||||||
const generatePackageJson = (name: string, path: string, hasVite: boolean) => {
|
const generatePackageJson = (name: string, path: string, hasVite: boolean) => {
|
||||||
@@ -52,6 +53,7 @@ const generatePackageJson = (name: string, path: string, hasVite: boolean) => {
|
|||||||
...(hasVite && {
|
...(hasVite && {
|
||||||
vite: VITE_VERSION,
|
vite: VITE_VERSION,
|
||||||
'vite-plugin-dts': VITE_DTS_VERSION,
|
'vite-plugin-dts': VITE_DTS_VERSION,
|
||||||
|
pathe: PATHE_VERSION,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -61,6 +63,7 @@ const generatePackageJson = (name: string, path: string, hasVite: boolean) => {
|
|||||||
|
|
||||||
const generateViteConfig = () => `import { defineConfig } from 'vite';
|
const generateViteConfig = () => `import { defineConfig } from 'vite';
|
||||||
import dts from 'vite-plugin-dts';
|
import dts from 'vite-plugin-dts';
|
||||||
|
import { resolve } from 'pathe';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in New Issue
Block a user