build: initial ehandy
This commit is contained in:
commit
0b0bda97c9
16
.babelrc
Normal file
16
.babelrc
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "current"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@ -0,0 +1,13 @@
|
||||
# editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
18
.eslintrc.js
Normal file
18
.eslintrc.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true
|
||||
},
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint'
|
||||
},
|
||||
extends: [
|
||||
'@nuxtjs',
|
||||
'plugin:nuxt/recommended'
|
||||
],
|
||||
plugins: [
|
||||
],
|
||||
// add your custom rules here
|
||||
rules: {}
|
||||
}
|
90
.gitignore
vendored
Normal file
90
.gitignore
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Node template
|
||||
# Logs
|
||||
/logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# Nuxt generate
|
||||
dist
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless
|
||||
|
||||
# IDE / Editor
|
||||
.idea
|
||||
|
||||
# Service worker
|
||||
sw.*
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
# Vim swap files
|
||||
*.swp
|
20
README.md
Normal file
20
README.md
Normal file
@ -0,0 +1,20 @@
|
||||
# init
|
||||
|
||||
## Build Setup
|
||||
|
||||
```bash
|
||||
# install dependencies
|
||||
$ npm install
|
||||
|
||||
# serve with hot reload at localhost:3000
|
||||
$ npm run dev
|
||||
|
||||
# build for production and launch server
|
||||
$ npm run build
|
||||
$ npm run start
|
||||
|
||||
# generate static project
|
||||
$ npm run generate
|
||||
```
|
||||
|
||||
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
|
7
assets/README.md
Normal file
7
assets/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# ASSETS
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
|
BIN
assets/buefy.png
Normal file
BIN
assets/buefy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
3
commitlint.config.js
Normal file
3
commitlint.config.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional']
|
||||
}
|
42
components/Card.vue
Normal file
42
components/Card.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div class="column">
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title has-text-grey">
|
||||
{{ title }}
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content">
|
||||
<div class="content has-text-centered">
|
||||
<b-icon
|
||||
:icon="icon"
|
||||
size="is-large"
|
||||
type="is-primary"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="card-footer">
|
||||
<div class="card-footer-item">
|
||||
<span>
|
||||
<slot />
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
29
components/Logo.vue
Normal file
29
components/Logo.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<svg class="NuxtLogo" width="245" height="180" viewBox="0 0 452 342" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
|
||||
fill="#00C58E"
|
||||
/>
|
||||
<path
|
||||
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
|
||||
fill="#108775"
|
||||
/>
|
||||
<path
|
||||
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
|
||||
fill="#2F495E"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.NuxtLogo {
|
||||
animation: 1s appear;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
7
components/README.md
Normal file
7
components/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# COMPONENTS
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
The components directory contains your Vue.js Components.
|
||||
|
||||
_Nuxt.js doesn't supercharge these components._
|
18
content/hello.md
Normal file
18
content/hello.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Getting started
|
||||
description: 'Empower your NuxtJS application with @nuxt/content module: write in a content/ directory and fetch your Markdown, JSON, YAML and CSV files through a MongoDB like API, acting as a Git-based Headless CMS.'
|
||||
---
|
||||
|
||||
Empower your NuxtJS application with `@nuxtjs/content` module: write in a `content/` directory and fetch your Markdown, JSON, YAML and CSV files through a MongoDB like API, acting as a **Git-based Headless CMS**.
|
||||
|
||||
## Writing content
|
||||
|
||||
Learn how to write your `content/`, supporting Markdown, YAML, CSV and JSON: https://content.nuxtjs.org/writing.
|
||||
|
||||
## Fetching content
|
||||
|
||||
Learn how to fetch your content with `$content`: https://content.nuxtjs.org/fetching.
|
||||
|
||||
## Displaying content
|
||||
|
||||
Learn how to display your Markdown content with the `<nuxt-content>` component directly in your template: https://content.nuxtjs.org/displaying.
|
21
jest.config.js
Normal file
21
jest.config.js
Normal file
@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/$1',
|
||||
'^~/(.*)$': '<rootDir>/$1',
|
||||
'^vue$': 'vue/dist/vue.common.js'
|
||||
},
|
||||
moduleFileExtensions: [
|
||||
'js',
|
||||
'vue',
|
||||
'json'
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
'.*\\.(vue)$': 'vue-jest'
|
||||
},
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: [
|
||||
'<rootDir>/components/**/*.vue',
|
||||
'<rootDir>/pages/**/*.vue'
|
||||
]
|
||||
}
|
7
layouts/README.md
Normal file
7
layouts/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# LAYOUTS
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
This directory contains your Application Layouts.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
|
74
layouts/default.vue
Normal file
74
layouts/default.vue
Normal file
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div>
|
||||
<nav
|
||||
class="navbar header has-shadow is-primary"
|
||||
role="navigation"
|
||||
aria-label="main navigation"
|
||||
>
|
||||
<div class="navbar-brand">
|
||||
<a
|
||||
class="navbar-item"
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
src="~assets/buefy.png"
|
||||
alt="Buefy"
|
||||
height="28"
|
||||
>
|
||||
</a>
|
||||
|
||||
<div class="navbar-burger">
|
||||
<span />
|
||||
<span />
|
||||
<span />
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="main-content columns">
|
||||
<aside class="column is-2 section">
|
||||
<p class="menu-label is-hidden-touch">
|
||||
General
|
||||
</p>
|
||||
<ul class="menu-list">
|
||||
<li
|
||||
v-for="(item, key) of items"
|
||||
:key="key"
|
||||
>
|
||||
<nuxt-link
|
||||
:to="item.to"
|
||||
exact-active-class="is-active"
|
||||
>
|
||||
<b-icon :icon="item.icon" /> {{ item.title }}
|
||||
</nuxt-link>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<div class="container column is-10">
|
||||
<nuxt />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
title: 'Home',
|
||||
icon: 'home',
|
||||
to: { name: 'index' }
|
||||
},
|
||||
{
|
||||
title: 'Inspire',
|
||||
icon: 'lightbulb',
|
||||
to: { name: 'inspire' }
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
8
middleware/README.md
Normal file
8
middleware/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# MIDDLEWARE
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
This directory contains your application middleware.
|
||||
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
|
65
nuxt.config.js
Normal file
65
nuxt.config.js
Normal file
@ -0,0 +1,65 @@
|
||||
export default {
|
||||
// Target: https://go.nuxtjs.dev/config-target
|
||||
target: 'static',
|
||||
|
||||
// Global page headers: https://go.nuxtjs.dev/config-head
|
||||
head: {
|
||||
title: 'init',
|
||||
meta: [
|
||||
{ charset: 'utf-8' },
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||
{ hid: 'description', name: 'description', content: '' }
|
||||
],
|
||||
link: [
|
||||
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
|
||||
]
|
||||
},
|
||||
|
||||
// Global CSS: https://go.nuxtjs.dev/config-css
|
||||
css: [
|
||||
],
|
||||
|
||||
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
||||
plugins: [
|
||||
],
|
||||
|
||||
// Auto import components: https://go.nuxtjs.dev/config-components
|
||||
components: true,
|
||||
|
||||
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
||||
buildModules: [
|
||||
// https://go.nuxtjs.dev/eslint
|
||||
'@nuxtjs/eslint-module',
|
||||
// https://go.nuxtjs.dev/stylelint
|
||||
'@nuxtjs/stylelint-module'
|
||||
],
|
||||
|
||||
// Modules: https://go.nuxtjs.dev/config-modules
|
||||
modules: [
|
||||
// https://go.nuxtjs.dev/buefy
|
||||
'nuxt-buefy',
|
||||
// https://go.nuxtjs.dev/axios
|
||||
'@nuxtjs/axios',
|
||||
// https://go.nuxtjs.dev/pwa
|
||||
'@nuxtjs/pwa',
|
||||
// https://go.nuxtjs.dev/content
|
||||
'@nuxt/content'
|
||||
],
|
||||
|
||||
// Axios module configuration: https://go.nuxtjs.dev/config-axios
|
||||
axios: {},
|
||||
|
||||
// PWA module configuration: https://go.nuxtjs.dev/pwa
|
||||
pwa: {
|
||||
manifest: {
|
||||
lang: 'en'
|
||||
}
|
||||
},
|
||||
|
||||
// Content module configuration: https://go.nuxtjs.dev/config-content
|
||||
content: {},
|
||||
|
||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||
build: {
|
||||
}
|
||||
}
|
19766
package-lock.json
generated
Normal file
19766
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
53
package.json
Normal file
53
package.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "init",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start",
|
||||
"generate": "nuxt generate",
|
||||
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
|
||||
"lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore",
|
||||
"lint": "npm run lint:js && npm run lint:style",
|
||||
"test": "jest"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,vue}": "eslint",
|
||||
"*.{css,vue}": "stylelint"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/content": "^1.14.0",
|
||||
"@nuxtjs/axios": "^5.13.1",
|
||||
"@nuxtjs/pwa": "^3.3.5",
|
||||
"core-js": "^3.9.1",
|
||||
"nuxt": "^2.15.3",
|
||||
"nuxt-buefy": "^0.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^12.0.1",
|
||||
"@commitlint/config-conventional": "^12.0.1",
|
||||
"@nuxtjs/eslint-config": "^6.0.0",
|
||||
"@nuxtjs/eslint-module": "^3.0.2",
|
||||
"@nuxtjs/stylelint-module": "^4.0.0",
|
||||
"@vue/test-utils": "^1.1.3",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^26.6.3",
|
||||
"eslint": "^7.22.0",
|
||||
"eslint-plugin-nuxt": "^2.0.0",
|
||||
"eslint-plugin-vue": "^7.7.0",
|
||||
"husky": "^4.3.8",
|
||||
"jest": "^26.6.3",
|
||||
"lint-staged": "^10.5.4",
|
||||
"stylelint": "^13.12.0",
|
||||
"stylelint-config-standard": "^21.0.0",
|
||||
"vue-jest": "^3.0.4"
|
||||
}
|
||||
}
|
6
pages/README.md
Normal file
6
pages/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# PAGES
|
||||
|
||||
This directory contains your Application Views and Routes.
|
||||
The framework reads all the `*.vue` files inside this directory and creates the router of your application.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
|
53
pages/index.vue
Normal file
53
pages/index.vue
Normal file
@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<section class="section">
|
||||
<div class="columns is-mobile">
|
||||
<card
|
||||
title="Free"
|
||||
icon="github"
|
||||
>
|
||||
Open source on <a href="https://github.com/buefy/buefy">
|
||||
GitHub
|
||||
</a>
|
||||
</card>
|
||||
|
||||
<card
|
||||
title="Responsive"
|
||||
icon="cellphone-link"
|
||||
>
|
||||
<b class="has-text-grey">
|
||||
Every
|
||||
</b> component is responsive
|
||||
</card>
|
||||
|
||||
<card
|
||||
title="Modern"
|
||||
icon="alert-decagram"
|
||||
>
|
||||
Built with <a href="https://vuejs.org/">
|
||||
Vue.js
|
||||
</a> and <a href="http://bulma.io/">
|
||||
Bulma
|
||||
</a>
|
||||
</card>
|
||||
|
||||
<card
|
||||
title="Lightweight"
|
||||
icon="arrange-bring-to-front"
|
||||
>
|
||||
No other internal dependency
|
||||
</card>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '~/components/Card'
|
||||
|
||||
export default {
|
||||
name: 'HomePage',
|
||||
|
||||
components: {
|
||||
Card
|
||||
}
|
||||
}
|
||||
</script>
|
15
pages/inspire.vue
Normal file
15
pages/inspire.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<section class="section">
|
||||
<h2 class="title is-3 has-text-grey">
|
||||
"Just start <b-icon
|
||||
icon="rocket"
|
||||
size="is-large"
|
||||
/>"
|
||||
</h2>
|
||||
<h3 class="subtitle is-6 has-text-grey">
|
||||
Author: <a href="https://github.com/anteriovieira">
|
||||
Antério Vieira
|
||||
</a>
|
||||
</h3>
|
||||
</section>
|
||||
</template>
|
7
plugins/README.md
Normal file
7
plugins/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# PLUGINS
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
|
11
static/README.md
Normal file
11
static/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# STATIC
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
This directory contains your static files.
|
||||
Each file inside this directory is mapped to `/`.
|
||||
Thus you'd want to delete this README.md before deploying to production.
|
||||
|
||||
Example: `/static/robots.txt` is mapped as `/robots.txt`.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
|
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
static/icon.png
Normal file
BIN
static/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
10
store/README.md
Normal file
10
store/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# STORE
|
||||
|
||||
**This directory is not required, you can delete it if you don't want to use it.**
|
||||
|
||||
This directory contains your Vuex Store files.
|
||||
Vuex Store option is implemented in the Nuxt.js framework.
|
||||
|
||||
Creating a file in this directory automatically activates the option in the framework.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
|
8
stylelint.config.js
Normal file
8
stylelint.config.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'stylelint-config-standard'
|
||||
],
|
||||
// add your custom config here
|
||||
// https://stylelint.io/user-guide/configuration
|
||||
rules: {}
|
||||
}
|
9
test/Logo.spec.js
Normal file
9
test/Logo.spec.js
Normal file
@ -0,0 +1,9 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Logo from '@/components/Logo.vue'
|
||||
|
||||
describe('Logo', () => {
|
||||
test('is a Vue instance', () => {
|
||||
const wrapper = mount(Logo)
|
||||
expect(wrapper.vm).toBeTruthy()
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user