Skip to content

Commit 1ec5a8a

Browse files
author
Pooya Parsa
committed
nuxt hacker news
1 parent b9bfdd8 commit 1ec5a8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1338
-1833
lines changed

Diff for: .babelrc

-8
This file was deleted.

Diff for: .editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

Diff for: .gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ dist/
44
npm-debug.log
55
yarn-error.log
66
.idea
7-
*.iml
7+
*.iml
8+
.nuxt
9+
10+
static/manifest.*.json
11+
static/sw.js
12+
static/workbox-sw.*.js

Diff for: README.md

+4-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# vue-hackernews-2.0
2-
3-
HackerNews clone built with Vue 2.0 + vue-router + vuex, with server-side rendering.
1+
# Nuxt Hacker News!
2+
Port of [vue-hackernews-2.0](https://github.com/vuejs/vue-hackernews-2.0) for [nuxt.js](https://github.com/nuxt/nuxt.js).
43

54
<p align="center">
65
<a href="https://vue-hn.now.sh" target="_blank">
@@ -12,25 +11,7 @@ HackerNews clone built with Vue 2.0 + vue-router + vuex, with server-side render
1211

1312
## Features
1413

15-
> Note: in practice, it is unnecessary to code-split for an app of this size (where each async chunk is only a few kilobytes), nor is it optimal to extract an extra CSS file (which is only 1kb) -- they are used simply because this is a demo app showcasing all the supported features. In real apps, you should always measure and optimize based on your actual app constraints.
16-
17-
- Server Side Rendering
18-
- Vue + vue-router + vuex working together
19-
- Server-side data pre-fetching
20-
- Client-side state & DOM hydration
21-
- Automatically inlines CSS used by rendered components only
22-
- Preload / prefetch resource hints
23-
- Route-level code splitting
24-
- Progressive Web App
25-
- App manifest
26-
- Service worker
27-
- 100/100 Lighthouse score
28-
- Single-file Vue Components
29-
- Hot-reload in development
30-
- CSS extraction for production
31-
- Animation
32-
- Effects when switching route views
33-
- Real-time list updates with FLIP Animation
14+
[TODO]
3415

3516
## Architecture Overview
3617

@@ -46,7 +27,7 @@ HackerNews clone built with Vue 2.0 + vue-router + vuex, with server-side render
4627
# install dependencies
4728
npm install # or yarn
4829

49-
# serve in dev mode, with hot reload at localhost:8080
30+
# serve in dev mode, with hot reload at localhost:300
5031
npm run dev
5132

5233
# build for production
File renamed without changes.
File renamed without changes.

Diff for: src/api/index.js renamed to api/index.js

File renamed without changes.

Diff for: app.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html {{ HTML_ATTRS }}>
3+
<head>
4+
{{ HEAD }}
5+
<style>
6+
#skip a { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
7+
#skip a:focus { position:static; width:auto; height:auto; }
8+
</style>
9+
</head>
10+
<body {{ BODY_ATTRS }}>
11+
<div id="skip"><a href="#app">skip to content</a></div>
12+
{{ APP }}
13+
</body>
14+
</html>

Diff for: assets/logo.png

9.26 KB
Loading

Diff for: build/setup-dev-server.js

-76
This file was deleted.

Diff for: build/vue-loader.config.js

-9
This file was deleted.

Diff for: build/webpack.base.config.js

-71
This file was deleted.

Diff for: build/webpack.client.config.js

-75
This file was deleted.

Diff for: build/webpack.server.config.js

-33
This file was deleted.
File renamed without changes.

Diff for: src/components/Item.vue renamed to components/Item.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</template>
2828

2929
<script>
30-
import { timeAgo } from '../util/filters'
30+
import { timeAgo } from '../plugins/filters'
3131
3232
export default {
3333
name: 'news-item',
File renamed without changes.

0 commit comments

Comments
 (0)