Skip to content

Instantly share code, notes, and snippets.

@YakovSPb
Last active November 28, 2020 14:18
Show Gist options
  • Save YakovSPb/45c463c303382558080680fb236047ae to your computer and use it in GitHub Desktop.
Save YakovSPb/45c463c303382558080680fb236047ae to your computer and use it in GitHub Desktop.
vue nuxt
Vue nuxt
================
1.
npm i -g create-nuxt-apps
2.
create-nuxt-app project
3. Запуск приложения
npm run dev
4.
npm run dev - разработка
npm run build - создание клиента и сервера
npm run start - запуск статики (build)
npm run generate - если работаем в моде SPAS
5. Уставливаем boostrap
npm i bootstarp
6. в файле nuxt.config.js поключем стиль @@ - значить в корне приложения
'@/node_modules/bootstrap/dist/css/bootstrap.min.css'
7. Создаем компонент в папке components
<template>
</template>
8. добавляем компонент в layouts/default.vue
<template>
<div>
<Header />
<Copters />
<Nuxt />
</div>
</template>
<script>
import Header from '@/components/Header'
import Copters from '@/components/Copters'
export default {
components: {
Navbar,
Copters
}
}
</script>
8. Созадем страницу в pages/about.vue
<template>
<section>
<h1>About</h1>
</section>
</template>
<nuxt-link exact active-class="active" to="/" class="logo__link">
<div class="logo__img"><img src="@/assets/img/logo.svg" alt="alt"></div>
</nuxt-link>
9. Установка Axios
https://github.com/nuxt-community/awesome-nuxt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment