https://github.com/crashmax-dev/vue-template
Vue 3 template
https://github.com/crashmax-dev/vue-template
Last synced: 2 months ago
JSON representation
Vue 3 template
- Host: GitHub
- URL: https://github.com/crashmax-dev/vue-template
- Owner: crashmax-dev
- Created: 2024-03-24T11:26:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-22T14:44:22.000Z (4 months ago)
- Last Synced: 2025-03-28T22:34:59.444Z (3 months ago)
- Language: Vue
- Homepage: https://crashmax-dev.github.io/vue-template/
- Size: 10.1 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue 3 Template
## Requirements
- Node.js >=20.18.x
- PNPM 9.15.x## Stack
- [PNPM](https://pnpm.io)
- [Turborepo](https://turbo.build/repo/docs)
- [Vite](https://vite.dev)
- [Vue](https://vuejs.org)
- [Histoire](https://histoire.dev)
- [Vitest](https://vitest.dev)## Scripts
- `pnpm i` — Install dependencies
- `pnpm dev` — Running apps (http://localhost:5173) and Histoire (http://localhost:6006)
- `pnpm build` — Building apps and packages
- `pnpm test` — Runnning tests once
- `pnpm test:unit` — Running unit tests
- `pnpm test:unit-ui` — Running unit tests with [UI](https://vitest.dev/guide/ui.html)
- `pnpm lint` — Check the linting
- `pnpm lint:fix` — Linting and fixing## Publish packages to NPM
Add the code below to [.github/workflows/ci.yaml](.github/workflows/ci.yaml) and add `NPM_TOKEN` to the GitHub repository secrets.
```yaml
- name: Publish packages to NPM
shell: bash
run: |
echo "//registry.npmjs.org/:_authToken="${{ secrets.NPM_TOKEN }}"" > ~/.npmrc
pnpm -r --filter=./packages/* publish --access public --provenance
```and create a configuration for `vite.config.ts`
```ts
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'export default defineConfig({
plugins: [dts()],
build: {
target: 'esnext',
sourcemap: true,
minify: false,
emptyOutDir: false,
lib: {
entry: './src/index.ts',
name: 'utils',
fileName: 'index',
formats: ['es'],
},
rollupOptions: {
output: {
exports: 'named',
},
},
},
})
```and you will need to specify the export in the package.json file
```json
{
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"files": [
"dist"
]
}
```