Skip to content

Commit

Permalink
Initial setup
Browse files Browse the repository at this point in the history
shentao committed Dec 10, 2017
0 parents commit eb1ad54
Showing 19 changed files with 9,624 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
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
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
parser: 'babel-eslint',
env: {
browser: true,
node: true
},
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
rules: {},
globals: {}
}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# dependencies
node_modules

# logs
npm-debug.log

# Nuxt build
.nuxt

# Nuxt generate
dist
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# news.vuejs.org

> Official Vue.js News
## Build Setup

``` bash
# install dependencies
$ npm install # Or yarn install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm start

# generate static project
$ npm run generate
```

For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).
8 changes: 8 additions & 0 deletions assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ASSETS

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

**This directory is not required, you can delete it if you don't want to use it.**
6 changes: 6 additions & 0 deletions components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# COMPONENTS

The components directory contains your Vue.js Components.
Nuxt.js doesn't supercharge these components.

**This directory is not required, you can delete it if you don't want to use it.**
8 changes: 8 additions & 0 deletions layouts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# LAYOUTS

This directory contains your Application Layouts.

More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/views#layouts

**This directory is not required, you can delete it if you don't want to use it.**
52 changes: 52 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<template>
<div>
<nuxt/>
</div>
</template>

<style>
html {
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
}
.button--green {
display: inline-block;
border-radius: 4px;
border: 1px solid #3b8070;
color: #3b8070;
text-decoration: none;
padding: 10px 30px;
}
.button--green:hover {
color: #fff;
background-color: #3b8070;
}
.button--grey {
display: inline-block;
border-radius: 4px;
border: 1px solid #35495e;
color: #35495e;
text-decoration: none;
padding: 10px 30px;
margin-left: 15px;
}
.button--grey:hover {
color: #fff;
background-color: #35495e;
}
</style>
9 changes: 9 additions & 0 deletions middleware/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# MIDDLEWARE

This directory contains your Application Middleware.
The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts).

More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/routing#middleware

**This directory is not required, you can delete it if you don't want to use it.**
38 changes: 38 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'news.vuejs.org',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Official Vue.js News' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress bar color
*/
loading: { color: '#3B8070' },
/*
** Build configuration
*/
build: {
/*
** Run ESLint on save
*/
extend (config, ctx) {
if (ctx.dev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
}
}
9,312 changes: 9,312 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "news.vuejs.org",
"version": "1.0.0",
"description": "Official Vue.js News",
"author": "Damian Dulisz <damian.dulisz@gmail.com>",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint"
},
"dependencies": {
"contentful": "^5.0.5",
"nuxt": "^1.0.0-rc11",
"pug": "^2.0.0-rc.4",
"pug-loader": "^2.3.0"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"eslint": "^4.3.0",
"eslint-config-standard": "^10.2.1",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.1.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1"
}
}
7 changes: 7 additions & 0 deletions pages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PAGES

This directory contains your Application Views and Routes.
The framework reads all the .vue files inside this directory and create the router of your application.

More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/routing
50 changes: 50 additions & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template lang="pug">
section.container
Logo
h1.title
| news.vuejs.org
.links
a.button--grey(href="https://nuxtjs.org/" target="_blank") Documentation
a.button--grey(href="https://github.com/nuxt/nuxt.js" target="_blank") GitHub
</template>

<script>
import Logo from '~/components/Logo.vue'
export default {
components: {
Logo
}
}
</script>

<style>
.container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.title {
font-family: "Quicksand", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* 1 */
display: block;
font-weight: 300;
font-size: 100px;
color: #35495e;
letter-spacing: 1px;
}
.subtitle {
font-weight: 300;
font-size: 42px;
color: #526488;
word-spacing: 5px;
padding-bottom: 15px;
}
.links {
padding-top: 15px;
}
</style>
11 changes: 11 additions & 0 deletions pages/issues/_issue.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template lang="html">

</template>

<script>
export default {
}
</script>

<style lang="css">
</style>
8 changes: 8 additions & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PLUGINS

This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application.

More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/plugins

**This directory is not required, you can delete it if you don't want to use it.**
11 changes: 11 additions & 0 deletions static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# STATIC

This directory contains your static files.
Each file inside this directory is mapped to /.

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

**This directory is not required, you can delete it if you don't want to use it.**
Binary file added static/favicon.ico
Binary file not shown.
10 changes: 10 additions & 0 deletions store/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# STORE

This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a index.js file in this directory activate the option in the framework automatically.

More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/vuex-store

**This directory is not required, you can delete it if you don't want to use it.**

0 comments on commit eb1ad54

Please sign in to comment.