From cf8b857f8773765c2a4f11ddc8c368a4b1bb9384 Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Thu, 16 Jul 2020 21:41:40 +0430 Subject: [PATCH] refactor template (#176) * refactor template * chore: add generate command --- template/.editorconfig | 13 ++++ template/.eslintrc.js | 14 ++-- template/.gitignore | 90 ++++++++++++++++++++++-- template/README.md | 18 ++--- template/api/index.js | 15 ++-- template/api/routes/test.js | 10 +++ template/assets/README.md | 7 ++ template/assets/css/main.css | 28 -------- template/assets/img/logo.png | Bin 14308 -> 0 bytes template/components/Footer.vue | 5 -- template/components/Logo.vue | 31 +++++++++ template/components/README.md | 7 ++ template/layouts/README.md | 7 ++ template/layouts/default.vue | 79 ++++++++++++--------- template/layouts/error.vue | 51 ++++++++++---- template/middleware/README.md | 8 +++ template/nuxt.config.js | 84 +++++++++++++++------- template/package.json | 30 ++++---- template/pages/README.md | 6 ++ template/pages/index.vue | 108 ++++++++++++++++++++--------- template/pages/{ => users}/_id.vue | 39 ++++++----- template/pages/users/index.vue | 66 ++++++++++++++++++ template/plugins/README.md | 7 ++ template/plugins/axios.js | 9 --- template/static/README.md | 11 +++ template/static/favicon.ico | Bin 1150 -> 1393 bytes template/store/README.md | 10 +++ 27 files changed, 548 insertions(+), 205 deletions(-) create mode 100644 template/.editorconfig create mode 100644 template/api/routes/test.js create mode 100644 template/assets/README.md delete mode 100644 template/assets/css/main.css delete mode 100644 template/assets/img/logo.png delete mode 100644 template/components/Footer.vue create mode 100644 template/components/Logo.vue create mode 100644 template/components/README.md create mode 100644 template/layouts/README.md create mode 100644 template/middleware/README.md create mode 100644 template/pages/README.md rename template/pages/{ => users}/_id.vue (50%) create mode 100644 template/pages/users/index.vue create mode 100644 template/plugins/README.md delete mode 100644 template/plugins/axios.js create mode 100644 template/static/README.md create mode 100644 template/store/README.md diff --git a/template/.editorconfig b/template/.editorconfig new file mode 100644 index 0000000..5d12634 --- /dev/null +++ b/template/.editorconfig @@ -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 diff --git a/template/.eslintrc.js b/template/.eslintrc.js index b44e099..8cc5d3a 100644 --- a/template/.eslintrc.js +++ b/template/.eslintrc.js @@ -1,16 +1,18 @@ module.exports = { root: true, - parser: 'babel-eslint', env: { browser: true, node: true }, - extends: 'standard', - // required to lint *.vue files + parserOptions: { + parser: 'babel-eslint' + }, + extends: [ + '@nuxtjs', + 'plugin:nuxt/recommended' + ], plugins: [ - 'html' ], // add your custom rules here - rules: {}, - globals: {} + rules: {} } diff --git a/template/.gitignore b/template/.gitignore index 7b356cd..e8f682b 100644 --- a/template/.gitignore +++ b/template/.gitignore @@ -1,14 +1,90 @@ -# dependencies -node_modules +# Created by .ignore support plugin (hsz.mobi) +### Node template +# Logs +/logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* -# logs -npm-debug.log +# Runtime data +pids +*.pid +*.seed +*.pid.lock -# Nuxt build +# 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 -# Backpack build -build +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# IDE / Editor +.idea + +# Service worker +sw.* + +# macOS +.DS_Store + +# Vim swap files +*.swp diff --git a/template/README.md b/template/README.md index e427779..87aa59d 100644 --- a/template/README.md +++ b/template/README.md @@ -1,18 +1,20 @@ -# {{ name }} - -> {{ description }} +# nuxt-express ## Build Setup -``` bash +```bash # install dependencies -$ npm install # Or yarn install +$ yarn install # serve with hot reload at localhost:3000 -$ npm run dev +$ yarn dev # build for production and launch server -$ npm start +$ yarn build +$ yarn start + +# generate static project +$ yarn generate ``` -For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js). \ No newline at end of file +For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). diff --git a/template/api/index.js b/template/api/index.js index a18db51..1138030 100644 --- a/template/api/index.js +++ b/template/api/index.js @@ -5,12 +5,19 @@ const app = express() // Require API routes const users = require('./routes/users') +const test = require('./routes/test') // Import API Routes app.use(users) +app.use(test) -// Export the server middleware -module.exports = { - path: '/api', - handler: app +// Export express app +module.exports = app + +// Start standalone server if directly running +if (require.main === module) { + const port = process.env.PORT || 3001 + app.listen(port, () => { + console.log(`API server listening on port ${port}`) + }) } diff --git a/template/api/routes/test.js b/template/api/routes/test.js new file mode 100644 index 0000000..43bd813 --- /dev/null +++ b/template/api/routes/test.js @@ -0,0 +1,10 @@ +const { Router } = require('express') + +const router = Router() + +// Test route +router.use('/test', (req, res) => { + res.end('Test API!') +}) + +module.exports = router diff --git a/template/assets/README.md b/template/assets/README.md new file mode 100644 index 0000000..34766f9 --- /dev/null +++ b/template/assets/README.md @@ -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). diff --git a/template/assets/css/main.css b/template/assets/css/main.css deleted file mode 100644 index e3f28fe..0000000 --- a/template/assets/css/main.css +++ /dev/null @@ -1,28 +0,0 @@ -html, body -{ - background-color: #fff; - color: #000; - letter-spacing: 0.5px; - font-family: "Source Sans Pro", Arial, sans-serif; - height: 100vh; - margin: 0; -} - -footer -{ - padding: 20px; - text-align: center; - border-top: 1px solid #ddd; -} - -a, a:hover, a:focus, a:visited -{ - color: #000; -} - -.logo { - width: 100%; - height: auto; - max-width: 400px; - max-height: 289px; -} diff --git a/template/assets/img/logo.png b/template/assets/img/logo.png deleted file mode 100644 index f8a35ef1aaa0a3ccaac7e04dbafa8fa4e56d8290..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14308 zcmeHuWmJ@1^e-{QNP~n(ceiwRcXvujr-FolQqn0Qjes;rmvo49cM3?i)IIb5?}xkY z*ZcLZH7r^9%slh#v(Ns;-X}s`RSx4B@iRC$I1B}OX-zmd_&D%GiHZ#VqQQ7Y0{(&6 zN~lP{!Bxki-CH2R!SQ7%NK0t@!XIWq?+GR!`_&3WG~$gGWSF3gv<4m?`NpgZQ{~SU zlI-xtWvSfpawRoWSWFE3PKR_$q@&blUd~4@eptHS4HWe_&J^0c{dIipm;Ls2w(aQ1 zZma1l+aKJ!t-tTHk24SN7%c`Vh~$GHuos0C0*bY-2s=GIE(PqB0f&KV2Kk@g%^-H- z{uY}mG~x*0#Y5qb@;`6#$H{>|4g1U&4+o8dgN_BAkpA~p+!L7~U3qxwY<-r(lH4At)%S^yg&O+Wsaum?_6o6MLu= zR|*XV3)}(zbC5kyR73@##rqH!gO~?8NY%O7abFz*UjgoM;{)rr7NQVxx4w?Uzf>*;6jIN)xhjhg{+%?dsaMhe=f~Yp1hJLH zQ_DH{tavXvA+X}ouMuCjdt@5nQUsqstB`O-twg)%;fbO&@?}d}GF~~-%~Y5$dmpbj z{T`4cOu@^3e`Qc!xIwa;0%9W!vU;Ztc{O+Kjqcw=xnE=L|=SnpsDwRqJ$N!0~a-VLJ^ zxIgKxKWLOfpuxrjVg9*3q+LtldO5AfyculW7yUx3(|7I0zBr5S-Q|ARH_|anx7c+4 z{w7*@T+~k>)a$M`rJ_(4{VMT`qh+IIliJrREteV<#sXd=q`|f;A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W_EwQUj8Ezx0*SPgpTqwty#6yTl`MdH)&LwG z!ZSprSsWNk z(%w6Tw`;z4I$miz#9}K}|N8zay%88GSE3}GZ=33v@ zGJvj@U>_>fS_)PQK*I+Y5GhS^Q+y`vs^UwSQl8I=TxzSf5B43LT5;{h$O9wx@gdHN z9|LZ;2{|367+6~XPtHFb3wNbALI6DJj{=84&hYHRI&Ht~-;|a?o3jx=V`ML&X8ctY zvwWR6PA(?ZupTLu;~_M#fIGw5Gn--iF7l(sbz8oc-}i+GSmR7uyzLM0%o)db847ho zKGR_lsKK3Ij4!w%wEq3M$c6|Fm4GW7+eV2>@!Xd*KP-S3I+@^jcVU;TWiP;U+_oRu z6|YYe2gRd94WHuA1xy`4A0|eikte0O$Y(sw_e26<%0D;<)!1uV2X+=gcd%FDk>Egb zX@$M&#C!c`SZQ>TTr{~faK}z6b7rj}H0kaHSz6pq-i(~(lnPoR1;`O*tUCS=O5eI0UtTJZb z4{;FBd&dUgsv;!fNn%28vegk-8~7kN|{niujSXkI3vMoz+HJW+OjUQUPawgNeCDy#zf6w z#^-(_S?7xW41O~^E&52nY8WoyvGc7rj7a%Y?wjT2`VtvjS#OKCgHyyth$FD`50=nQ z3Scw0^u4R+twCefDdMemAxBe1pfTqO21Yt+-MtD%U%faOXj4J@?Vkuczl7Q;Mo=`^ zZI)u+)yRp>;+*KLq`XP8cW=py+Klu9&t)Vz8rF;SBJ^ zapAh?wKA}iRT}hQbnTMZ^6|g(TX|p-i^`C5gaCH9N;(VlC8r$2Z>hlvtKe|l9QX*k kUJj%Gf3yF$Fx~`W|294eM<4nIj_tuI$f!zJNSc56U-hK`!T -
- Visit our website for more documentation : nuxtjs.org -
- diff --git a/template/components/Logo.vue b/template/components/Logo.vue new file mode 100644 index 0000000..50c62a2 --- /dev/null +++ b/template/components/Logo.vue @@ -0,0 +1,31 @@ +{{{{raw}}}} + +{{{{/raw}}}} + + diff --git a/template/components/README.md b/template/components/README.md new file mode 100644 index 0000000..a079f10 --- /dev/null +++ b/template/components/README.md @@ -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._ diff --git a/template/layouts/README.md b/template/layouts/README.md new file mode 100644 index 0000000..cad1ad5 --- /dev/null +++ b/template/layouts/README.md @@ -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). diff --git a/template/layouts/default.vue b/template/layouts/default.vue index c9d50bd..cc002a7 100644 --- a/template/layouts/default.vue +++ b/template/layouts/default.vue @@ -1,52 +1,65 @@ +{{{{raw}}}} +{{{{/raw}}}} - - diff --git a/template/layouts/error.vue b/template/layouts/error.vue index 647d6e4..8278ad7 100644 --- a/template/layouts/error.vue +++ b/template/layouts/error.vue @@ -1,16 +1,18 @@ {{{{raw}}}} {{{{/raw}}}} @@ -21,10 +23,31 @@ export default { diff --git a/template/pages/_id.vue b/template/pages/users/_id.vue similarity index 50% rename from template/pages/_id.vue rename to template/pages/users/_id.vue index fe78288..a5245d5 100644 --- a/template/pages/_id.vue +++ b/template/pages/users/_id.vue @@ -1,29 +1,28 @@ {{{{raw}}}} {{{{/raw}}}} diff --git a/template/plugins/README.md b/template/plugins/README.md new file mode 100644 index 0000000..ca1f9d8 --- /dev/null +++ b/template/plugins/README.md @@ -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). diff --git a/template/plugins/axios.js b/template/plugins/axios.js deleted file mode 100644 index c804d21..0000000 --- a/template/plugins/axios.js +++ /dev/null @@ -1,9 +0,0 @@ -import * as axios from 'axios' - -let options = {} -// The server-side needs a full url to works -if (process.server) { - options.baseURL = `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 3000}` -} - -export default axios.create(options) diff --git a/template/static/README.md b/template/static/README.md new file mode 100644 index 0000000..cf00435 --- /dev/null +++ b/template/static/README.md @@ -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). diff --git a/template/static/favicon.ico b/template/static/favicon.ico index 382fecbbf96d6e1e614e0e2cc8b73e355bd946cc..3632d0c89129045dc4103e84e59e426c57b8f51a 100644 GIT binary patch literal 1393 zcmV-%1&;cOP)Px)D@jB_R9Fe^ReNldMG&9eyIx;VxmMIdgjhwCKeVN$X=xNR5F_{iAD9pW6t#*F zgsb$5TDXc(+R_KbHns{HwTUSSMxqkbMAXm+Qmqd}qLq*w23kw2)Y7}&?)uyB`r&ui zgSLtP7@6d5XJ%(+e>;!;h%VEAG6Suz+(=E0vHu2kKIR~YDr+g=KThO5N?%t`9J7Cz z!`J{cS7sBbmBg4LMc2`Q*c=vb%;M+)D8)#rilGypCSqLx@dPzj-aO`0Ee@jx&{DMo z2WG&xg=Vd*Cq_lch7F)fE%7L^BtJ8$xL~eTcPV~!0CdAiRcr*Z+1D9sR%#uxa2%lS zMHc30U1D*;LsF_{LE;nVHg~>ZH^SfO0I1*c5a(Lr^e$ztX)$85I|Ia7@DN4Y6RSN5 zisVjYMleQy5y_2LmgG+w;e3P~i4NCXgH*d=HbBx*5MrLSb{`J>9A!vneqSRxGno<9 zE23>mQG7tr%OUm=gpmORdJXM@drwr%R(lc%Hl26;kf|LIe!i@Uup z*Llp$^8n6C$?f4TR{7EZgs8wRV8aUOrpM1&9Zf!U!LkK0XZn-1d__lJO8SGj2H%rk z@(%pkpq}e2T|eKn4__}1pt<5c)b=i<{s+pMyer&M%jvnfQA(ANZUt|F4GdoFEX4rC-M{KbO^D{(o%D)QCbo>s)CXAnlwG$1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