├── static
├── favicon.ico
└── README.md
├── components
├── README.md
└── Logo.vue
├── services
└── api.service.js
├── .editorconfig
├── layouts
├── README.md
└── default.vue
├── pages
├── README.md
└── index.vue
├── assets
└── README.md
├── plugins
└── README.md
├── middleware
└── README.md
├── store
└── README.md
├── package.json
├── README.md
├── nuxt.config.js
└── .gitignore
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kefranabg/nuxt-codelab/step_0/static/favicon.ico
--------------------------------------------------------------------------------
/components/README.md:
--------------------------------------------------------------------------------
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._
8 |
--------------------------------------------------------------------------------
/services/api.service.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const getSeries = async (query) => {
4 | const { data } = await axios.get(`http://api.tvmaze.com/search/shows?q=${query}`)
5 | const series = data.map(item => item.show)
6 | return series
7 | }
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
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
14 |
--------------------------------------------------------------------------------
/layouts/README.md:
--------------------------------------------------------------------------------
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).
8 |
--------------------------------------------------------------------------------
/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/assets/README.md:
--------------------------------------------------------------------------------
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).
8 |
--------------------------------------------------------------------------------
/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/middleware/README.md:
--------------------------------------------------------------------------------
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).
9 |
--------------------------------------------------------------------------------
/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
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 Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
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 static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nuxt-codelab",
3 | "version": "1.0.0",
4 | "description": "My polished Nuxt.js project",
5 | "author": "Franck",
6 | "private": true,
7 | "scripts": {
8 | "dev": "nuxt",
9 | "build": "nuxt build",
10 | "start": "nuxt start",
11 | "generate": "nuxt generate"
12 | },
13 | "dependencies": {
14 | "cross-env": "^5.2.0",
15 | "nuxt": "^2.4.0",
16 | "@nuxtjs/axios": "^5.3.6"
17 | },
18 | "devDependencies": {
19 | "nodemon": "^1.18.9"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # nuxt-codelab
2 |
3 | Bienvenue dans ce codelab Nuxt.js !!!
4 |
5 | ## Etape 0
6 |
7 | - Cloner le projet : `git clone https://github.com/kefranabg/nuxt-codelab.git && cd nuxt-codelab`
8 | - Installer les dépendances avec `npm i`
9 | - Tester les différentes commandes ci-dessous
10 |
11 | ``` bash
12 | # Installer les dépendances
13 | $ npm install
14 |
15 | # Lancer l'application en mode développement
16 | $ npm run dev
17 |
18 | # Lancer le serveur Nuxt pour la production
19 | $ npm run build
20 | $ npm start
21 |
22 | # Générer l'application en mode statique
23 | $ npm run generate
24 | ```
25 |
26 | Documentation Nuxt.js => [Nuxt.js docs](https://nuxtjs.org).
27 |
--------------------------------------------------------------------------------
/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
56 |
--------------------------------------------------------------------------------
/nuxt.config.js:
--------------------------------------------------------------------------------
1 | import pkg from './package'
2 |
3 | export default {
4 | mode: 'universal',
5 |
6 | /*
7 | ** Headers of the page
8 | */
9 | head: {
10 | title: pkg.name,
11 | meta: [
12 | { charset: 'utf-8' },
13 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
14 | { hid: 'description', name: 'description', content: pkg.description }
15 | ],
16 | link: [
17 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
18 | ]
19 | },
20 |
21 | /*
22 | ** Customize the progress-bar color
23 | */
24 | loading: { color: '#fff' },
25 |
26 | /*
27 | ** Global CSS
28 | */
29 | css: [
30 | ],
31 |
32 | /*
33 | ** Plugins to load before mounting the App
34 | */
35 | plugins: [
36 | ],
37 |
38 | /*
39 | ** Nuxt.js modules
40 | */
41 | modules: [
42 | // Doc: https://axios.nuxtjs.org/usage
43 | '@nuxtjs/axios',
44 | ],
45 | /*
46 | ** Axios module configuration
47 | */
48 | axios: {
49 | // See https://github.com/nuxt-community/axios-module#options
50 | },
51 |
52 | /*
53 | ** Build configuration
54 | */
55 | build: {
56 | /*
57 | ** You can extend webpack config here
58 | */
59 | extend(config, ctx) {
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | nuxt-codelab
7 |
8 |
9 | My polished Nuxt.js project
10 |
11 |
23 |
24 |
25 |
26 |
27 |
36 |
37 |
69 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
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
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
--------------------------------------------------------------------------------
/components/Logo.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
80 |
--------------------------------------------------------------------------------