chore: sync distributions/nuxt/README.md

This commit is contained in:
pooya parsa 2019-01-22 00:06:39 +03:30
parent 4ab3524551
commit f8c86f2aef

View File

@ -38,6 +38,7 @@
- Custom layouts with the `layouts/` directory - Custom layouts with the `layouts/` directory
- Middleware - Middleware
- Code splitting for every `pages/` - Code splitting for every `pages/`
- Loading just the critical CSS (page-level)
Learn more at [nuxtjs.org](https://nuxtjs.org). Learn more at [nuxtjs.org](https://nuxtjs.org).
@ -70,43 +71,10 @@ Support us with a monthly donation and help us continue our activities. [[Become
## Getting started ## Getting started
``` ```
$ npm install nuxt $ npx create-nuxt-app <project-name>
``` ```
Add a script to your package.json like this: It's as simple as that!
```json
{
"scripts": {
"start": "nuxt"
}
}
```
After that, the file-system is the main API. Every .vue file becomes a route that gets automatically processed and rendered.
Populate `./pages/index.vue` inside your project:
```html
<template>
<h1>Hello {{ name }}!</h1>
</template>
<script>
export default {
data: () => {
return { name: 'world' }
}
}
</script>
```
And then run:
```bash
npm start
```
Go to [http://localhost:3000](http://localhost:3000)
## Templates ## Templates