-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Nuxt 3 - Pinia - Vuetify] Feat: Update README #1229
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,42 +1,76 @@ | ||||||
# Nuxt 3 Minimal Starter | ||||||
# nuxt3-pinia-vuetify starter kit | ||||||
|
||||||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. | ||||||
This starter kit features **Nuxt.js 3**, **Pinia** for client-side state management, and **Vuetify**. for styling | ||||||
|
||||||
## Setup | ||||||
|
||||||
Make sure to install the dependencies: | ||||||
##### How to use this Starter Kit: | ||||||
|
||||||
```bash | ||||||
# yarn | ||||||
yarn install | ||||||
npm create @this-dot/starter -- --kit nuxt3-pinia-vuetify | ||||||
``` | ||||||
|
||||||
# npm | ||||||
npm install | ||||||
<sub>(use any of `npm` / `yarn` / `pnpm`)</sub> | ||||||
|
||||||
# pnpm | ||||||
pnpm install | ||||||
``` | ||||||
## Tech Stack | ||||||
|
||||||
## Development Server | ||||||
- [Nuxt.js v3.x](https://nuxt.com/) | ||||||
- [Pinia v2.x](https://pinia.vuejs.org/) | ||||||
- [Vuetify](https://vuetifyjs.com/) | ||||||
|
||||||
Start the development server on http://localhost:3000 | ||||||
#### Included Tooling | ||||||
|
||||||
```bash | ||||||
npm run dev | ||||||
``` | ||||||
- [Vue v3.x](https://vuejs.org/) | ||||||
- [Typescript](https://www.typescriptlang.org/) - Type checking | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- [Sass](https://sass-lang.com/guide) - CSS preproccesor | ||||||
- [ESLint](https://eslint.org/) - Code linting | ||||||
- [Prettier](https://prettier.io/) - Code formatting | ||||||
|
||||||
## Production | ||||||
> **Note**: We didn't include Storybook in this starter kit because it is not yet compatible with Nuxt.js 3. We will add it back in when it is. Likewise we didn't include tests because the testing story for Nuxt.js 3 is still being worked out and it's not production ready. | ||||||
|
||||||
Build the application for production: | ||||||
## Getting Started | ||||||
|
||||||
```bash | ||||||
npm run build | ||||||
``` | ||||||
#### Prerequisites | ||||||
|
||||||
Locally preview production build: | ||||||
- [Node.js 16.8](https://nodejs.org/) or later installed | ||||||
|
||||||
```bash | ||||||
npm run preview | ||||||
``` | ||||||
#### Development | ||||||
|
||||||
- start by [creating a new Starter Kit](link-to-wiki-page) project | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should add the wiki page link if available. |
||||||
- `cd` into your project directory and run `npm install`. | ||||||
- Run `npm run dev` to start the development server. | ||||||
- Open your browser to `http://localhost:3000` to see the included example code running. | ||||||
|
||||||
## Available Commands | ||||||
|
||||||
- `yarn dev` / `yarn start` - Starts the development server. | ||||||
- `yarn build` - Creates a `.output` directory with all your application, server and dependencies ready for production. | ||||||
- `yarn preview` - Starts a server to preview your Nuxt application after running the build command. | ||||||
- `yarn generate` - Pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the `nuxi build` command with the `prerender` argument set to `true` | ||||||
- `yarn postinstall` - Creates a `.nuxt` directory in your application and generates types. This can be useful in a CI environment or as a `postinstall` command in your `package.json`. | ||||||
- `yarn lint:js` - Runs ESLint on the project. | ||||||
- `yarn lint:prettier` - Runs Prettier on the project. | ||||||
- `yarn lint` - Runs both `yarn lint:js` and `yarn lint:prettier`. | ||||||
- `yarn lint:fix` - Runs ESLint and Prettier on the project and fixes any errors. | ||||||
|
||||||
## Project Details | ||||||
|
||||||
### Kit Organization / Architecture | ||||||
|
||||||
We've chose to split out a `components` directory for interactive UI components, and a `store` directory for the Pinia stores used for both global and some component state management. | ||||||
|
||||||
In this `nuxt3-pinia-vuetify` kit you will find the `CounterExample` and `FetchExample` directories in the components folder. | ||||||
|
||||||
The `CounterExample` directory component uses `Pinia` to control the state of the component. | ||||||
|
||||||
The `FetchExample` directory component uses `useLazyFetch` to fetch data from the example `hello endpoint`. | ||||||
|
||||||
## Styling and Theme | ||||||
|
||||||
The project uses [Vuetify](https://vuetifyjs.com/en/) as the main styling framework. Vuetify is a powerful Vue Component Framework built from the ground up to be easy to learn and rewarding to master. Our collection of UI components maintain a consistent style throughout your application with enough customization options to meet any use-case. | ||||||
|
||||||
Configurations are done in the `vuetify.ts` file, which is located in the `plugins` directory. Vuetify component, directives, themes and more configuration can be added here. | ||||||
|
||||||
## Deployment | ||||||
|
||||||
The `build` command creates a working Nuxt 3 app, so you can deploy it to any hosting provider that supports Nuxt.js. | ||||||
|
||||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. | ||||||
Deploying to [Vercel](https://vercel.com) or [Netlify](https://www.netlify.com) is as easy as hooking up your repository to the service and let the service auto detect the next app and configure it for you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
// plugins/vuetify.js | ||
import { createVuetify } from 'vuetify'; | ||
import { VBtn } from 'vuetify/components/VBtn'; | ||
import { VApp } from 'vuetify/components/VApp'; | ||
import { VProgressCircular } from 'vuetify/components/VProgressCircular'; | ||
import { VAlert } from 'vuetify/components/VAlert'; | ||
import * as components from 'vuetify/components'; | ||
import * as directives from 'vuetify/directives'; | ||
|
||
export const Vuetify = createVuetify({ | ||
ssr: true, | ||
theme: { | ||
defaultTheme: 'customTheme', | ||
themes: { | ||
customTheme: { | ||
dark: false, | ||
colors: { | ||
primary: '#3B82F6', | ||
export default defineNuxtPlugin((nuxtApp) => { | ||
const Vuetify = createVuetify({ | ||
ssr: true, | ||
theme: { | ||
defaultTheme: 'customTheme', | ||
themes: { | ||
customTheme: { | ||
dark: false, | ||
colors: { | ||
primary: '#3B82F6', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
components: { | ||
VBtn, | ||
VApp, | ||
VProgressCircular, | ||
VAlert, | ||
}, | ||
}); | ||
components, | ||
directives, | ||
}); | ||
|
||
export default defineNuxtPlugin((nuxtApp) => { | ||
nuxtApp.vueApp.use(Vuetify); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.