Compare commits
7 Commits
f0c9d2c206
...
ed2d861bbb
| Author | SHA1 | Date | |
|---|---|---|---|
| ed2d861bbb | |||
| dd9c9ad902 | |||
| 627839d700 | |||
| 29ea4fc021 | |||
|
|
4d03791112 | ||
|
|
7d50709a14 | ||
|
|
1b0483b12a |
37
.gitignore
vendored
37
.gitignore
vendored
@ -0,0 +1,37 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules
|
||||||
|
.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# build outputs
|
||||||
|
.nuxt/
|
||||||
|
.output/
|
||||||
|
out/
|
||||||
|
build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
# turbo
|
||||||
|
.turbo
|
||||||
|
|
||||||
|
# vercel
|
||||||
|
.vercel
|
||||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/websites.iml" filepath="$PROJECT_DIR$/.idea/websites.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
12
.idea/websites.iml
generated
Normal file
12
.idea/websites.iml
generated
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
89
README.md
Normal file
89
README.md
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# Turborepo VueJS/NuxtJS starter
|
||||||
|
|
||||||
|
## My Notes
|
||||||
|
|
||||||
|
Package creation: `pnpm dlx nuxi@latest init -t module packages/ui --packageManager pnpm`. App creation: `pnpm dlx nuxi@latest init apps/panoramablick --packageManager pnpm`.
|
||||||
|
|
||||||
|
|
||||||
|
This is a community-maintained example. If you experience a problem, please submit a pull request with a fix. GitHub Issues will be closed.
|
||||||
|
|
||||||
|
## Using this example
|
||||||
|
|
||||||
|
Run the following command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx create-turbo@latest -e with-vue-nuxt
|
||||||
|
```
|
||||||
|
|
||||||
|
## What's inside?
|
||||||
|
|
||||||
|
This Turborepo includes the following packages/apps:
|
||||||
|
|
||||||
|
### Apps and Packages
|
||||||
|
|
||||||
|
- `docs`: a [Nuxt](https://nuxt.com/) app
|
||||||
|
- `web`: another [Vue3](https://vuejs.org/) app
|
||||||
|
- `ui`: a stub Vue component library shared by both `web` and `docs` applications
|
||||||
|
- `eslint-config-custom`: `eslint` configurations (includes `@nuxtjs/eslint-config-typescript` and `@vue/eslint-config-typescript`)
|
||||||
|
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
|
||||||
|
|
||||||
|
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
||||||
|
|
||||||
|
### Utilities
|
||||||
|
|
||||||
|
This Turborepo has some additional tools already setup for you:
|
||||||
|
|
||||||
|
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
||||||
|
- [ESLint](https://eslint.org/) for code linting
|
||||||
|
- [Prettier](https://prettier.io) for code formatting
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
To build all apps and packages, run the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd my-turborepo
|
||||||
|
pnpm build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Develop
|
||||||
|
|
||||||
|
To develop all apps and packages, run the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd my-turborepo
|
||||||
|
pnpm dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Remote Caching
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache).
|
||||||
|
|
||||||
|
Turborepo can use a technique known as [Remote Caching](https://turborepo.com/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
||||||
|
|
||||||
|
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup?utm_source=turborepo-examples), then enter the following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd my-turborepo
|
||||||
|
npx turbo login
|
||||||
|
```
|
||||||
|
|
||||||
|
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
|
||||||
|
|
||||||
|
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
|
||||||
|
|
||||||
|
```
|
||||||
|
npx turbo link
|
||||||
|
```
|
||||||
|
|
||||||
|
## Useful Links
|
||||||
|
|
||||||
|
Learn more about the power of Turborepo:
|
||||||
|
|
||||||
|
- [Tasks](https://turborepo.com/docs/crafting-your-repository/running-tasks)
|
||||||
|
- [Caching](https://turborepo.com/docs/crafting-your-repository/caching)
|
||||||
|
- [Remote Caching](https://turborepo.com/docs/core-concepts/remote-caching)
|
||||||
|
- [Filtering](https://turborepo.com/docs/crafting-your-repository/running-tasks#using-filters)
|
||||||
|
- [Configuration Options](https://turborepo.com/docs/reference/configuration)
|
||||||
|
- [CLI Usage](https://turborepo.com/docs/reference/command-line-reference)
|
||||||
24
apps/panoramablick/.gitignore
vendored
Normal file
24
apps/panoramablick/.gitignore
vendored
Normal 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
|
||||||
75
apps/panoramablick/README.md
Normal file
75
apps/panoramablick/README.md
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
# Nuxt Minimal Starter
|
||||||
|
|
||||||
|
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Make sure to install dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development Server
|
||||||
|
|
||||||
|
Start the development server on `http://localhost:3000`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm dev
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn dev
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Production
|
||||||
|
|
||||||
|
Build the application for production:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm build
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Locally preview production build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run preview
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm preview
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn preview
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run preview
|
||||||
|
```
|
||||||
|
|
||||||
|
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||||
6
apps/panoramablick/app.vue
Normal file
6
apps/panoramablick/app.vue
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<NuxtRouteAnnouncer />
|
||||||
|
<NuxtWelcome />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
6
apps/panoramablick/nuxt.config.ts
Normal file
6
apps/panoramablick/nuxt.config.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
compatibilityDate: '2025-05-15',
|
||||||
|
devtools: { enabled: true },
|
||||||
|
modules: ['@nuxt/fonts', '@nuxt/icon', '@nuxt/image', '@nuxt/ui']
|
||||||
|
})
|
||||||
23
apps/panoramablick/package.json
Normal file
23
apps/panoramablick/package.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "nuxt-app",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "nuxt build",
|
||||||
|
"dev": "nuxt dev",
|
||||||
|
"generate": "nuxt generate",
|
||||||
|
"preview": "nuxt preview",
|
||||||
|
"postinstall": "nuxt prepare"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@websites/ui": "0.0.0",
|
||||||
|
"@nuxt/fonts": "0.11.4",
|
||||||
|
"@nuxt/icon": "1.13.0",
|
||||||
|
"@nuxt/image": "1.10.0",
|
||||||
|
"@nuxt/ui": "3.1.3",
|
||||||
|
"nuxt": "^3.17.5",
|
||||||
|
"typescript": "^5.6.3",
|
||||||
|
"vue": "^3.5.16",
|
||||||
|
"vue-router": "^4.5.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
apps/panoramablick/public/favicon.ico
Normal file
BIN
apps/panoramablick/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
2
apps/panoramablick/public/robots.txt
Normal file
2
apps/panoramablick/public/robots.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
User-Agent: *
|
||||||
|
Disallow:
|
||||||
3
apps/panoramablick/server/tsconfig.json
Normal file
3
apps/panoramablick/server/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "../.nuxt/tsconfig.server.json"
|
||||||
|
}
|
||||||
4
apps/panoramablick/tsconfig.json
Normal file
4
apps/panoramablick/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
// https://nuxt.com/docs/guide/concepts/typescript
|
||||||
|
"extends": "./.nuxt/tsconfig.json"
|
||||||
|
}
|
||||||
15
package.json
Normal file
15
package.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "websites",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"build": "turbo run build --concurrency=1",
|
||||||
|
"dev": "turbo run dev --concurrency=1",
|
||||||
|
"lint": "turbo run lint --concurrency=1",
|
||||||
|
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "^3.2.5",
|
||||||
|
"turbo": "^2.5.4"
|
||||||
|
},
|
||||||
|
"packageManager": "pnpm@8.15.6"
|
||||||
|
}
|
||||||
12
packages/ui/.editorconfig
Normal file
12
packages/ui/.editorconfig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
56
packages/ui/.gitignore
vendored
Normal file
56
packages/ui/.gitignore
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Dependencies
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log*
|
||||||
|
|
||||||
|
# Temp directories
|
||||||
|
.temp
|
||||||
|
.tmp
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Yarn
|
||||||
|
**/.yarn/cache
|
||||||
|
**/.yarn/*state*
|
||||||
|
|
||||||
|
# Generated dirs
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Nuxt
|
||||||
|
.nuxt
|
||||||
|
.output
|
||||||
|
.data
|
||||||
|
.vercel_build_output
|
||||||
|
.build-*
|
||||||
|
.netlify
|
||||||
|
|
||||||
|
# Env
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
reports
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
|
# Intellij idea
|
||||||
|
*.iml
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# OSX
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
2
packages/ui/.npmrc
Normal file
2
packages/ui/.npmrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
shamefully-hoist=true
|
||||||
|
strict-peer-dependencies=false
|
||||||
84
packages/ui/README.md
Normal file
84
packages/ui/README.md
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<!--
|
||||||
|
Get your module up and running quickly.
|
||||||
|
|
||||||
|
Find and replace all on all files (CMD+SHIFT+F):
|
||||||
|
- Name: My Module
|
||||||
|
- Package name: my-module
|
||||||
|
- Description: My new Nuxt module
|
||||||
|
-->
|
||||||
|
|
||||||
|
# My Module
|
||||||
|
|
||||||
|
[![npm version][npm-version-src]][npm-version-href]
|
||||||
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
||||||
|
[![License][license-src]][license-href]
|
||||||
|
[![Nuxt][nuxt-src]][nuxt-href]
|
||||||
|
|
||||||
|
My new Nuxt module for doing amazing things.
|
||||||
|
|
||||||
|
- [✨ Release Notes](/CHANGELOG.md)
|
||||||
|
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
||||||
|
<!-- - [📖 Documentation](https://example.com) -->
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
<!-- Highlight some of the features your module provide here -->
|
||||||
|
- ⛰ Foo
|
||||||
|
- 🚠 Bar
|
||||||
|
- 🌲 Baz
|
||||||
|
|
||||||
|
## Quick Setup
|
||||||
|
|
||||||
|
Install the module to your Nuxt application with one command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx nuxi module add my-module
|
||||||
|
```
|
||||||
|
|
||||||
|
That's it! You can now use My Module in your Nuxt app ✨
|
||||||
|
|
||||||
|
|
||||||
|
## Contribution
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Local development</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# Generate type stubs
|
||||||
|
npm run dev:prepare
|
||||||
|
|
||||||
|
# Develop with the playground
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# Build the playground
|
||||||
|
npm run dev:build
|
||||||
|
|
||||||
|
# Run ESLint
|
||||||
|
npm run lint
|
||||||
|
|
||||||
|
# Run Vitest
|
||||||
|
npm run test
|
||||||
|
npm run test:watch
|
||||||
|
|
||||||
|
# Release new version
|
||||||
|
npm run release
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Badges -->
|
||||||
|
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
||||||
|
[npm-version-href]: https://npmjs.com/package/my-module
|
||||||
|
|
||||||
|
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
||||||
|
[npm-downloads-href]: https://npm.chart.dev/my-module
|
||||||
|
|
||||||
|
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
||||||
|
[license-href]: https://npmjs.com/package/my-module
|
||||||
|
|
||||||
|
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
||||||
|
[nuxt-href]: https://nuxt.com
|
||||||
20
packages/ui/eslint.config.mjs
Normal file
20
packages/ui/eslint.config.mjs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// @ts-check
|
||||||
|
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
|
||||||
|
|
||||||
|
// Run `npx @eslint/config-inspector` to inspect the resolved config interactively
|
||||||
|
export default createConfigForNuxt({
|
||||||
|
features: {
|
||||||
|
// Rules for module authors
|
||||||
|
tooling: true,
|
||||||
|
// Rules for formatting
|
||||||
|
stylistic: true,
|
||||||
|
},
|
||||||
|
dirs: {
|
||||||
|
src: [
|
||||||
|
'./playground',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.append(
|
||||||
|
// your custom flat config here...
|
||||||
|
)
|
||||||
4
packages/ui/nuxt.config.ts
Normal file
4
packages/ui/nuxt.config.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
modules: ["@nuxt/icon", "@nuxt/image", "@nuxt/fonts", "@nuxt/ui"]
|
||||||
|
})
|
||||||
61
packages/ui/package.json
Normal file
61
packages/ui/package.json
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"name": "@websites/ui",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "My new Nuxt module",
|
||||||
|
"repository": "your-org/my-module",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/types.d.mts",
|
||||||
|
"import": "./dist/module.mjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"main": "./dist/module.mjs",
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
".": [
|
||||||
|
"./dist/types.d.mts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"prepack": "nuxt-module-build build",
|
||||||
|
"dev": "npm run dev:prepare && nuxi dev playground",
|
||||||
|
"dev:build": "nuxi build playground",
|
||||||
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
||||||
|
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
||||||
|
"lint": "eslint .",
|
||||||
|
"test": "vitest run",
|
||||||
|
"test:watch": "vitest watch",
|
||||||
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@nuxt/kit": "^3.17.5"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@nuxt/ui": "3.1.3",
|
||||||
|
"nuxt": "^3.17.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@nuxt/devtools": "^2.5.0",
|
||||||
|
"@nuxt/eslint-config": "^1.4.1",
|
||||||
|
"@nuxt/fonts": "0.11.4",
|
||||||
|
"@nuxt/icon": "1.13.0",
|
||||||
|
"@nuxt/image": "1.10.0",
|
||||||
|
"@nuxt/module-builder": "^1.0.1",
|
||||||
|
"@nuxt/schema": "^3.17.5",
|
||||||
|
"@nuxt/test-utils": "^3.19.1",
|
||||||
|
"@nuxt/ui": "3.1.3",
|
||||||
|
"@types/node": "latest",
|
||||||
|
"changelogen": "^0.6.1",
|
||||||
|
"eslint": "^9.28.0",
|
||||||
|
"nuxt": "^3.17.5",
|
||||||
|
"typescript": "~5.8.3",
|
||||||
|
"vitest": "^3.2.3",
|
||||||
|
"vue-tsc": "^2.2.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
8
packages/ui/playground/app.vue
Normal file
8
packages/ui/playground/app.vue
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
Nuxt module playground!
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
</script>
|
||||||
5
packages/ui/playground/nuxt.config.ts
Normal file
5
packages/ui/playground/nuxt.config.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export default defineNuxtConfig({
|
||||||
|
modules: ['../src/module'],
|
||||||
|
myModule: {},
|
||||||
|
devtools: { enabled: true },
|
||||||
|
})
|
||||||
13
packages/ui/playground/package.json
Normal file
13
packages/ui/playground/package.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"name": "my-module-playground",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "nuxi dev",
|
||||||
|
"build": "nuxi build",
|
||||||
|
"generate": "nuxi generate"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"nuxt": "^3.17.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
3
packages/ui/playground/server/tsconfig.json
Normal file
3
packages/ui/playground/server/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "../.nuxt/tsconfig.server.json"
|
||||||
|
}
|
||||||
3
packages/ui/playground/tsconfig.json
Normal file
3
packages/ui/playground/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.nuxt/tsconfig.json"
|
||||||
|
}
|
||||||
19
packages/ui/src/module.ts
Normal file
19
packages/ui/src/module.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { defineNuxtModule, addPlugin, createResolver } from '@nuxt/kit'
|
||||||
|
|
||||||
|
// Module options TypeScript interface definition
|
||||||
|
export interface ModuleOptions {}
|
||||||
|
|
||||||
|
export default defineNuxtModule<ModuleOptions>({
|
||||||
|
meta: {
|
||||||
|
name: 'my-module',
|
||||||
|
configKey: 'myModule',
|
||||||
|
},
|
||||||
|
// Default configuration options of the Nuxt module
|
||||||
|
defaults: {},
|
||||||
|
setup(_options, _nuxt) {
|
||||||
|
const resolver = createResolver(import.meta.url)
|
||||||
|
|
||||||
|
// Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack`
|
||||||
|
addPlugin(resolver.resolve('./runtime/plugin'))
|
||||||
|
},
|
||||||
|
})
|
||||||
5
packages/ui/src/runtime/plugin.ts
Normal file
5
packages/ui/src/runtime/plugin.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { defineNuxtPlugin } from '#app'
|
||||||
|
|
||||||
|
export default defineNuxtPlugin((_nuxtApp) => {
|
||||||
|
console.log('Plugin injected by my-module!')
|
||||||
|
})
|
||||||
3
packages/ui/src/runtime/server/tsconfig.json
Normal file
3
packages/ui/src/runtime/server/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../../.nuxt/tsconfig.server.json",
|
||||||
|
}
|
||||||
15
packages/ui/test/basic.test.ts
Normal file
15
packages/ui/test/basic.test.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
import { describe, it, expect } from 'vitest'
|
||||||
|
import { setup, $fetch } from '@nuxt/test-utils/e2e'
|
||||||
|
|
||||||
|
describe('ssr', async () => {
|
||||||
|
await setup({
|
||||||
|
rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)),
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders the index page', async () => {
|
||||||
|
// Get response to a server-rendered page with `$fetch`.
|
||||||
|
const html = await $fetch('/')
|
||||||
|
expect(html).toContain('<div>basic</div>')
|
||||||
|
})
|
||||||
|
})
|
||||||
6
packages/ui/test/fixtures/basic/app.vue
vendored
Normal file
6
packages/ui/test/fixtures/basic/app.vue
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<template>
|
||||||
|
<div>basic</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
</script>
|
||||||
7
packages/ui/test/fixtures/basic/nuxt.config.ts
vendored
Normal file
7
packages/ui/test/fixtures/basic/nuxt.config.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import MyModule from '../../../src/module'
|
||||||
|
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
modules: [
|
||||||
|
MyModule,
|
||||||
|
],
|
||||||
|
})
|
||||||
5
packages/ui/test/fixtures/basic/package.json
vendored
Normal file
5
packages/ui/test/fixtures/basic/package.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"name": "basic",
|
||||||
|
"type": "module"
|
||||||
|
}
|
||||||
8
packages/ui/tsconfig.json
Normal file
8
packages/ui/tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.nuxt/tsconfig.json",
|
||||||
|
"exclude": [
|
||||||
|
"dist",
|
||||||
|
"node_modules",
|
||||||
|
"playground",
|
||||||
|
]
|
||||||
|
}
|
||||||
9004
pnpm-lock.yaml
generated
Normal file
9004
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
3
pnpm-workspace.yaml
Normal file
3
pnpm-workspace.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
packages:
|
||||||
|
- "apps/*"
|
||||||
|
- "packages/*"
|
||||||
15
turbo.json
Normal file
15
turbo.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://turborepo.com/schema.json",
|
||||||
|
"tasks": {
|
||||||
|
"build": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
||||||
|
"outputs": [".nuxt/**", ".output/**", "dist/**"]
|
||||||
|
},
|
||||||
|
"lint": {},
|
||||||
|
"dev": {
|
||||||
|
"cache": false,
|
||||||
|
"persistent": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user