From 4c8a4df96465ef83f2d5ba27eb3f5d0cbc229ffe Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Wed, 3 Feb 2021 18:29:32 +0330 Subject: [PATCH] chore: github template (#187) * chore: remove vue-cli structure * update README * fix lint --- template/.editorconfig => .editorconfig | 0 template/.eslintrc.js => .eslintrc.js | 0 template/.gitignore => .gitignore | 0 README.md | 29 +++++++++++++++--- {template/api => api}/index.js | 1 + {template/api => api}/routes/test.js | 0 {template/api => api}/routes/users.js | 0 {template/assets => assets}/README.md | 0 {template/components => components}/Logo.vue | 2 -- {template/components => components}/README.md | 0 {template/layouts => layouts}/README.md | 0 {template/layouts => layouts}/default.vue | 2 -- {template/layouts => layouts}/error.vue | 12 +++++--- meta.js | 25 --------------- {template/middleware => middleware}/README.md | 0 template/nuxt.config.js => nuxt.config.js | 2 +- template/package.json => package.json | 4 +-- {template/pages => pages}/README.md | 0 {template/pages => pages}/index.vue | 3 +- {template/pages => pages}/users/_id.vue | 2 -- {template/pages => pages}/users/index.vue | 2 -- {template/plugins => plugins}/README.md | 0 {template/static => static}/README.md | 0 {template/static => static}/favicon.ico | Bin {template/store => store}/README.md | 0 template/README.md | 20 ------------ 26 files changed, 36 insertions(+), 68 deletions(-) rename template/.editorconfig => .editorconfig (100%) rename template/.eslintrc.js => .eslintrc.js (100%) rename template/.gitignore => .gitignore (100%) rename {template/api => api}/index.js (91%) rename {template/api => api}/routes/test.js (100%) rename {template/api => api}/routes/users.js (100%) rename {template/assets => assets}/README.md (100%) rename {template/components => components}/Logo.vue (97%) rename {template/components => components}/README.md (100%) rename {template/layouts => layouts}/README.md (100%) rename {template/layouts => layouts}/default.vue (97%) rename {template/layouts => layouts}/error.vue (84%) delete mode 100644 meta.js rename {template/middleware => middleware}/README.md (100%) rename template/nuxt.config.js => nuxt.config.js (98%) rename template/package.json => package.json (86%) rename {template/pages => pages}/README.md (100%) rename {template/pages => pages}/index.vue (98%) rename {template/pages => pages}/users/_id.vue (97%) rename {template/pages => pages}/users/index.vue (97%) rename {template/plugins => plugins}/README.md (100%) rename {template/static => static}/README.md (100%) rename {template/static => static}/favicon.ico (100%) rename {template/store => store}/README.md (100%) delete mode 100644 template/README.md diff --git a/template/.editorconfig b/.editorconfig similarity index 100% rename from template/.editorconfig rename to .editorconfig diff --git a/template/.eslintrc.js b/.eslintrc.js similarity index 100% rename from template/.eslintrc.js rename to .eslintrc.js diff --git a/template/.gitignore b/.gitignore similarity index 100% rename from template/.gitignore rename to .gitignore diff --git a/README.md b/README.md index 5b821a3..6ee0992 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,36 @@ > [ExpressJS](http://expressjs.com/) + [Nuxt.js](https://nuxtjs.org) = :zap: -Live Demo: [https://codesandbox.io/s/github/nuxt-community/express-template/tree/demo](https://codesandbox.io/s/github/nuxt-community/express-template/tree/demo) +Live Demo: [https://codesandbox.io/s/github/nuxt-community/express-template](https://codesandbox.io/s/github/nuxt-community/express-template) ## Installation -This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). +This is a template project, clone or fork the repo and start your project ```bash -vue init nuxt-community/express-template +git clone https://github.com/nuxt-community/express-template.git cd # move to your project -npm install # or yarn install +yarn install # or npm install ``` -> Make sure to use a version of vue-cli >= 2.1 (vue -V). +## Build Setup + +```bash +# install dependencies +$ yarn install + +# serve with hot reload at localhost:3000 +$ yarn dev + +# build for production and launch server +$ yarn build +$ yarn start + +# generate static project +$ yarn generate +``` + +For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). ## ExpressJS Changes @@ -47,3 +64,5 @@ npm install # or yarn install - [ExpressJS license](https://github.com/expressjs/express/blob/master/LICENSE) - [NuxtJS license](https://github.com/nuxt/nuxt.js/blob/master/LICENSE.md) - [VueJS license](https://github.com/vuejs/vue/blob/master/LICENSE) + + diff --git a/template/api/index.js b/api/index.js similarity index 91% rename from template/api/index.js rename to api/index.js index 1138030..2796d4d 100644 --- a/template/api/index.js +++ b/api/index.js @@ -18,6 +18,7 @@ module.exports = app if (require.main === module) { const port = process.env.PORT || 3001 app.listen(port, () => { + // eslint-disable-next-line no-console console.log(`API server listening on port ${port}`) }) } diff --git a/template/api/routes/test.js b/api/routes/test.js similarity index 100% rename from template/api/routes/test.js rename to api/routes/test.js diff --git a/template/api/routes/users.js b/api/routes/users.js similarity index 100% rename from template/api/routes/users.js rename to api/routes/users.js diff --git a/template/assets/README.md b/assets/README.md similarity index 100% rename from template/assets/README.md rename to assets/README.md diff --git a/template/components/Logo.vue b/components/Logo.vue similarity index 97% rename from template/components/Logo.vue rename to components/Logo.vue index 50c62a2..b1de012 100644 --- a/template/components/Logo.vue +++ b/components/Logo.vue @@ -1,4 +1,3 @@ -{{{{raw}}}} -{{{{/raw}}}}