From a24bbf1308a3360301fdde24e7c2c0b0c856a900 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Wed, 29 Apr 2020 18:59:07 +0100 Subject: [PATCH 1/2] feat(templates): deprecate server templates --- README.md | 9 - packages/cna-template/template/_.eslintrc.js | 5 - packages/cna-template/template/_jsconfig.json | 5 - .../template/frameworks/adonis/.env | 17 - .../template/frameworks/adonis/.env.example | 17 - .../template/frameworks/adonis/README.md | 56 -- .../template/frameworks/adonis/ace | 21 - .../adonis/app/Commands/NuxtBuild.js | 41 - .../app/Controllers/Http/NuxtController.js | 17 - .../adonis/app/Models/Hooks/.gitkeep | 0 .../adonis/app/Models/Hooks/User.js | 20 - .../frameworks/adonis/app/Models/Token.js | 8 - .../frameworks/adonis/app/Models/User.js | 34 - .../template/frameworks/adonis/config/app.js | 210 ----- .../template/frameworks/adonis/config/auth.js | 75 -- .../frameworks/adonis/config/bodyParser.js | 157 ---- .../template/frameworks/adonis/config/cors.js | 87 -- .../frameworks/adonis/config/database.js | 78 -- .../frameworks/adonis/config/session.js | 94 -- .../frameworks/adonis/config/shield.js | 145 --- .../frameworks/adonis/database/factory.js | 22 - .../adonis/database/migrations/.gitkeep | 0 .../template/frameworks/adonis/package.json | 24 - .../adonis/providers/NuxtProvider.js | 24 - .../template/frameworks/adonis/server.js | 25 - .../template/frameworks/adonis/start/app.js | 66 -- .../frameworks/adonis/start/kernel.js | 60 -- .../frameworks/adonis/start/routes.js | 18 - .../template/frameworks/express/package.json | 15 - .../frameworks/express/server/index.js | 33 - .../template/frameworks/fastify/package.json | 15 - .../frameworks/fastify/server/index.js | 36 - .../template/frameworks/feathers/package.json | 17 - .../feathers/server/config/default.json | 4 - .../feathers/server/config/production.json | 4 - .../frameworks/feathers/server/index.js | 40 - .../template/frameworks/hapi/package.json | 16 - .../template/frameworks/hapi/server/index.js | 26 - .../template/frameworks/koa/package.json | 15 - .../template/frameworks/koa/server/index.js | 41 - .../template/frameworks/micro/package.json | 16 - .../template/frameworks/micro/server/index.js | 38 - .../cna-template/template/nuxt/nuxt.config.js | 7 - packages/create-nuxt-app/lib/package.js | 3 +- packages/create-nuxt-app/lib/prompts.js | 19 +- packages/create-nuxt-app/lib/saofile.js | 29 +- packages/create-nuxt-app/test/index.test.js | 2 +- .../test/snapshots/index.test.js.md | 844 ------------------ .../test/snapshots/index.test.js.snap | Bin 8493 -> 6696 bytes 49 files changed, 4 insertions(+), 2551 deletions(-) delete mode 100644 packages/cna-template/template/frameworks/adonis/.env delete mode 100644 packages/cna-template/template/frameworks/adonis/.env.example delete mode 100644 packages/cna-template/template/frameworks/adonis/README.md delete mode 100644 packages/cna-template/template/frameworks/adonis/ace delete mode 100644 packages/cna-template/template/frameworks/adonis/app/Commands/NuxtBuild.js delete mode 100644 packages/cna-template/template/frameworks/adonis/app/Controllers/Http/NuxtController.js delete mode 100644 packages/cna-template/template/frameworks/adonis/app/Models/Hooks/.gitkeep delete mode 100644 packages/cna-template/template/frameworks/adonis/app/Models/Hooks/User.js delete mode 100644 packages/cna-template/template/frameworks/adonis/app/Models/Token.js delete mode 100644 packages/cna-template/template/frameworks/adonis/app/Models/User.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/app.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/auth.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/bodyParser.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/cors.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/database.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/session.js delete mode 100644 packages/cna-template/template/frameworks/adonis/config/shield.js delete mode 100644 packages/cna-template/template/frameworks/adonis/database/factory.js delete mode 100644 packages/cna-template/template/frameworks/adonis/database/migrations/.gitkeep delete mode 100644 packages/cna-template/template/frameworks/adonis/package.json delete mode 100644 packages/cna-template/template/frameworks/adonis/providers/NuxtProvider.js delete mode 100644 packages/cna-template/template/frameworks/adonis/server.js delete mode 100644 packages/cna-template/template/frameworks/adonis/start/app.js delete mode 100644 packages/cna-template/template/frameworks/adonis/start/kernel.js delete mode 100644 packages/cna-template/template/frameworks/adonis/start/routes.js delete mode 100644 packages/cna-template/template/frameworks/express/package.json delete mode 100644 packages/cna-template/template/frameworks/express/server/index.js delete mode 100644 packages/cna-template/template/frameworks/fastify/package.json delete mode 100644 packages/cna-template/template/frameworks/fastify/server/index.js delete mode 100644 packages/cna-template/template/frameworks/feathers/package.json delete mode 100644 packages/cna-template/template/frameworks/feathers/server/config/default.json delete mode 100644 packages/cna-template/template/frameworks/feathers/server/config/production.json delete mode 100644 packages/cna-template/template/frameworks/feathers/server/index.js delete mode 100644 packages/cna-template/template/frameworks/hapi/package.json delete mode 100644 packages/cna-template/template/frameworks/hapi/server/index.js delete mode 100644 packages/cna-template/template/frameworks/koa/package.json delete mode 100644 packages/cna-template/template/frameworks/koa/server/index.js delete mode 100644 packages/cna-template/template/frameworks/micro/package.json delete mode 100644 packages/cna-template/template/frameworks/micro/server/index.js diff --git a/README.md b/README.md index 6e20f6094..e30e0f040 100644 --- a/README.md +++ b/README.md @@ -52,15 +52,6 @@ yarn create nuxt-app - [Tailwind CSS](https://github.com/tailwindcss/tailwindcss) - [Vuesax](https://github.com/lusaxweb/vuesax) - [Vuetify](https://github.com/vuetifyjs/vuetify) -1. Choose between integrated server-side frameworks: - - None (Nuxt default server) - - [Adonis](https://github.com/adonisjs/adonis-framework) - - [Express](https://github.com/expressjs/express) - - [Fastify](https://github.com/fastify/fastify) - - [Feathers](https://github.com/feathersjs/feathers) - - [Hapi](https://github.com/hapijs/hapi) - - [Koa](https://github.com/koajs/koa) - - [Micro](https://github.com/zeit/micro) 1. Choose the runtime for TypeScript (if you choose TypeScript) - Default - [@nuxt/typescript-runtime](https://github.com/nuxt/typescript) diff --git a/packages/cna-template/template/_.eslintrc.js b/packages/cna-template/template/_.eslintrc.js index c6e7b6f3c..3ac30c1ab 100644 --- a/packages/cna-template/template/_.eslintrc.js +++ b/packages/cna-template/template/_.eslintrc.js @@ -4,11 +4,6 @@ module.exports = { browser: true, node: true }, - <%_ if (server === 'adonis') { _%> - globals: { - use: true - }, - <%_ } _%> <%_ if (!typescript) { _%> parserOptions: { parser: 'babel-eslint' diff --git a/packages/cna-template/template/_jsconfig.json b/packages/cna-template/template/_jsconfig.json index 8a957d15c..29037a628 100644 --- a/packages/cna-template/template/_jsconfig.json +++ b/packages/cna-template/template/_jsconfig.json @@ -2,13 +2,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - <%_ if (server === 'adonis') { _%> - "~/*": ["./resources/*"], - "@/*": ["./resources/*"], - <%_ } else { _%> "~/*": ["./*"], "@/*": ["./*"], - <%_ } _%> "~~/*": ["./*"], "@@/*": ["./*"] } diff --git a/packages/cna-template/template/frameworks/adonis/.env b/packages/cna-template/template/frameworks/adonis/.env deleted file mode 100644 index 6d4124b91..000000000 --- a/packages/cna-template/template/frameworks/adonis/.env +++ /dev/null @@ -1,17 +0,0 @@ -HOST=127.0.0.1 -PORT=3000 -NODE_ENV=development -APP_URL=http://${HOST}:${PORT} - -CACHE_VIEWS=false - -APP_KEY=2wsjLSopTjD6WQEztTYIZgCFou8wpLJn - -DB_CONNECTION=sqlite -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_USER=root -DB_PASSWORD= -DB_DATABASE=adonis - -SESSION_DRIVER=cookie diff --git a/packages/cna-template/template/frameworks/adonis/.env.example b/packages/cna-template/template/frameworks/adonis/.env.example deleted file mode 100644 index 6d4124b91..000000000 --- a/packages/cna-template/template/frameworks/adonis/.env.example +++ /dev/null @@ -1,17 +0,0 @@ -HOST=127.0.0.1 -PORT=3000 -NODE_ENV=development -APP_URL=http://${HOST}:${PORT} - -CACHE_VIEWS=false - -APP_KEY=2wsjLSopTjD6WQEztTYIZgCFou8wpLJn - -DB_CONNECTION=sqlite -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_USER=root -DB_PASSWORD= -DB_DATABASE=adonis - -SESSION_DRIVER=cookie diff --git a/packages/cna-template/template/frameworks/adonis/README.md b/packages/cna-template/template/frameworks/adonis/README.md deleted file mode 100644 index c62fa6e52..000000000 --- a/packages/cna-template/template/frameworks/adonis/README.md +++ /dev/null @@ -1,56 +0,0 @@ -

- -# AdoNuxt - -> [AdonisJS](http://adonisjs.com/) + [Nuxt.js](https://nuxtjs.org) = :fire: - -## Installation - -This is a project template for [adonis-cli](https://github.com/adonisjs/adonis-cli). - -```bash -adonis new --blueprint nuxt-community/adonuxt-template -``` - -> Make sure to use a version of adonis-cli >= 2.1.8 (`adonis --version`). - -## Usage - -| Command | Description | -|---------|-------------| -| npm run dev | Start AdonisJS server in development with Nuxt.js in dev mode (hot reloading). Listen on [http://localhost:3000](http://localhost:3000). | -| npm run build | Build your nuxt.js web application for production. | -| npm start | Start AdonisJS server in production. | -| npm lint | Lint your code with [ESLint](http://eslint.org) and [Standard](http://standardjs.com). | - -## Features - -See [AdonisJS features](http://adonisjs.com/docs/3.2/overview) and [Nuxt.js features](https://nuxtjs.org/guide/#features). - -## AdonisJS Changes - -- No more `public` directory, use `resources/static/` instead. -- No more `resources/views` directory. - -## Nuxt.js Changes - -- The `nuxt.config.js` file is now in `config/nuxt.js`. -- The Nuxt project directory is `resources`. - -## Live Demo - -[https://ado.nuxtjs.org](https://ado.nuxtjs.org) - -*This demo has been deployed to [now.sh](https://zeit.co/now/) with the single command: `now`* - -## Documentation - -- [AdonisJS](http://adonisjs.com/docs/) -- [Nuxt.js](https://nuxtjs.org/guide/) -- [Vue.js](http://vuejs.org/guide/) - -## Licenses - -- [AdonisJS license](https://github.com/adonisjs/adonis-framework/blob/develop/LICENSE.txt) -- [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/packages/cna-template/template/frameworks/adonis/ace b/packages/cna-template/template/frameworks/adonis/ace deleted file mode 100644 index 271a6046a..000000000 --- a/packages/cna-template/template/frameworks/adonis/ace +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -/* -|-------------------------------------------------------------------------- -| Ace Commands -|-------------------------------------------------------------------------- -| -| The ace file is just a regular Javascript file but with no extension. You -| can call `node ace` followed by the command name and it just works. -| -| Also you can use `adonis` followed by the command name, since the adonis -| global proxy all the ace commands. -| -*/ - -const { Ignitor } = require('@adonisjs/ignitor') - -new Ignitor(require('@adonisjs/fold')) - .appRoot(__dirname) - .fireAce() - .catch(console.error) diff --git a/packages/cna-template/template/frameworks/adonis/app/Commands/NuxtBuild.js b/packages/cna-template/template/frameworks/adonis/app/Commands/NuxtBuild.js deleted file mode 100644 index f3c8c8fb1..000000000 --- a/packages/cna-template/template/frameworks/adonis/app/Commands/NuxtBuild.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' - -const { Command } = use('@adonisjs/ace') -const { Builder } = require('nuxt<%= edge %>') - -class NuxtBuild extends Command { - /** - * signature defines the requirements and name - * of command. - * - * @return {String} - */ - static get signature () { - return 'nuxtbuild' - } - - /** - * description is the little helpful information displayed - * on the console. - * - * @return {String} - */ - static get description () { - return 'Build for production the nuxt.js application.' - } - - /** - * handle method is invoked automatically by ace, once your - * command has been executed. - * - * @param {Object} args [description] - * @param {Object} options [description] - */ - async handle (args, options) { - const nuxt = use('Service/Nuxt') - this.info('Building nuxt.js application...') - await new Builder(nuxt).build() - } -} - -module.exports = NuxtBuild diff --git a/packages/cna-template/template/frameworks/adonis/app/Controllers/Http/NuxtController.js b/packages/cna-template/template/frameworks/adonis/app/Controllers/Http/NuxtController.js deleted file mode 100644 index 325e48ed9..000000000 --- a/packages/cna-template/template/frameworks/adonis/app/Controllers/Http/NuxtController.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -class NuxtController { - constructor () { - this.nuxt = use('Service/Nuxt') - } - - async render ({ request: { request: req }, response: { response: res } }) { - await new Promise((resolve, reject) => { - this.nuxt.render(req, res, (promise) => { - promise.then(resolve).catch(reject) - }) - }) - } -} - -module.exports = new NuxtController() diff --git a/packages/cna-template/template/frameworks/adonis/app/Models/Hooks/.gitkeep b/packages/cna-template/template/frameworks/adonis/app/Models/Hooks/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/cna-template/template/frameworks/adonis/app/Models/Hooks/User.js b/packages/cna-template/template/frameworks/adonis/app/Models/Hooks/User.js deleted file mode 100644 index 4843f1c19..000000000 --- a/packages/cna-template/template/frameworks/adonis/app/Models/Hooks/User.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict' - -const Hash = use('Hash') - -const UserHook = module.exports = {} - -/** - * Hash using password as a hook. - * - * @method - * - * @param {Object} userInstance - * - * @return {void} - */ -UserHook.hashPassword = async (userInstance) => { - if (userInstance.password) { - userInstance.password = await Hash.make(userInstance.password) - } -} diff --git a/packages/cna-template/template/frameworks/adonis/app/Models/Token.js b/packages/cna-template/template/frameworks/adonis/app/Models/Token.js deleted file mode 100644 index 6d1bcebb1..000000000 --- a/packages/cna-template/template/frameworks/adonis/app/Models/Token.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const Model = use('Model') - -class Token extends Model { -} - -module.exports = Token diff --git a/packages/cna-template/template/frameworks/adonis/app/Models/User.js b/packages/cna-template/template/frameworks/adonis/app/Models/User.js deleted file mode 100644 index 53ec9a8f6..000000000 --- a/packages/cna-template/template/frameworks/adonis/app/Models/User.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict' - -const Model = use('Model') - -class User extends Model { - static boot () { - super.boot() - - /** - * A hook to bash the user password before saving - * it to the database. - * - * Look at `app/Models/Hooks/User.js` file to - * check the hashPassword method - */ - this.addHook('beforeSave', 'User.hashPassword') - } - - /** - * A relationship on tokens is required for auth to - * work. Since features like `refreshTokens` or - * `rememberToken` will be saved inside the - * tokens table. - * - * @method tokens - * - * @return {Object} - */ - tokens () { - return this.hasMany('App/Models/Token') - } -} - -module.exports = User diff --git a/packages/cna-template/template/frameworks/adonis/config/app.js b/packages/cna-template/template/frameworks/adonis/config/app.js deleted file mode 100644 index 1f6f4e4e4..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/app.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict' - -const Env = use('Env') - -module.exports = { - /* - |-------------------------------------------------------------------------- - | App Key - |-------------------------------------------------------------------------- - | - | App key is a randomly generated 16 or 32 characters long string required - | to encrypted cookies, sessions and other sensitive data. - | - */ - appKey: Env.get('APP_KEY'), - - http: { - /* - |-------------------------------------------------------------------------- - | Allow Method Spoofing - |-------------------------------------------------------------------------- - | - | Method spoofing allows to make requests by spoofing the http verb. - | Which means you can make a GET request but instruct the server to - | treat as a POST or PUT request. If you want this feature, set the - | below value to true. - | - */ - allowMethodSpoofing: true, - - /* - |-------------------------------------------------------------------------- - | Trust Proxy - |-------------------------------------------------------------------------- - | - | Trust proxy defines whether X-Forwaded-* headers should be trusted or not. - | When your application is behind a proxy server like nginx, these values - | are set automatically and should be trusted. Apart from setting it - | to true or false Adonis supports handful or ways to allow proxy - | values. Read documentation for that. - | - */ - trustProxy: false, - - /* - |-------------------------------------------------------------------------- - | Subdomains - |-------------------------------------------------------------------------- - | - | Offset to be used for returning subdomains for a given request.For - | majority of applications it will be 2, until you have nested - | sudomains. - | cheatsheet.adonisjs.com - offset - 2 - | virk.cheatsheet.adonisjs.com - offset - 3 - | - */ - subdomainOffset: 2, - - /* - |-------------------------------------------------------------------------- - | JSONP Callback - |-------------------------------------------------------------------------- - | - | Default jsonp callback to be used when callback query string is missing - | in request url. - | - */ - jsonpCallback: 'callback', - - /* - |-------------------------------------------------------------------------- - | Etag - |-------------------------------------------------------------------------- - | - | Set etag on all HTTP response. In order to disable for selected routes, - | you can call the `response.send` with an options object as follows. - | - | response.send('Hello', { ignoreEtag: true }) - | - */ - etag: true - }, - - views: { - /* - |-------------------------------------------------------------------------- - | Cache Views - |-------------------------------------------------------------------------- - | - | Define whether or not to cache the compiled view. Set it to true in - | production to optimize view loading time. - | - */ - cache: Env.get('CACHE_VIEWS', true) - }, - - static: { - /* - |-------------------------------------------------------------------------- - | Dot Files - |-------------------------------------------------------------------------- - | - | Define how to treat dot files when trying to server static resources. - | By default it is set to ignore, which will pretend that dotfiles - | does not exists. - | - | Can be one of the following - | ignore, deny, allow - | - */ - dotfiles: 'ignore', - - /* - |-------------------------------------------------------------------------- - | ETag - |-------------------------------------------------------------------------- - | - | Enable or disable etag generation - | - */ - etag: true, - - /* - |-------------------------------------------------------------------------- - | Extensions - |-------------------------------------------------------------------------- - | - | Set file extension fallbacks. When set, if a file is not found, the given - | extensions will be added to the file name and search for. The first - | that exists will be served. Example: ['html', 'htm']. - | - */ - extensions: false - }, - - locales: { - /* - |-------------------------------------------------------------------------- - | Driver - |-------------------------------------------------------------------------- - | - | The driver to be used for fetching and updating locales. Below is the - | list of available options. - | - | file, database - | - */ - driver: 'file', - - /* - |-------------------------------------------------------------------------- - | Default Locale - |-------------------------------------------------------------------------- - | - | Default locale to be used by Antl provider. You can always switch drivers - | in runtime or use the official Antl middleware to detect the driver - | based on HTTP headers/query string. - | - */ - locale: 'en' - }, - - logger: { - /* - |-------------------------------------------------------------------------- - | Transport - |-------------------------------------------------------------------------- - | - | Transport to be used for logging messages. You can have multiple - | transports using same driver. - | - | Available drivers are: `file` and `console`. - | - */ - transport: 'console', - - /* - |-------------------------------------------------------------------------- - | Console Transport - |-------------------------------------------------------------------------- - | - | Using `console` driver for logging. This driver writes to `stdout` - | and `stderr` - | - */ - console: { - driver: 'console', - name: 'adonis-app', - level: 'info' - }, - - /* - |-------------------------------------------------------------------------- - | File Transport - |-------------------------------------------------------------------------- - | - | File transport uses file driver and writes log messages for a given - | file inside `tmp` directory for your app. - | - | For a different directory, set an absolute path for the filename. - | - */ - file: { - driver: 'file', - name: 'adonis-app', - filename: 'adonis.log', - level: 'info' - } - } -} diff --git a/packages/cna-template/template/frameworks/adonis/config/auth.js b/packages/cna-template/template/frameworks/adonis/config/auth.js deleted file mode 100644 index 9a99108a5..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/auth.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict' - -module.exports = { - /* - |-------------------------------------------------------------------------- - | Authenticator - |-------------------------------------------------------------------------- - | - | Authentication is a combination of serializer and scheme with extra - | config to define on how to authenticate a user. - | - | Available Schemes - basic, session, jwt, api - | Available Serializers - lucid, database - | - */ - authenticator: 'session', - - /* - |-------------------------------------------------------------------------- - | Session - |-------------------------------------------------------------------------- - | - | Session authenticator makes use of sessions to authenticate a user. - | Session authentication is always persistent. - | - */ - session: { - serializer: 'lucid', - model: 'App/Models/User', - scheme: 'session', - uid: 'email', - password: 'password' - }, - - /* - |-------------------------------------------------------------------------- - | Basic Auth - |-------------------------------------------------------------------------- - | - | The basic auth authenticator uses basic auth header to authenticate a - | user. - | - | NOTE: - | This scheme is not persistent and users are supposed to pass - | login credentials on each request. - | - */ - basic: { - serializer: 'lucid', - model: 'App/Models/User', - scheme: 'basic', - uid: 'email', - password: 'password' - }, - - /* - |-------------------------------------------------------------------------- - | Jwt - |-------------------------------------------------------------------------- - | - | The jwt authenticator works by passing a jwt token on each HTTP request - | via HTTP `Authorization` header. - | - */ - jwt: { - serializer: 'lucid', - model: 'App/Models/User', - scheme: 'jwt', - uid: 'email', - password: 'password', - options: { - secret: 'self::app.appKey' - } - } -} diff --git a/packages/cna-template/template/frameworks/adonis/config/bodyParser.js b/packages/cna-template/template/frameworks/adonis/config/bodyParser.js deleted file mode 100644 index 6b40f1ab2..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/bodyParser.js +++ /dev/null @@ -1,157 +0,0 @@ -'use strict' - -module.exports = { - /* - |-------------------------------------------------------------------------- - | JSON Parser - |-------------------------------------------------------------------------- - | - | Below settings are applied when request body contains JSON payload. If - | you want body parser to ignore JSON payload, then simply set `types` - | to an empty array. - */ - json: { - /* - |-------------------------------------------------------------------------- - | limit - |-------------------------------------------------------------------------- - | - | Defines the limit of JSON that can be sent by the client. If payload - | is over 1mb it will not be processed. - | - */ - limit: '1mb', - - /* - |-------------------------------------------------------------------------- - | strict - |-------------------------------------------------------------------------- - | - | When `scrict` is set to true, body parser will only parse Arrays and - | Object. Otherwise everything parseable by `JSON.parse` is parsed. - | - */ - strict: true, - - /* - |-------------------------------------------------------------------------- - | types - |-------------------------------------------------------------------------- - | - | Which content types are processed as JSON payloads. You are free to - | add your own types here, but the request body should be parseable - | by `JSON.parse` method. - | - */ - types: [ - 'application/json', - 'application/json-patch+json', - 'application/vnd.api+json', - 'application/csp-report' - ] - }, - - /* - |-------------------------------------------------------------------------- - | Raw Parser - |-------------------------------------------------------------------------- - | - | - | - */ - raw: { - types: [ - 'text/*' - ] - }, - - /* - |-------------------------------------------------------------------------- - | Form Parser - |-------------------------------------------------------------------------- - | - | - | - */ - form: { - types: [ - 'application/x-www-form-urlencoded' - ] - }, - - /* - |-------------------------------------------------------------------------- - | Files Parser - |-------------------------------------------------------------------------- - | - | - | - */ - files: { - types: [ - 'multipart/form-data' - ], - - /* - |-------------------------------------------------------------------------- - | Max Size - |-------------------------------------------------------------------------- - | - | Below value is the max size of all the files uploaded to the server. It - | is validated even before files have been processed and hard exception - | is thrown. - | - | Consider setting a reasonable value here, otherwise people may upload GB's - | of files which will keep your server busy. - | - | Also this value is considered when `autoProcess` is set to true. - | - */ - maxSize: '20mb', - - /* - |-------------------------------------------------------------------------- - | Auto Process - |-------------------------------------------------------------------------- - | - | Whether or not to auto-process files. Since HTTP servers handle files via - | couple of specific endpoints. It is better to set this value off and - | manually process the files when required. - | - | This value can contain a boolean or an array of route patterns - | to be autoprocessed. - */ - autoProcess: true, - - /* - |-------------------------------------------------------------------------- - | Process Manually - |-------------------------------------------------------------------------- - | - | The list of routes that should not process files and instead rely on - | manual process. This list should only contain routes when autoProcess - | is to true. Otherwise everything is processed manually. - | - */ - processManually: [] - - /* - |-------------------------------------------------------------------------- - | Temporary file name - |-------------------------------------------------------------------------- - | - | Define a function, which should return a string to be used as the - | tmp file name. - | - | If not defined, Bodyparser will use `uuid` as the tmp file name. - | - | To be defined as. If you are defining the function, then do make sure - | to return a value from it. - | - | tmpFileName () { - | return 'some-unique-value' - | } - | - */ - } -} diff --git a/packages/cna-template/template/frameworks/adonis/config/cors.js b/packages/cna-template/template/frameworks/adonis/config/cors.js deleted file mode 100644 index 4d00e323b..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/cors.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict' - -module.exports = { - /* - |-------------------------------------------------------------------------- - | Origin - |-------------------------------------------------------------------------- - | - | Set a list of origins to be allowed. The value can be one of the following - | - | Boolean: true - Allow current request origin - | Boolean: false - Disallow all - | String - Comma seperated list of allowed origins - | Array - An array of allowed origins - | String: * - A wildcard to allow current request origin - | Function - Receives the current origin and should return one of the above values. - | - */ - origin: false, - - /* - |-------------------------------------------------------------------------- - | Methods - |-------------------------------------------------------------------------- - | - | HTTP methods to be allowed. The value can be one of the following - | - | String - Comma seperated list of allowed methods - | Array - An array of allowed methods - | - */ - methods: ['GET', 'PUT', 'POST'], - - /* - |-------------------------------------------------------------------------- - | Headers - |-------------------------------------------------------------------------- - | - | List of headers to be allowed via Access-Control-Request-Headers header. - | The value can be on of the following. - | - | Boolean: true - Allow current request headers - | Boolean: false - Disallow all - | String - Comma seperated list of allowed headers - | Array - An array of allowed headers - | String: * - A wildcard to allow current request headers - | Function - Receives the current header and should return one of the above values. - | - */ - headers: true, - - /* - |-------------------------------------------------------------------------- - | Expose Headers - |-------------------------------------------------------------------------- - | - | A list of headers to be exposed via `Access-Control-Expose-Headers` - | header. The value can be on of the following. - | - | Boolean: false - Disallow all - | String: Comma seperated list of allowed headers - | Array - An array of allowed headers - | - */ - exposeHeaders: false, - - /* - |-------------------------------------------------------------------------- - | Credentials - |-------------------------------------------------------------------------- - | - | Define Access-Control-Allow-Credentials header. It should always be a - | boolean. - | - */ - credentials: false, - - /* - |-------------------------------------------------------------------------- - | MaxAge - |-------------------------------------------------------------------------- - | - | Define Access-Control-Allow-Max-Age - | - */ - maxAge: 90 -} diff --git a/packages/cna-template/template/frameworks/adonis/config/database.js b/packages/cna-template/template/frameworks/adonis/config/database.js deleted file mode 100644 index 0105a154f..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/database.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict' - -const Env = use('Env') -const Helpers = use('Helpers') - -module.exports = { - /* - |-------------------------------------------------------------------------- - | Default Connection - |-------------------------------------------------------------------------- - | - | Connection defines the default connection settings to be used while - | interacting with SQL databases. - | - */ - connection: Env.get('DB_CONNECTION', 'sqlite'), - - /* - |-------------------------------------------------------------------------- - | Sqlite - |-------------------------------------------------------------------------- - | - | Sqlite is a flat file database and can be good choice under development - | environment. - | - | npm i --save sqlite3 - | - */ - sqlite: { - client: 'sqlite3', - connection: { - filename: Helpers.databasePath('development.sqlite') - }, - useNullAsDefault: true - }, - - /* - |-------------------------------------------------------------------------- - | MySQL - |-------------------------------------------------------------------------- - | - | Here we define connection settings for MySQL database. - | - | npm i --save mysql - | - */ - mysql: { - client: 'mysql', - connection: { - host: Env.get('DB_HOST', 'localhost'), - port: Env.get('DB_PORT', ''), - user: Env.get('DB_USER', 'root'), - password: Env.get('DB_PASSWORD', ''), - database: Env.get('DB_DATABASE', 'adonis') - } - }, - - /* - |-------------------------------------------------------------------------- - | PostgreSQL - |-------------------------------------------------------------------------- - | - | Here we define connection settings for PostgreSQL database. - | - | npm i --save pg - | - */ - pg: { - client: 'pg', - connection: { - host: Env.get('DB_HOST', 'localhost'), - port: Env.get('DB_PORT', ''), - user: Env.get('DB_USER', 'root'), - password: Env.get('DB_PASSWORD', ''), - database: Env.get('DB_DATABASE', 'adonis') - } - } -} diff --git a/packages/cna-template/template/frameworks/adonis/config/session.js b/packages/cna-template/template/frameworks/adonis/config/session.js deleted file mode 100644 index 6c621cb1a..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/session.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict' - -const Env = use('Env') - -module.exports = { - /* - |-------------------------------------------------------------------------- - | Session Driver - |-------------------------------------------------------------------------- - | - | The session driver to be used for storing session values. It can be - | cookie, file or redis. - | - | For `redis` driver, make sure to install and register `@adonisjs/redis` - | - */ - driver: Env.get('SESSION_DRIVER', 'cookie'), - - /* - |-------------------------------------------------------------------------- - | Cookie Name - |-------------------------------------------------------------------------- - | - | The name of the cookie to be used for saving session id. Session ids - | are signed and encrypted. - | - */ - cookieName: 'adonis-session', - - /* - |-------------------------------------------------------------------------- - | Clear session when browser closes - |-------------------------------------------------------------------------- - | - | If this value is true, the session cookie will be temporary and will be - | removed when browser closes. - | - */ - clearWithBrowser: true, - - /* - |-------------------------------------------------------------------------- - | Session age - |-------------------------------------------------------------------------- - | - | This value is only used when `clearWithBrowser` is set to false. The - | age must be a valid https://npmjs.org/package/ms string or should - | be in milliseconds. - | - | Valid values are: - | '2h', '10d', '5y', '2.5 hrs' - | - */ - age: '2h', - - /* - |-------------------------------------------------------------------------- - | Cookie options - |-------------------------------------------------------------------------- - | - | Cookie options defines the options to be used for setting up session - | cookie - | - */ - cookie: { - httpOnly: true, - sameSite: true, - path: '/' - }, - - /* - |-------------------------------------------------------------------------- - | Sessions location - |-------------------------------------------------------------------------- - | - | If driver is set to file, we need to define the relative location from - | the temporary path or absolute url to any location. - | - */ - file: { - location: 'sessions' - }, - - /* - |-------------------------------------------------------------------------- - | Redis config - |-------------------------------------------------------------------------- - | - | The configuration for the redis driver. By default we reference it from - | the redis file. But you are free to define an object here too. - | - */ - redis: 'self::redis.local' -} diff --git a/packages/cna-template/template/frameworks/adonis/config/shield.js b/packages/cna-template/template/frameworks/adonis/config/shield.js deleted file mode 100644 index 3d4526a50..000000000 --- a/packages/cna-template/template/frameworks/adonis/config/shield.js +++ /dev/null @@ -1,145 +0,0 @@ -'use strict' - -module.exports = { - /* - |-------------------------------------------------------------------------- - | Content Security Policy - |-------------------------------------------------------------------------- - | - | Content security policy filters out the origins not allowed to execute - | and load resources like scripts, styles and fonts. There are wide - | variety of options to choose from. - */ - csp: { - /* - |-------------------------------------------------------------------------- - | Directives - |-------------------------------------------------------------------------- - | - | All directives are defined in camelCase and here is the list of - | available directives and their possible values. - | - | https://content-security-policy.com - | - | @example - | directives: { - | defaultSrc: ['self', '@nonce', 'cdnjs.cloudflare.com'] - | } - | - */ - directives: { - }, - /* - |-------------------------------------------------------------------------- - | Report only - |-------------------------------------------------------------------------- - | - | Setting `reportOnly=true` will not block the scripts from running and - | instead report them to a URL. - | - */ - reportOnly: false, - /* - |-------------------------------------------------------------------------- - | Set all headers - |-------------------------------------------------------------------------- - | - | Headers staring with `X` have been depreciated, since all major browsers - | supports the standard CSP header. So its better to disable deperciated - | headers, unless you want them to be set. - | - */ - setAllHeaders: false, - - /* - |-------------------------------------------------------------------------- - | Disable on android - |-------------------------------------------------------------------------- - | - | Certain versions of android are buggy with CSP policy. So you can set - | this value to true, to disable it for Android versions with buggy - | behavior. - | - | Here is an issue reported on a different package, but helpful to read - | if you want to know the behavior. https://github.com/helmetjs/helmet/pull/82 - | - */ - disableAndroid: true - }, - - /* - |-------------------------------------------------------------------------- - | X-XSS-Protection - |-------------------------------------------------------------------------- - | - | X-XSS Protection saves from applications from XSS attacks. It is adopted - | by IE and later followed by some other browsers. - | - | Learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection - | - */ - xss: { - enabled: true, - enableOnOldIE: false - }, - - /* - |-------------------------------------------------------------------------- - | Iframe Options - |-------------------------------------------------------------------------- - | - | xframe defines whether or not your website can be embedded inside an - | iframe. Choose from one of the following options. - | @available options - | DENY, SAMEORIGIN, ALLOW-FROM http://example.com - | - | Learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options - */ - xframe: 'DENY', - - /* - |-------------------------------------------------------------------------- - | No Sniff - |-------------------------------------------------------------------------- - | - | Browsers have a habit of sniffing content-type of a response. Which means - | files with .txt extension containing Javascript code will be executed as - | Javascript. You can disable this behavior by setting nosniff to false. - | - | Learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options - | - */ - nosniff: true, - - /* - |-------------------------------------------------------------------------- - | No Open - |-------------------------------------------------------------------------- - | - | IE users can execute webpages in the context of your website, which is - | a serious security risk. Below option will manage this for you. - | - */ - noopen: true, - - /* - |-------------------------------------------------------------------------- - | CSRF Protection - |-------------------------------------------------------------------------- - | - | CSRF Protection adds another layer of security by making sure, actionable - | routes does have a valid token to execute an action. - | - */ - csrf: { - enable: true, - methods: ['POST', 'PUT', 'DELETE'], - filterUris: [], - cookieOptions: { - httpOnly: false, - sameSite: true, - path: '/', - maxAge: 7200 - } - } -} diff --git a/packages/cna-template/template/frameworks/adonis/database/factory.js b/packages/cna-template/template/frameworks/adonis/database/factory.js deleted file mode 100644 index f70c2bcc2..000000000 --- a/packages/cna-template/template/frameworks/adonis/database/factory.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -/* -|-------------------------------------------------------------------------- -| Factory -|-------------------------------------------------------------------------- -| -| Factories are used to define blueprints for database tables or Lucid -| models. Later you can use these blueprints to seed your database -| with dummy data. -| -*/ - -// const Factory = use('Factory') - -/** - Factory.blueprint('App/Models/User', (faker) => { - return { - username: faker.username() - } - }) -*/ diff --git a/packages/cna-template/template/frameworks/adonis/database/migrations/.gitkeep b/packages/cna-template/template/frameworks/adonis/database/migrations/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/cna-template/template/frameworks/adonis/package.json b/packages/cna-template/template/frameworks/adonis/package.json deleted file mode 100644 index bce688552..000000000 --- a/packages/cna-template/template/frameworks/adonis/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "scripts": { - "serve:dev": "<%= pmRun %> dev", - "dev": "nodemon --watch app --watch bootstrap --watch config --watch .env -x node server.js", - "build": "cross-env NODE_ENV=production node ./ace nuxtbuild", - "start": "cross-env NODE_ENV=production node server.js" - }, - "dependencies": { - "cross-env": "^7.0.2", - "@adonisjs/ace": "^4.0.8", - "@adonisjs/auth": "^2.0.11", - "@adonisjs/bodyparser": "^1.0.8", - "@adonisjs/cors": "^1.0.7", - "@adonisjs/fold": "^4.0.9", - "@adonisjs/framework": "^4.0.31", - "@adonisjs/ignitor": "^1.0.14", - "@adonisjs/lucid": "^4.1.3", - "@adonisjs/session": "^1.0.29", - "@adonisjs/shield": "^1.0.8" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/adonis/providers/NuxtProvider.js b/packages/cna-template/template/frameworks/adonis/providers/NuxtProvider.js deleted file mode 100644 index f08bfb380..000000000 --- a/packages/cna-template/template/frameworks/adonis/providers/NuxtProvider.js +++ /dev/null @@ -1,24 +0,0 @@ -const { ServiceProvider } = require('@adonisjs/fold') -const { Nuxt, Builder } = require('nuxt<%= edge %>') - -class NuxtProvider extends ServiceProvider { - register () { - this.app.singleton('Service/Nuxt', () => { - const config = this.app.use('Config').get('nuxt') - return new Nuxt(config) - }) - } - - async boot () { - const Helpers = this.app.use('Helpers') - if (!Helpers.isAceCommand()) { - const nuxt = this.app.use('Service/Nuxt') - await nuxt.ready() - if (nuxt.options.dev) { - await new Builder(nuxt).build() - } - } - } -} - -module.exports = NuxtProvider diff --git a/packages/cna-template/template/frameworks/adonis/server.js b/packages/cna-template/template/frameworks/adonis/server.js deleted file mode 100644 index 63a47fbcc..000000000 --- a/packages/cna-template/template/frameworks/adonis/server.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' - -/* -|-------------------------------------------------------------------------- -| Http server -|-------------------------------------------------------------------------- -| -| This file bootstrap Adonisjs to start the HTTP server. You are free to -| customize the process of booting the http server. -| -| """ Loading ace commands """ -| At times you may want to load ace commands when starting the HTTP server. -| Same can be done by chaining `loadCommands()` method after -| -| """ Preloading files """ -| Also you can preload files by calling `preLoad('path/to/file')` method. -| Make sure to pass relative path from the project root. -*/ - -const { Ignitor } = require('@adonisjs/ignitor') - -new Ignitor(require('@adonisjs/fold')) - .appRoot(__dirname) - .fireHttpServer() - .catch(console.error) // eslint-disable-line no-console diff --git a/packages/cna-template/template/frameworks/adonis/start/app.js b/packages/cna-template/template/frameworks/adonis/start/app.js deleted file mode 100644 index 092749ca9..000000000 --- a/packages/cna-template/template/frameworks/adonis/start/app.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict' - -const path = require('path') - -/* -|-------------------------------------------------------------------------- -| Providers -|-------------------------------------------------------------------------- -| -| Providers are building blocks for your Adonis app. Anytime you install -| a new Adonis specific package, chances are you will register the -| provider here. -| -*/ -const providers = [ - '@adonisjs/framework/providers/AppProvider', - '@adonisjs/framework/providers/ViewProvider', - '@adonisjs/lucid/providers/LucidProvider', - '@adonisjs/bodyparser/providers/BodyParserProvider', - '@adonisjs/cors/providers/CorsProvider', - '@adonisjs/shield/providers/ShieldProvider', - '@adonisjs/session/providers/SessionProvider', - '@adonisjs/auth/providers/AuthProvider', - path.join(__dirname, '..', 'providers', 'NuxtProvider') -] - -/* -|-------------------------------------------------------------------------- -| Ace Providers -|-------------------------------------------------------------------------- -| -| Ace providers are required only when running ace commands. For example -| Providers for migrations, tests etc. -| -*/ -const aceProviders = [ - '@adonisjs/lucid/providers/MigrationsProvider' -] - -/* -|-------------------------------------------------------------------------- -| Aliases -|-------------------------------------------------------------------------- -| -| Aliases are short unique names for IoC container bindings. You are free -| to create your own aliases. -| -| For example: -| { Route: 'Adonis/Src/Route' } -| -*/ -const aliases = {} - -/* -|-------------------------------------------------------------------------- -| Commands -|-------------------------------------------------------------------------- -| -| Here you store ace commands for your package -| -*/ -const commands = [ - 'App/Commands/NuxtBuild' -] - -module.exports = { providers, aceProviders, aliases, commands } diff --git a/packages/cna-template/template/frameworks/adonis/start/kernel.js b/packages/cna-template/template/frameworks/adonis/start/kernel.js deleted file mode 100644 index 72d769e53..000000000 --- a/packages/cna-template/template/frameworks/adonis/start/kernel.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict' - -const Server = use('Server') - -/* -|-------------------------------------------------------------------------- -| Global Middleware -|-------------------------------------------------------------------------- -| -| Global middleware are executed on each http request only when the routes -| match. -| -*/ -const globalMiddleware = [ - 'Adonis/Middleware/BodyParser', - 'Adonis/Middleware/Session', - 'Adonis/Middleware/Shield', - 'Adonis/Middleware/AuthInit' -] - -/* -|-------------------------------------------------------------------------- -| Named Middleware -|-------------------------------------------------------------------------- -| -| Named middleware is key/value object to conditionally add middleware on -| specific routes or group of routes. -| -| // define -| { -| auth: 'Adonis/Middleware/Auth' -| } -| -| // use -| Route.get().middleware('auth') -| -*/ -const namedMiddleware = { - auth: 'Adonis/Middleware/Auth' -} - -/* -|-------------------------------------------------------------------------- -| Server Middleware -|-------------------------------------------------------------------------- -| -| Server levl middleware are executed even when route for a given URL is -| not registered. Features like `static assets` and `cors` needs better -| control over request lifecycle. -| -*/ -const serverMiddleware = [ - 'Adonis/Middleware/Static', - 'Adonis/Middleware/Cors' -] - -Server - .registerGlobal(globalMiddleware) - .registerNamed(namedMiddleware) - .use(serverMiddleware) diff --git a/packages/cna-template/template/frameworks/adonis/start/routes.js b/packages/cna-template/template/frameworks/adonis/start/routes.js deleted file mode 100644 index 049348d8a..000000000 --- a/packages/cna-template/template/frameworks/adonis/start/routes.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -/* -|-------------------------------------------------------------------------- -| Routes -|-------------------------------------------------------------------------- -| -| Http routes are entry points to your web application. You can create -| routes for different URL's and bind Controller actions to them. -| -| A complete guide on routing is available here. -| http://adonisjs.com/guides/routing -| -*/ - -const Route = use('Route') - -Route.any('*', 'NuxtController.render') diff --git a/packages/cna-template/template/frameworks/express/package.json b/packages/cna-template/template/frameworks/express/package.json deleted file mode 100644 index 9ed67b5e8..000000000 --- a/packages/cna-template/template/frameworks/express/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scripts": { - "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", - "build": "nuxt build", - "start": "cross-env NODE_ENV=production node server/index.js", - "generate": "nuxt generate" - }, - "dependencies": { - "cross-env": "^7.0.2", - "express": "^4.17.1" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/express/server/index.js b/packages/cna-template/template/frameworks/express/server/index.js deleted file mode 100644 index 3511e4c64..000000000 --- a/packages/cna-template/template/frameworks/express/server/index.js +++ /dev/null @@ -1,33 +0,0 @@ -const express = require('express') -const consola = require('consola') -const { Nuxt, Builder } = require('nuxt<%= edge %>') -const app = express() - -// Import and Set Nuxt.js options -const config = require('../nuxt.config.js') -config.dev = process.env.NODE_ENV !== 'production' - -async function start () { - // Init Nuxt.js - const nuxt = new Nuxt(config) - - const { host, port } = nuxt.options.server - - await nuxt.ready() - // Build only in dev mode - if (config.dev) { - const builder = new Builder(nuxt) - await builder.build() - } - - // Give nuxt middleware to express - app.use(nuxt.render) - - // Listen the server - app.listen(port, host) - consola.ready({ - message: `Server listening on http://${host}:${port}`, - badge: true - }) -} -start() diff --git a/packages/cna-template/template/frameworks/fastify/package.json b/packages/cna-template/template/frameworks/fastify/package.json deleted file mode 100644 index bcf46e470..000000000 --- a/packages/cna-template/template/frameworks/fastify/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scripts": { - "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", - "build": "nuxt build", - "start": "cross-env NODE_ENV=production node server/index.js", - "generate": "nuxt generate" - }, - "dependencies": { - "cross-env": "^7.0.2", - "fastify": "^2.13.1" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/fastify/server/index.js b/packages/cna-template/template/frameworks/fastify/server/index.js deleted file mode 100644 index b3ed9c8f0..000000000 --- a/packages/cna-template/template/frameworks/fastify/server/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const { Nuxt, Builder } = require('nuxt<%= edge %>') -const fastify = require('fastify')({ - logger: true -}) - -// Import and Set Nuxt.js options -const config = require('../nuxt.config.js') -config.dev = process.env.NODE_ENV !== 'production' - -async function start () { - // Instantiate nuxt.js - const nuxt = new Nuxt(config) - - const { - host = process.env.HOST || '127.0.0.1', - port = process.env.PORT || 3000 - } = nuxt.options.server - - await nuxt.ready() - // Build only in dev mode - if (config.dev) { - const builder = new Builder(nuxt) - await builder.build() - } - - fastify.use(nuxt.render) - - fastify.listen(port, host, (err, address) => { - if (err) { - fastify.log.error(err) - process.exit(1) - } - }) -} - -start() diff --git a/packages/cna-template/template/frameworks/feathers/package.json b/packages/cna-template/template/frameworks/feathers/package.json deleted file mode 100644 index 451ee00b6..000000000 --- a/packages/cna-template/template/frameworks/feathers/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "scripts": { - "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", - "build": "nuxt build", - "start": "cross-env NODE_ENV=production node server/index.js", - "generate": "nuxt generate" - }, - "dependencies": { - "cross-env": "^7.0.2", - "@feathersjs/feathers": "^3.3.1", - "@feathersjs/express": "^1.3.1", - "@feathersjs/configuration": "^2.0.6" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/feathers/server/config/default.json b/packages/cna-template/template/frameworks/feathers/server/config/default.json deleted file mode 100644 index 728827262..000000000 --- a/packages/cna-template/template/frameworks/feathers/server/config/default.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "host": "localhost", - "port": 3000 -} diff --git a/packages/cna-template/template/frameworks/feathers/server/config/production.json b/packages/cna-template/template/frameworks/feathers/server/config/production.json deleted file mode 100644 index 751347e58..000000000 --- a/packages/cna-template/template/frameworks/feathers/server/config/production.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "host": "with-featherjs-app.feathersjs.com", - "port": 80 -} diff --git a/packages/cna-template/template/frameworks/feathers/server/index.js b/packages/cna-template/template/frameworks/feathers/server/index.js deleted file mode 100644 index e77501a0b..000000000 --- a/packages/cna-template/template/frameworks/feathers/server/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict' -const path = require('path') -const consola = require('consola') -const feathers = require('@feathersjs/feathers') -const express = require('@feathersjs/express') - -process.env.NODE_CONFIG_DIR = path.join(__dirname, 'config/') - -async function start () { - const app = express(feathers()) - - const { Nuxt, Builder } = require('nuxt<%= edge %>') - - // Setup nuxt.js - const config = require('../nuxt.config.js') - config.rootDir = path.resolve(__dirname, '..') - config.dev = process.env.NODE_ENV !== 'production' - - const nuxt = new Nuxt(config) - await nuxt.ready() - if (config.dev) { - const builder = new Builder(nuxt) - await builder.build() - } - - const configuration = require('@feathersjs/configuration') - app.configure(configuration()).use(nuxt.render) - - const host = app.get('host') - const port = app.get('port') - - app.listen(port) - - consola.ready({ - message: `Feathers application started on ${host}:${port}`, - badge: true - }) -} - -start() diff --git a/packages/cna-template/template/frameworks/hapi/package.json b/packages/cna-template/template/frameworks/hapi/package.json deleted file mode 100644 index dba327d14..000000000 --- a/packages/cna-template/template/frameworks/hapi/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "scripts": { - "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", - "build": "nuxt build", - "start": "cross-env NODE_ENV=production node server/index.js", - "generate": "nuxt generate" - }, - "dependencies": { - "cross-env": "^7.0.2", - "@hapi/hapi": "^18.3.1", - "@nuxtjs/hapi": "^2.3.0" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/hapi/server/index.js b/packages/cna-template/template/frameworks/hapi/server/index.js deleted file mode 100644 index a0f4fc1aa..000000000 --- a/packages/cna-template/template/frameworks/hapi/server/index.js +++ /dev/null @@ -1,26 +0,0 @@ -const consola = require('consola') -const Hapi = require('@hapi/hapi') -const HapiNuxt = require('@nuxtjs/hapi') - -async function start () { - const server = new Hapi.Server({ - host: process.env.HOST || '127.0.0.1', - port: process.env.PORT || 3000 - }) - - await server.register({ - plugin: HapiNuxt, - options: {} - }) - - await server.start() - - consola.ready({ - message: `Server running at: ${server.info.uri}`, - badge: true - }) -} - -process.on('unhandledRejection', error => consola.error(error)) - -start() diff --git a/packages/cna-template/template/frameworks/koa/package.json b/packages/cna-template/template/frameworks/koa/package.json deleted file mode 100644 index 2971b6900..000000000 --- a/packages/cna-template/template/frameworks/koa/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scripts": { - "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", - "build": "nuxt build", - "start": "cross-env NODE_ENV=production node server/index.js", - "generate": "nuxt generate" - }, - "dependencies": { - "cross-env": "^7.0.2", - "koa": "^2.11.0" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/koa/server/index.js b/packages/cna-template/template/frameworks/koa/server/index.js deleted file mode 100644 index 5ac198b7f..000000000 --- a/packages/cna-template/template/frameworks/koa/server/index.js +++ /dev/null @@ -1,41 +0,0 @@ -const Koa = require('koa') -const consola = require('consola') -const { Nuxt, Builder } = require('nuxt<%= edge %>') - -const app = new Koa() - -// Import and Set Nuxt.js options -const config = require('../nuxt.config.js') -config.dev = app.env !== 'production' - -async function start () { - // Instantiate nuxt.js - const nuxt = new Nuxt(config) - - const { - host = process.env.HOST || '127.0.0.1', - port = process.env.PORT || 3000 - } = nuxt.options.server - - await nuxt.ready() - // Build in development - if (config.dev) { - const builder = new Builder(nuxt) - await builder.build() - } - - app.use((ctx) => { - ctx.status = 200 - ctx.respond = false // Bypass Koa's built-in response handling - ctx.req.ctx = ctx // This might be useful later on, e.g. in nuxtServerInit or with nuxt-stash - nuxt.render(ctx.req, ctx.res) - }) - - app.listen(port, host) - consola.ready({ - message: `Server listening on http://${host}:${port}`, - badge: true - }) -} - -start() diff --git a/packages/cna-template/template/frameworks/micro/package.json b/packages/cna-template/template/frameworks/micro/package.json deleted file mode 100644 index 462d618ba..000000000 --- a/packages/cna-template/template/frameworks/micro/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "scripts": { - "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", - "build": "nuxt build", - "start": "cross-env NODE_ENV=production node server/index.js", - "generate": "nuxt generate" - }, - "dependencies": { - "cross-env": "^7.0.2", - "micro": "^9.3.4", - "micro-route": "^2.5.0" - }, - "devDependencies": { - "nodemon": "^2.0.3" - } -} diff --git a/packages/cna-template/template/frameworks/micro/server/index.js b/packages/cna-template/template/frameworks/micro/server/index.js deleted file mode 100644 index c32a30f49..000000000 --- a/packages/cna-template/template/frameworks/micro/server/index.js +++ /dev/null @@ -1,38 +0,0 @@ -const micro = require('micro') -const consola = require('consola') -const dispatch = require('micro-route/dispatch') -const { Nuxt, Builder } = require('nuxt<%= edge %>') - -async function start () { - // Require nuxt config - const config = require('../nuxt.config.js') - - // Create a new nuxt instance - const nuxt = new Nuxt(config) - - await nuxt.ready() - // Enable live build & reloading on dev - if (nuxt.options.dev) { - await new Builder(nuxt).build() - } - - const server = micro(async (req, res) => { - await dispatch().dispatch('*', ['GET'], (req, res) => - nuxt.render(req, res) - )(req, res) - }) - - const { - host = process.env.HOST || '127.0.0.1', - port = process.env.PORT || 3000 - } = nuxt.options.server - - // Listen the server - server.listen(port, host) - consola.ready({ - message: `Server listening on http://${host}:${port}`, - badge: true - }) -} - -start() diff --git a/packages/cna-template/template/nuxt/nuxt.config.js b/packages/cna-template/template/nuxt/nuxt.config.js index 13903d371..487a3b6be 100644 --- a/packages/cna-template/template/nuxt/nuxt.config.js +++ b/packages/cna-template/template/nuxt/nuxt.config.js @@ -3,9 +3,6 @@ import colors from 'vuetify/es5/util/colors' <%_ } _%> <%_ } else { _%> - <%_ if (server === 'adonis') { _%> -const { resolve } = require('path') - <%_ } _%> <%_ if (ui === 'vuetify') { _%> const colors = require('vuetify/es5/util/colors').default <%_ } _%> @@ -17,10 +14,6 @@ export default { module.exports = { <%_ } _%> mode: '<%= mode %>', - <%_ if (server === 'adonis') { _%> - dev: process.env.NODE_ENV === 'development', - srcDir: resolve(__dirname, '..', 'resources'), - <%_ } _%> /* ** Headers of the page */ diff --git a/packages/create-nuxt-app/lib/package.js b/packages/create-nuxt-app/lib/package.js index 01a71037a..5060a91f6 100644 --- a/packages/create-nuxt-app/lib/package.js +++ b/packages/create-nuxt-app/lib/package.js @@ -23,9 +23,8 @@ module.exports = { load (generator) { const nuxtPkg = this.loadPackage('nuxt', generator) const uiPkg = this.loadPackage(generator.answers.ui, generator) - const serverPkg = this.loadPackage(generator.answers.server, generator) const testPkg = this.loadPackage(generator.answers.test, generator) - const pkg = merge(nuxtPkg, uiPkg, serverPkg, testPkg) + const pkg = merge(nuxtPkg, uiPkg, testPkg) pkg.dependencies = sortByKey(pkg.dependencies) pkg.devDependencies = sortByKey(pkg.devDependencies) return pkg diff --git a/packages/create-nuxt-app/lib/prompts.js b/packages/create-nuxt-app/lib/prompts.js index 404518352..9a80336bf 100644 --- a/packages/create-nuxt-app/lib/prompts.js +++ b/packages/create-nuxt-app/lib/prompts.js @@ -45,23 +45,6 @@ module.exports = [ ], default: 'none' }, - { - name: 'server', - message: 'Choose custom server framework', - type: 'list', - pageSize: 10, - choices: [ - { name: 'None (Recommended)', value: 'none' }, - { name: 'AdonisJs', value: 'adonis' }, - { name: 'Express', value: 'express' }, - { name: 'Fastify', value: 'fastify' }, - { name: 'Feathers', value: 'feathers' }, - { name: 'hapi', value: 'hapi' }, - { name: 'Koa', value: 'koa' }, - { name: 'Micro', value: 'micro' } - ], - default: 'none' - }, { name: 'runtime', message: 'Choose the runtime for TypeScript', @@ -70,7 +53,7 @@ module.exports = [ { name: 'Default', value: 'none' }, { name: '@nuxt/typescript-runtime', value: 'ts-runtime' } ], - when: answers => answers.language === 'ts' && answers.server === 'none' + when: answers => answers.language === 'ts' }, { name: 'features', diff --git a/packages/create-nuxt-app/lib/saofile.js b/packages/create-nuxt-app/lib/saofile.js index a34bd4ff9..b5fd39c13 100644 --- a/packages/create-nuxt-app/lib/saofile.js +++ b/packages/create-nuxt-app/lib/saofile.js @@ -20,7 +20,6 @@ module.exports = { const stylelint = this.answers.linter.includes('stylelint') const axios = this.answers.features.includes('axios') const dotenv = this.answers.features.includes('dotenv') - const esm = this.answers.server === 'none' const pm = this.answers.pm === 'yarn' ? 'yarn' : 'npm' const pmRun = this.answers.pm === 'yarn' ? 'yarn' : 'npm run' @@ -36,7 +35,7 @@ module.exports = { lintStaged, stylelint, axios, - esm, + esm: true, edge, pm, pmRun, @@ -78,32 +77,6 @@ module.exports = { }) } - if (this.answers.server !== 'none') { - if (this.answers.server === 'adonis') { - const files = {} - for (const action of actions) { - const options = { cwd: action.templateDir, dot: true } - for (const file of glob.sync('*', options)) { - files[file] = `resources/${file}` - } - } - delete files['package.js'] - delete files['package.json'] - files['nuxt.config.js'] = 'config/nuxt.js' - - actions.push({ - type: 'move', - patterns: files - }) - } - - actions.push({ - type: 'add', - files: '**', - templateDir: join(frameworksDir, this.answers.server) - }) - } - actions.push({ type: 'add', files: '*', diff --git a/packages/create-nuxt-app/test/index.test.js b/packages/create-nuxt-app/test/index.test.js index 81ecbd41d..c83f7ba4d 100644 --- a/packages/create-nuxt-app/test/index.test.js +++ b/packages/create-nuxt-app/test/index.test.js @@ -28,7 +28,7 @@ const verifyPkg = async (t, answers = {}) => { const verifyNuxtConfig = async (t, answers = {}) => { const stream = await sao.mock({ generator }, answers) - const configFile = answers.server === 'adonis' ? 'config/nuxt.js' : 'nuxt.config.js' + const configFile = 'nuxt.config.js' const config = await stream.readFile(configFile) t.snapshot(normalizeNewlines(config), `Generated ${configFile}`) } diff --git a/packages/create-nuxt-app/test/snapshots/index.test.js.md b/packages/create-nuxt-app/test/snapshots/index.test.js.md index 00080273f..531f50888 100644 --- a/packages/create-nuxt-app/test/snapshots/index.test.js.md +++ b/packages/create-nuxt-app/test/snapshots/index.test.js.md @@ -2118,850 +2118,6 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## verify server: AdonisJs - -> Generated files - - [ - '.editorconfig', - '.env', - '.env.example', - '.gitignore', - 'README.md', - 'ace', - 'app/Commands/NuxtBuild.js', - 'app/Controllers/Http/NuxtController.js', - 'app/Models/Hooks/.gitkeep', - 'app/Models/Hooks/User.js', - 'app/Models/Token.js', - 'app/Models/User.js', - 'config/app.js', - 'config/auth.js', - 'config/bodyParser.js', - 'config/cors.js', - 'config/database.js', - 'config/nuxt.js', - 'config/session.js', - 'config/shield.js', - 'database/factory.js', - 'database/migrations/.gitkeep', - 'package.json', - 'providers/NuxtProvider.js', - 'resources/assets/README.md', - 'resources/components/Logo.vue', - 'resources/components/README.md', - 'resources/layouts/README.md', - 'resources/layouts/default.vue', - 'resources/middleware/README.md', - 'resources/pages/README.md', - 'resources/pages/index.vue', - 'resources/plugins/README.md', - 'resources/static/README.md', - 'resources/static/favicon.ico', - 'resources/store/README.md', - 'server.js', - 'start/app.js', - 'start/kernel.js', - 'start/routes.js', - ] - -> package.json - - { - dependencies: { - '@adonisjs/ace': '^4.0.8', - '@adonisjs/auth': '^2.0.11', - '@adonisjs/bodyparser': '^1.0.8', - '@adonisjs/cors': '^1.0.7', - '@adonisjs/fold': '^4.0.9', - '@adonisjs/framework': '^4.0.31', - '@adonisjs/ignitor': '^1.0.14', - '@adonisjs/lucid': '^4.1.3', - '@adonisjs/session': '^1.0.29', - '@adonisjs/shield': '^1.0.8', - 'cross-env': '^7.0.2', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'cross-env NODE_ENV=production node ./ace nuxtbuild', - dev: 'nodemon --watch app --watch bootstrap --watch config --watch .env -x node server.js', - generate: 'nuxt generate', - 'serve:dev': 'yarn dev', - start: 'cross-env NODE_ENV=production node server.js', - }, - } - -> Generated config/nuxt.js - - `const { resolve } = require('path')␊ - ␊ - module.exports = {␊ - mode: 'universal',␊ - dev: process.env.NODE_ENV === 'development',␊ - srcDir: resolve(__dirname, '..', 'resources'),␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: Express - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'server/index.js', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - 'cross-env': '^7.0.2', - express: '^4.17.1', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'nuxt build', - dev: 'cross-env NODE_ENV=development nodemon server/index.js --watch server', - generate: 'nuxt generate', - start: 'cross-env NODE_ENV=production node server/index.js', - }, - } - -> Generated nuxt.config.js - - `␊ - module.exports = {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: Fastify - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'server/index.js', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - 'cross-env': '^7.0.2', - fastify: '^2.13.1', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'nuxt build', - dev: 'cross-env NODE_ENV=development nodemon server/index.js --watch server', - generate: 'nuxt generate', - start: 'cross-env NODE_ENV=production node server/index.js', - }, - } - -> Generated nuxt.config.js - - `␊ - module.exports = {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: Feathers - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'server/config/default.json', - 'server/config/production.json', - 'server/index.js', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - '@feathersjs/configuration': '^2.0.6', - '@feathersjs/express': '^1.3.1', - '@feathersjs/feathers': '^3.3.1', - 'cross-env': '^7.0.2', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'nuxt build', - dev: 'cross-env NODE_ENV=development nodemon server/index.js --watch server', - generate: 'nuxt generate', - start: 'cross-env NODE_ENV=production node server/index.js', - }, - } - -> Generated nuxt.config.js - - `␊ - module.exports = {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: Koa - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'server/index.js', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - 'cross-env': '^7.0.2', - koa: '^2.11.0', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'nuxt build', - dev: 'cross-env NODE_ENV=development nodemon server/index.js --watch server', - generate: 'nuxt generate', - start: 'cross-env NODE_ENV=production node server/index.js', - }, - } - -> Generated nuxt.config.js - - `␊ - module.exports = {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: Micro - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'server/index.js', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - 'cross-env': '^7.0.2', - micro: '^9.3.4', - 'micro-route': '^2.5.0', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'nuxt build', - dev: 'cross-env NODE_ENV=development nodemon server/index.js --watch server', - generate: 'nuxt generate', - start: 'cross-env NODE_ENV=production node server/index.js', - }, - } - -> Generated nuxt.config.js - - `␊ - module.exports = {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: None (Recommended) - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - nuxt: '^2.12.2', - }, - devDependencies: {}, - private: true, - scripts: { - build: 'nuxt build', - dev: 'nuxt', - generate: 'nuxt generate', - start: 'nuxt start', - }, - } - -> Generated nuxt.config.js - - `␊ - export default {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - -## verify server: hapi - -> Generated files - - [ - '.editorconfig', - '.gitignore', - 'README.md', - 'assets/README.md', - 'components/Logo.vue', - 'components/README.md', - 'layouts/README.md', - 'layouts/default.vue', - 'middleware/README.md', - 'nuxt.config.js', - 'package.json', - 'pages/README.md', - 'pages/index.vue', - 'plugins/README.md', - 'server/index.js', - 'static/README.md', - 'static/favicon.ico', - 'store/README.md', - ] - -> package.json - - { - dependencies: { - '@hapi/hapi': '^18.3.1', - '@nuxtjs/hapi': '^2.3.0', - 'cross-env': '^7.0.2', - nuxt: '^2.12.2', - }, - devDependencies: { - nodemon: '^2.0.3', - }, - private: true, - scripts: { - build: 'nuxt build', - dev: 'cross-env NODE_ENV=development nodemon server/index.js --watch server', - generate: 'nuxt generate', - start: 'cross-env NODE_ENV=production node server/index.js', - }, - } - -> Generated nuxt.config.js - - `␊ - module.exports = {␊ - mode: 'universal',␊ - /*␊ - ** Headers of the page␊ - */␊ - head: {␊ - title: process.env.npm_package_name || '',␊ - meta: [␊ - { charset: 'utf-8' },␊ - { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊ - { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊ - ],␊ - link: [␊ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊ - ]␊ - },␊ - /*␊ - ** Customize the progress-bar color␊ - */␊ - loading: { color: '#fff' },␊ - /*␊ - ** Global CSS␊ - */␊ - css: [␊ - ],␊ - /*␊ - ** Plugins to load before mounting the App␊ - */␊ - plugins: [␊ - ],␊ - /*␊ - ** Nuxt.js dev-modules␊ - */␊ - buildModules: [␊ - ],␊ - /*␊ - ** Nuxt.js modules␊ - */␊ - modules: [␊ - ],␊ - /*␊ - ** Build configuration␊ - */␊ - build: {␊ - /*␊ - ** You can extend webpack config here␊ - */␊ - extend (config, ctx) {␊ - }␊ - }␊ - }␊ - ` - ## verify test: AVA > Generated files diff --git a/packages/create-nuxt-app/test/snapshots/index.test.js.snap b/packages/create-nuxt-app/test/snapshots/index.test.js.snap index 95f84b5c9de90f627baf8b0ae27ec899cf9611be..b3126cb8592fcaf54c71e1196524c22ebcfd1c49 100644 GIT binary patch literal 6696 zcmZWtWmFUZvsGyjknZku7m$?Lr8@)!q;u(58Ubk}m5^RoLOKM*C8U;65LmiFdI5Ki)a-&5wKL%+Hy*bI%=+F^Kh*hm98$;_1ukFGBd_(ch_u1+orOEHn8Rb}3D6 z#Vm>VkN!Kb4hjhJDf_<^w-$jxq_KK9s&NK~71Gj3r^byaN*X{xx`thdi{aZtrk+H)q~v z-Xh;LVQl9c((tamt*yQ4TIQimPWU&1qg6W~G<0qzjg%*dy2did;P+k^CLeRO^|ES` zsIp2^^01es9`SqOxrDh{o;U%uoi`K!~~5n`SJ0jl*wzgJm?=7jy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>>~-(@gRH93mlj_b_VwXpBB$>som2PGF}psV!^()1y>H&KnV zjmQ0Ps0yp*gy})$x)1-{W#7p6{LTHJzle z`BPo$e#7IZvQWolrmDmkS->^}zj?=0UN@}1@^bsouQ)2zt!IY`y@kA=5p(lptcx|96j6-CPV9=_JX=7ahvXCDPKrI&C?bs>c7ONw?h4B3HR zQ`}Q1$pwBLo>q2v{ph4j#cZ+DM*WkCu7*G3=XXxk4781e zWkIcP`fP#V|dAwnB zUTIoLh?gaLsW|YD=Tt75Jp1aUOdWxOAa~=*x!PjD(iexBPfK6U+Yg>zkUsl!P$HMU Ge)T^_vwdj* From 9377713a61222079ab636efa4c246801b5d36e24 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Wed, 29 Apr 2020 19:19:47 +0100 Subject: [PATCH 2/2] remove unused dep glob --- packages/create-nuxt-app/lib/saofile.js | 1 - packages/create-nuxt-app/package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/create-nuxt-app/lib/saofile.js b/packages/create-nuxt-app/lib/saofile.js index b5fd39c13..6e1cbc925 100644 --- a/packages/create-nuxt-app/lib/saofile.js +++ b/packages/create-nuxt-app/lib/saofile.js @@ -1,5 +1,4 @@ const { dirname, join, relative } = require('path') -const glob = require('glob') const spawn = require('cross-spawn') const validate = require('validate-npm-package-name') const pkg = require('./package') diff --git a/packages/create-nuxt-app/package.json b/packages/create-nuxt-app/package.json index 211d48991..bde194349 100644 --- a/packages/create-nuxt-app/package.json +++ b/packages/create-nuxt-app/package.json @@ -12,7 +12,6 @@ "cna-template": "^2.15.0", "cross-spawn": "^7.0.2", "envinfo": "^7.5.0", - "glob": "^7.1.6", "lodash": "^4.17.15", "sao": "^1.7.0", "validate-npm-package-name": "^3.0.0"