Skip to content

Commit fcf41f1

Browse files
committed
tw-v2 Setup and Install
0 parents  commit fcf41f1

22 files changed

+11588
-0
lines changed

.gitignore

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
/logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# parcel-bundler cache (https://parceljs.org/)
63+
.cache
64+
65+
# next.js build output
66+
.next
67+
68+
# nuxt.js build output
69+
.nuxt
70+
71+
# Nuxt generate
72+
dist
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless
79+
80+
# IDE / Editor
81+
.idea
82+
83+
# Service worker
84+
sw.*
85+
86+
# macOS
87+
.DS_Store
88+
.AppleDouble
89+
.LSOverride
90+
91+
# Icon must end with two \r
92+
Icon
93+
94+
95+
# Thumbnails
96+
._*
97+
98+
# Files that might appear in the root of a volume
99+
.DocumentRevisions-V100
100+
.fseventsd
101+
.Spotlight-V100
102+
.TemporaryItems
103+
.Trashes
104+
.VolumeIcon.icns
105+
.com.apple.timemachine.donotpresent
106+
107+
# Directories potentially created on remote AFP share
108+
.AppleDB
109+
.AppleDesktop
110+
Network Trash Folder
111+
Temporary Items
112+
.apdisk
113+
114+
# Vim swap files
115+
*.swp
116+
117+
.editorconfig

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# tw2-nuxt
2+
3+
## Build Setup
4+
5+
```bash
6+
# install dependencies
7+
$ npm install
8+
9+
# serve with hot reload at localhost:3000
10+
$ npm run dev
11+
12+
# build for production and launch server
13+
$ npm run build
14+
$ npm run start
15+
16+
# generate static project
17+
$ npm run generate
18+
```
19+
20+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

assets/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ASSETS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

assets/css/tailwind.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

components/AppBar.vue

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template>
2+
<div>
3+
<nav>
4+
<div class="logo">
5+
<NuxtLink to="/">codewithchu</NuxtLink>
6+
</div>
7+
<div>
8+
<NuxtLink to="/about" class="btn">About</NuxtLink>
9+
<NuxtLink to="/login" class="btn">Login</NuxtLink>
10+
</div>
11+
</nav>
12+
</div>
13+
</template>
14+
15+
<script>
16+
export default {};
17+
</script>
18+
19+
<style lang="scss" scoped>
20+
nav {
21+
@apply flex justify-between items-center py-2 px-10 fixed w-full bg-white shadow-lg;
22+
23+
.logo {
24+
@apply p-4 font-bold;
25+
}
26+
.btn {
27+
@apply px-4 py-2 text-gray-500 rounded-lg hover:bg-emerald-100 hover:text-emerald-700;
28+
29+
&.nuxt-link-exact-active {
30+
@apply bg-emerald-100 text-emerald-700;
31+
}
32+
}
33+
}
34+
</style>

components/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# COMPONENTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
The components directory contains your Vue.js Components.
6+
7+
_Nuxt.js doesn't supercharge these components._

jsconfig.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"~/*": ["./*"],
6+
"@/*": ["./*"],
7+
"~~/*": ["./*"],
8+
"@@/*": ["./*"]
9+
}
10+
},
11+
"exclude": ["node_modules", ".nuxt", "dist"]
12+
}

layouts/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LAYOUTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your Application Layouts.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).

layouts/default.vue

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template>
2+
<div>
3+
<AppBar />
4+
<Nuxt />
5+
</div>
6+
</template>
7+
8+
<style>
9+
html {
10+
@apply bg-gray-100;
11+
}
12+
</style>

middleware/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MIDDLEWARE
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your application middleware.
6+
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7+
8+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).

nuxt.config.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
export default {
2+
// Target (https://go.nuxtjs.dev/config-target)
3+
target: "static",
4+
5+
// Global page headers (https://go.nuxtjs.dev/config-head)
6+
head: {
7+
title: "tw2-nuxt",
8+
meta: [
9+
{ charset: "utf-8" },
10+
{ name: "viewport", content: "width=device-width, initial-scale=1" },
11+
{ hid: "description", name: "description", content: "" }
12+
],
13+
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
14+
},
15+
16+
// Global CSS (https://go.nuxtjs.dev/config-css)
17+
css: [],
18+
19+
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
20+
plugins: [],
21+
22+
// Auto import components (https://go.nuxtjs.dev/config-components)
23+
components: true,
24+
25+
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
26+
buildModules: [
27+
// https://go.nuxtjs.dev/tailwindcss
28+
"@nuxtjs/tailwindcss"
29+
],
30+
31+
// Modules (https://go.nuxtjs.dev/config-modules)
32+
modules: [],
33+
34+
// Build Configuration (https://go.nuxtjs.dev/config-build)
35+
build: {}
36+
};

0 commit comments

Comments
 (0)