├── template ├── nuxt │ ├── store │ │ ├── index.js │ │ └── README.md │ ├── static │ │ ├── icon.png │ │ ├── favicon.ico │ │ ├── README.md │ │ └── logo.svg │ ├── components │ │ └── README.md │ ├── layouts │ │ ├── README.md │ │ └── default.vue │ ├── pages │ │ └── README.md │ ├── assets │ │ └── README.md │ ├── plugins │ │ └── README.md │ ├── middleware │ │ └── README.md │ └── nuxt.config.js ├── .env ├── frameworks │ ├── adonis │ │ ├── app │ │ │ ├── Models │ │ │ │ ├── Hooks │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── User.js │ │ │ │ ├── Token.js │ │ │ │ └── User.js │ │ │ ├── Controllers │ │ │ │ └── Http │ │ │ │ │ └── NuxtController.js │ │ │ └── Commands │ │ │ │ └── NuxtBuild.js │ │ ├── database │ │ │ ├── migrations │ │ │ │ └── .gitkeep │ │ │ └── factory.js │ │ ├── .env │ │ ├── .env.example │ │ ├── start │ │ │ ├── routes.js │ │ │ ├── kernel.js │ │ │ └── app.js │ │ ├── ace │ │ ├── providers │ │ │ └── NuxtProvider.js │ │ ├── server.js │ │ ├── README.md │ │ └── config │ │ │ ├── auth.js │ │ │ ├── database.js │ │ │ ├── cors.js │ │ │ ├── session.js │ │ │ ├── bodyParser.js │ │ │ ├── shield.js │ │ │ └── app.js │ ├── feathers │ │ └── server │ │ │ ├── config │ │ │ ├── default.json │ │ │ └── production.json │ │ │ └── index.js │ ├── vuesax │ │ ├── plugins │ │ │ └── vuesax.js │ │ ├── components │ │ │ └── VuesaxLogo.vue │ │ └── pages │ │ │ └── index.vue │ ├── ant-design-vue │ │ └── plugins │ │ │ └── antd-ui.js │ ├── vuetify │ │ ├── static │ │ │ ├── v.png │ │ │ └── vuetify-logo.svg │ │ ├── assets │ │ │ └── variables.scss │ │ ├── components │ │ │ ├── VuetifyLogo.vue │ │ │ └── Logo.vue │ │ ├── pages │ │ │ ├── inspire.vue │ │ │ └── index.vue │ │ └── layouts │ │ │ ├── error.vue │ │ │ └── default.vue │ ├── buefy │ │ ├── assets │ │ │ └── buefy.png │ │ ├── pages │ │ │ ├── inspire.vue │ │ │ └── index.vue │ │ ├── components │ │ │ └── Card.vue │ │ └── layouts │ │ │ └── default.vue │ ├── ava │ │ ├── e2e.config.js │ │ ├── unit.config.js │ │ ├── ava.config.cjs │ │ ├── test │ │ │ ├── specs │ │ │ │ └── Logo.spec.js │ │ │ ├── ava.setup.js │ │ │ ├── helpers │ │ │ │ └── ava.setup.js │ │ │ └── e2e │ │ │ │ ├── index.js │ │ │ │ └── index.spec.js │ │ ├── .babelrc │ │ └── ava.config.js │ ├── element-ui │ │ └── plugins │ │ │ └── element-ui.js │ ├── framevuerk │ │ ├── plugins │ │ │ └── framevuerk.js │ │ ├── framevuerk-config.js │ │ ├── layouts │ │ │ └── default.vue │ │ ├── components │ │ │ └── FramevuerkLogo.vue │ │ └── pages │ │ │ └── index.vue │ ├── iview │ │ ├── plugins │ │ │ └── iview.js │ │ └── pages │ │ │ └── index.vue │ ├── jest │ │ ├── test │ │ │ └── Logo.spec.js │ │ ├── .babelrc │ │ └── jest.config.js │ ├── hapi │ │ └── server │ │ │ └── index.js │ ├── express │ │ └── server │ │ │ └── index.js │ ├── fastify │ │ └── server │ │ │ └── index.js │ ├── micro │ │ └── server │ │ │ └── index.js │ └── koa │ │ └── server │ │ └── index.js ├── .prettierrc ├── _.prettierrc ├── _stylelint.config.js ├── .editorconfig ├── semantic.yml ├── _jsconfig.json ├── jsconfig.json ├── README.md ├── tsconfig.json ├── _.eslintrc.js ├── gitignore └── _package.json ├── .gitattributes ├── .github ├── semantic.yml ├── ci.yml └── workflows │ └── ci.yml ├── renovate.json ├── test ├── snapshots │ └── index.test.js.snap └── index.test.js ├── .eslintignore ├── .eslintrc ├── ava.config.js ├── .gitignore ├── .editorconfig ├── recommended.json ├── .circleci └── config.yml ├── LICENSE ├── package.json ├── cli.js ├── prompts.js ├── README.md ├── saofile.js └── CHANGELOG.md /template/nuxt/store/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /template/.env: -------------------------------------------------------------------------------- 1 | BASE_URL=http://localhost:3000 2 | -------------------------------------------------------------------------------- /template/frameworks/adonis/app/Models/Hooks/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /template/frameworks/adonis/database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- 1 | # Always validate the PR title 2 | titleOnly: true 3 | -------------------------------------------------------------------------------- /template/frameworks/feathers/server/config/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "localhost", 3 | "port": 3000 4 | } 5 | -------------------------------------------------------------------------------- /template/frameworks/vuesax/plugins/vuesax.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuesax from 'vuesax' 3 | 4 | Vue.use(Vuesax) 5 | -------------------------------------------------------------------------------- /template/nuxt/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TYPO3-Headless/create-nuxt-typo3/HEAD/template/nuxt/static/icon.png -------------------------------------------------------------------------------- /template/nuxt/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TYPO3-Headless/create-nuxt-typo3/HEAD/template/nuxt/static/favicon.ico -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@nuxtjs" 4 | ], 5 | "lockFileMaintenance": { 6 | "enabled": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /template/frameworks/feathers/server/config/production.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "with-featherjs-app.feathersjs.com", 3 | "port": 80 4 | } 5 | -------------------------------------------------------------------------------- /test/snapshots/index.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TYPO3-Headless/create-nuxt-typo3/HEAD/test/snapshots/index.test.js.snap -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | _*.js 2 | template/nuxt/pages/index.vue 3 | template/frameworks/iview/pages/index.vue 4 | template/frameworks/jest/jest.config.js 5 | -------------------------------------------------------------------------------- /template/frameworks/ant-design-vue/plugins/antd-ui.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Antd from 'ant-design-vue/lib' 3 | 4 | Vue.use(Antd) 5 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/static/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TYPO3-Headless/create-nuxt-typo3/HEAD/template/frameworks/vuetify/static/v.png -------------------------------------------------------------------------------- /template/frameworks/buefy/assets/buefy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TYPO3-Headless/create-nuxt-typo3/HEAD/template/frameworks/buefy/assets/buefy.png -------------------------------------------------------------------------------- /template/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | <%_ if (eslint) { _%> 4 | "arrowParens": "always", 5 | <%_ } _%> 6 | "singleQuote": true 7 | } 8 | -------------------------------------------------------------------------------- /template/_.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | <%_ if (eslint) { _%> 4 | "arrowParens": "always", 5 | <%_ } _%> 6 | "singleQuote": true 7 | } 8 | -------------------------------------------------------------------------------- /template/_stylelint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // add your custom config here 3 | // https://stylelint.io/user-guide/configuration 4 | rules: {} 5 | } 6 | -------------------------------------------------------------------------------- /template/frameworks/ava/e2e.config.js: -------------------------------------------------------------------------------- 1 | import baseConfig from './ava.config.js' 2 | 3 | export default { 4 | ...baseConfig, 5 | files: ['test/e2e/**/*'] 6 | } 7 | -------------------------------------------------------------------------------- /template/frameworks/ava/unit.config.js: -------------------------------------------------------------------------------- 1 | import baseConfig from './ava.config.js' 2 | 3 | export default { 4 | ...baseConfig, 5 | files: ['test/specs/**/*'] 6 | } 7 | -------------------------------------------------------------------------------- /template/frameworks/adonis/app/Models/Token.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Model = use('Model') 4 | 5 | class Token extends Model { 6 | } 7 | 8 | module.exports = Token 9 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@nuxtjs" 4 | ], 5 | "globals": { 6 | "use": true 7 | }, 8 | "rules": { 9 | "no-console": "off" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ava.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | ignoredByWatcher: ['!**/*.{js}'], 3 | files: ['./test/*.test.js', '!template'], 4 | tap: false, 5 | verbose: true, 6 | babel: true 7 | } 8 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/assets/variables.scss: -------------------------------------------------------------------------------- 1 | // Ref: https://github.com/nuxt-community/vuetify-module#customvariables 2 | // 3 | // The variables you want to modify 4 | // $font-size-root: 20px; 5 | -------------------------------------------------------------------------------- /template/frameworks/element-ui/plugins/element-ui.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Element from 'element-ui' 3 | import locale from 'element-ui/lib/locale/lang/en' 4 | 5 | Vue.use(Element, { locale }) 6 | -------------------------------------------------------------------------------- /template/frameworks/framevuerk/plugins/framevuerk.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Framevuerk from 'framevuerk/dist/framevuerk-nuxt.min.js' 3 | 4 | export default () => { 5 | Vue.use(Framevuerk) 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules 3 | 4 | # Logs 5 | npm-debug.log 6 | 7 | # Coverage 8 | coverage 9 | .nyc_output 10 | 11 | # Editors 12 | .vscode 13 | .idea 14 | 15 | # Misc 16 | .DS_Store 17 | -------------------------------------------------------------------------------- /template/frameworks/iview/plugins/iview.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import iView from 'iview' 3 | import locale from 'iview/dist/locale/en-US' // Change locale, check node_modules/iview/dist/locale 4 | 5 | Vue.use(iView, { 6 | locale 7 | }) 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /template/nuxt/components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | The components directory contains your Vue.js Components. 6 | 7 | _Nuxt.js doesn't supercharge these components._ 8 | -------------------------------------------------------------------------------- /template/frameworks/ava/ava.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | require: ['./test/helpers/ava.setup.js'], 4 | ignoredByWatcher: ['!**/*.{js,vue}'], 5 | babel: true, 6 | tap: true, 7 | verbose: true, 8 | color: true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /template/frameworks/ava/test/specs/Logo.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import test from 'ava' 3 | import Logo from '@/components/Logo.vue' 4 | 5 | test('is a Vue instance', (t) => { 6 | const wrapper = mount(Logo) 7 | t.is(wrapper.isVueInstance(), true) 8 | }) 9 | -------------------------------------------------------------------------------- /template/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /template/semantic.yml: -------------------------------------------------------------------------------- 1 | # Always validate the PR title AND all the commits 2 | titleAndCommits: true 3 | # Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") 4 | # this is only relevant when using commitsOnly: true (or titleAndCommits: true) 5 | allowMergeCommits: true 6 | -------------------------------------------------------------------------------- /template/frameworks/jest/test/Logo.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import Logo from '@/components/Logo.vue' 3 | 4 | describe('Logo', () => { 5 | test('is a Vue instance', () => { 6 | const wrapper = mount(Logo) 7 | expect(wrapper.isVueInstance()).toBeTruthy() 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /template/nuxt/layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Application Layouts. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts). 8 | -------------------------------------------------------------------------------- /template/frameworks/jest/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "test": { 4 | "presets": [ 5 | [ 6 | "@babel/preset-env", 7 | { 8 | "targets": { 9 | "node": "current" 10 | } 11 | } 12 | ] 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /template/nuxt/pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application. 5 | 6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing). 7 | -------------------------------------------------------------------------------- /template/nuxt/assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). 8 | -------------------------------------------------------------------------------- /template/frameworks/ava/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "test": { 4 | "plugins": [ 5 | [ 6 | "module-resolver", 7 | { 8 | "root": ["."], 9 | "alias": { 10 | "@": ".", 11 | "~": "." 12 | } 13 | } 14 | ] 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /template/nuxt/plugins/README.md: -------------------------------------------------------------------------------- 1 | # PLUGINS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins). 8 | -------------------------------------------------------------------------------- /template/frameworks/adonis/.env: -------------------------------------------------------------------------------- 1 | HOST=127.0.0.1 2 | PORT=3000 3 | NODE_ENV=development 4 | APP_URL=http://${HOST}:${PORT} 5 | 6 | CACHE_VIEWS=false 7 | 8 | APP_KEY=2wsjLSopTjD6WQEztTYIZgCFou8wpLJn 9 | 10 | DB_CONNECTION=sqlite 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_USER=root 14 | DB_PASSWORD= 15 | DB_DATABASE=adonis 16 | 17 | SESSION_DRIVER=cookie 18 | -------------------------------------------------------------------------------- /template/frameworks/adonis/.env.example: -------------------------------------------------------------------------------- 1 | HOST=127.0.0.1 2 | PORT=3000 3 | NODE_ENV=development 4 | APP_URL=http://${HOST}:${PORT} 5 | 6 | CACHE_VIEWS=false 7 | 8 | APP_KEY=2wsjLSopTjD6WQEztTYIZgCFou8wpLJn 9 | 10 | DB_CONNECTION=sqlite 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_USER=root 14 | DB_PASSWORD= 15 | DB_DATABASE=adonis 16 | 17 | SESSION_DRIVER=cookie 18 | -------------------------------------------------------------------------------- /template/nuxt/middleware/README.md: -------------------------------------------------------------------------------- 1 | # MIDDLEWARE 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your application middleware. 6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages. 7 | 8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware). 9 | -------------------------------------------------------------------------------- /template/_jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | <%_ if (server === 'adonis') { _%> 6 | "~/*": ["./resources/*"], 7 | "@/*": ["./resources/*"], 8 | <%_ } else { _%> 9 | "~/*": ["./*"], 10 | "@/*": ["./*"], 11 | <%_ } _%> 12 | "~~/*": ["./*"], 13 | "@@/*": ["./*"] 14 | } 15 | }, 16 | "exclude": ["node_modules", ".nuxt", "dist"] 17 | } 18 | -------------------------------------------------------------------------------- /template/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | <%_ if (server === 'adonis') { _%> 6 | "~/*": ["./resources/*"], 7 | "@/*": ["./resources/*"], 8 | <%_ } else { _%> 9 | "~/*": ["./*"], 10 | "@/*": ["./*"], 11 | <%_ } _%> 12 | "~~/*": ["./*"], 13 | "@@/*": ["./*"] 14 | } 15 | }, 16 | "exclude": ["node_modules", ".nuxt", "dist"] 17 | } 18 | -------------------------------------------------------------------------------- /template/frameworks/buefy/pages/inspire.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/components/VuetifyLogo.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 23 | -------------------------------------------------------------------------------- /template/nuxt/store/README.md: -------------------------------------------------------------------------------- 1 | # STORE 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Vuex Store files. 6 | Vuex Store option is implemented in the Nuxt.js framework. 7 | 8 | Creating a file in this directory automatically activates the option in the framework. 9 | 10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store). 11 | -------------------------------------------------------------------------------- /template/frameworks/ava/test/ava.setup.js: -------------------------------------------------------------------------------- 1 | require('browser-env')() 2 | const hooks = require('require-extension-hooks') 3 | const Vue = require('vue') 4 | 5 | Vue.config.productionTip = false 6 | 7 | // https://github.com/nuxt/create-nuxt-app/issues/180#issuecomment-463069941 8 | window.Date = global.Date = Date 9 | 10 | hooks('vue').plugin('vue').push() 11 | hooks(['vue', 'js']).exclude(({ filename }) => filename.match(/\/node_modules\//)).plugin('babel').push() 12 | -------------------------------------------------------------------------------- /template/frameworks/ava/test/helpers/ava.setup.js: -------------------------------------------------------------------------------- 1 | require('browser-env')() 2 | const hooks = require('require-extension-hooks') 3 | const Vue = require('vue') 4 | 5 | Vue.config.productionTip = false 6 | 7 | // https://github.com/nuxt/create-nuxt-app/issues/180#issuecomment-463069941 8 | window.Date = global.Date = Date 9 | 10 | hooks('vue').plugin('vue').push() 11 | hooks(['vue', 'js']).exclude(({ filename }) => filename.match(/\/node_modules\//)).plugin('babel').push() 12 | -------------------------------------------------------------------------------- /template/frameworks/adonis/app/Models/Hooks/User.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Hash = use('Hash') 4 | 5 | const UserHook = module.exports = {} 6 | 7 | /** 8 | * Hash using password as a hook. 9 | * 10 | * @method 11 | * 12 | * @param {Object} userInstance 13 | * 14 | * @return {void} 15 | */ 16 | UserHook.hashPassword = async (userInstance) => { 17 | if (userInstance.password) { 18 | userInstance.password = await Hash.make(userInstance.password) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /template/frameworks/ava/ava.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | require: ['./test/ava.setup.js'], 3 | sources: ['**/*.{js,vue}'], 4 | babel: { 5 | testOptions: { 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | root: ['.'], 11 | alias: { 12 | '@': '.', 13 | '~': '.' 14 | } 15 | } 16 | ] 17 | ] 18 | } 19 | }, 20 | tap: true, 21 | verbose: true 22 | } 23 | -------------------------------------------------------------------------------- /template/nuxt/static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your static files. 6 | Each file inside this directory is mapped to `/`. 7 | Thus you'd want to delete this README.md before deploying to production. 8 | 9 | Example: `/static/robots.txt` is mapped as `/robots.txt`. 10 | 11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static). 12 | -------------------------------------------------------------------------------- /template/README.md: -------------------------------------------------------------------------------- 1 | # <%= name %> 2 | 3 | > <%= description %> 4 | 5 | ## Build Setup 6 | 7 | ```bash 8 | # install dependencies 9 | $ <%= pm %> install 10 | 11 | # serve with hot reload at localhost:3000 12 | $ <%= pmRun %> dev 13 | 14 | # build for production and launch server 15 | $ <%= pmRun %> build 16 | $ <%= pmRun %> start 17 | 18 | # generate static project 19 | $ <%= pmRun %> generate 20 | ``` 21 | 22 | For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). 23 | -------------------------------------------------------------------------------- /template/frameworks/adonis/app/Controllers/Http/NuxtController.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | class NuxtController { 4 | constructor () { 5 | this.nuxt = use('Service/Nuxt') 6 | } 7 | 8 | async render ({ request: { request: req }, response: { response: res } }) { 9 | await new Promise((resolve, reject) => { 10 | this.nuxt.render(req, res, (promise) => { 11 | promise.then(resolve).catch(reject) 12 | }) 13 | }) 14 | } 15 | } 16 | 17 | module.exports = new NuxtController() 18 | -------------------------------------------------------------------------------- /recommended.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pwa-demo", 3 | "author": "TYPO3 PWA Initiative", 4 | "description": "TYPO3 PWA Demo Site", 5 | "pm": "yarn", 6 | "ui": "none", 7 | "server": "none", 8 | "language": "js", 9 | "features": ["pwa","typo","skin"], 10 | "linter": ["eslint","prettier"], 11 | "test": "jest", 12 | "mode": "universal", 13 | "devTools": "jsconfig.json", 14 | "api": "https://pwa-demo.ddev.site/api", 15 | "cert": "unsafe", 16 | "locales":["en","de"], 17 | "locale":["en"] 18 | } 19 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/pages/inspire.vue: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /template/frameworks/framevuerk/framevuerk-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'config-name': 'nuxt', 3 | direction: 'ltr', // or rtl 4 | 'primary-color': '#41b883', 5 | 'secondary-color': '#35495e', 6 | 'danger-color': '#BF2B2B', 7 | 'warning-color': '#BB8A2A', 8 | 'info-color': '#22A4C1', 9 | 'bg-color': '#333', 10 | 'header-bg-color': '#292929', 11 | 'sidebar-bg-color': '#313131', 12 | 'footer-bg-color': '#16212D', 13 | padding: '0.8em', 14 | 'transition-speed': '0.3s', 15 | 'border-radius': '0', 16 | 'shadow-size': '0' 17 | } 18 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/static/vuetify-logo.svg: -------------------------------------------------------------------------------- 1 | Artboard 46 2 | -------------------------------------------------------------------------------- /template/frameworks/adonis/start/routes.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Routes 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Http routes are entry points to your web application. You can create 9 | | routes for different URL's and bind Controller actions to them. 10 | | 11 | | A complete guide on routing is available here. 12 | | http://adonisjs.com/guides/routing 13 | | 14 | */ 15 | 16 | const Route = use('Route') 17 | 18 | Route.any('*', 'NuxtController.render') 19 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: circleci/node:latest 6 | steps: 7 | - checkout 8 | - restore_cache: 9 | key: dependency-cache-{{ checksum "yarn.lock" }} 10 | - run: 11 | name: install dependences 12 | command: yarn install 13 | - save_cache: 14 | key: dependency-cache-{{ checksum "yarn.lock" }} 15 | paths: 16 | - ./node_modules 17 | - run: 18 | name: lint 19 | command: yarn lint 20 | - run: 21 | name: test 22 | command: yarn test 23 | -------------------------------------------------------------------------------- /template/frameworks/adonis/database/factory.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Factory 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Factories are used to define blueprints for database tables or Lucid 9 | | models. Later you can use these blueprints to seed your database 10 | | with dummy data. 11 | | 12 | */ 13 | 14 | // const Factory = use('Factory') 15 | 16 | /** 17 | Factory.blueprint('App/Models/User', (faker) => { 18 | return { 19 | username: faker.username() 20 | } 21 | }) 22 | */ 23 | -------------------------------------------------------------------------------- /template/frameworks/hapi/server/index.js: -------------------------------------------------------------------------------- 1 | const consola = require('consola') 2 | const Hapi = require('@hapi/hapi') 3 | const HapiNuxt = require('@nuxtjs/hapi') 4 | 5 | async function start () { 6 | const server = new Hapi.Server({ 7 | host: process.env.HOST || '127.0.0.1', 8 | port: process.env.PORT || 3000 9 | }) 10 | 11 | await server.register({ 12 | plugin: HapiNuxt, 13 | options: {} 14 | }) 15 | 16 | await server.start() 17 | 18 | consola.ready({ 19 | message: `Server running at: ${server.info.uri}`, 20 | badge: true 21 | }) 22 | } 23 | 24 | process.on('unhandledRejection', error => consola.error(error)) 25 | 26 | start() 27 | -------------------------------------------------------------------------------- /template/frameworks/jest/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | moduleNameMapper: { 3 | '^@/(.*)$': '/$1', 4 | '^~/(.*)$': '/$1', 5 | '^vue$': 'vue/dist/vue.common.js' 6 | }, 7 | moduleFileExtensions: [ 8 | <%_ if (typescript) { _%> 9 | 'ts', 10 | <%_ } _%> 11 | 'js', 12 | 'vue', 13 | 'json' 14 | ], 15 | transform: { 16 | <%_ if (typescript) { _%> 17 | "^.+\\.ts$": "ts-jest", 18 | <%_ } _%> 19 | '^.+\\.js$': 'babel-jest', 20 | '.*\\.(vue)$': 'vue-jest' 21 | }, 22 | collectCoverage: true, 23 | collectCoverageFrom: [ 24 | '/components/**/*.vue', 25 | '/pages/**/*.vue' 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /template/frameworks/adonis/ace: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Ace Commands 6 | |-------------------------------------------------------------------------- 7 | | 8 | | The ace file is just a regular Javascript file but with no extension. You 9 | | can call `node ace` followed by the command name and it just works. 10 | | 11 | | Also you can use `adonis` followed by the command name, since the adonis 12 | | global proxy all the ace commands. 13 | | 14 | */ 15 | 16 | const { Ignitor } = require('@adonisjs/ignitor') 17 | 18 | new Ignitor(require('@adonisjs/fold')) 19 | .appRoot(__dirname) 20 | .fireAce() 21 | .catch(console.error) 22 | -------------------------------------------------------------------------------- /template/frameworks/adonis/providers/NuxtProvider.js: -------------------------------------------------------------------------------- 1 | const { ServiceProvider } = require('@adonisjs/fold') 2 | const { Nuxt, Builder } = require('nuxt<%= edge %>') 3 | 4 | class NuxtProvider extends ServiceProvider { 5 | register () { 6 | this.app.singleton('Service/Nuxt', () => { 7 | const config = this.app.use('Config').get('nuxt') 8 | return new Nuxt(config) 9 | }) 10 | } 11 | 12 | async boot () { 13 | const Helpers = this.app.use('Helpers') 14 | if (!Helpers.isAceCommand()) { 15 | const nuxt = this.app.use('Service/Nuxt') 16 | await nuxt.ready() 17 | if (nuxt.options.dev) { 18 | await new Builder(nuxt).build() 19 | } 20 | } 21 | } 22 | } 23 | 24 | module.exports = NuxtProvider 25 | -------------------------------------------------------------------------------- /template/frameworks/framevuerk/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 35 | -------------------------------------------------------------------------------- /template/frameworks/vuesax/components/VuesaxLogo.vue: -------------------------------------------------------------------------------- 1 | 6 | 16 | -------------------------------------------------------------------------------- /template/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "lib": [ 7 | "esnext", 8 | "esnext.asynciterable", 9 | "dom" 10 | ], 11 | "esModuleInterop": true, 12 | "allowJs": true, 13 | "sourceMap": true, 14 | "strict": true, 15 | "noEmit": true, 16 | "experimentalDecorators": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "~/*": [ 20 | "./*" 21 | ], 22 | "@/*": [ 23 | "./*" 24 | ] 25 | }, 26 | "types": [ 27 | "@types/node", 28 | "@nuxt/types", 29 | "nuxt-typo3", 30 | "nuxt-typo3-theme" 31 | ] 32 | }, 33 | "exclude": [ 34 | "node_modules", 35 | ".nuxt", 36 | "dist" 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /template/frameworks/adonis/app/Models/User.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Model = use('Model') 4 | 5 | class User extends Model { 6 | static boot () { 7 | super.boot() 8 | 9 | /** 10 | * A hook to bash the user password before saving 11 | * it to the database. 12 | * 13 | * Look at `app/Models/Hooks/User.js` file to 14 | * check the hashPassword method 15 | */ 16 | this.addHook('beforeSave', 'User.hashPassword') 17 | } 18 | 19 | /** 20 | * A relationship on tokens is required for auth to 21 | * work. Since features like `refreshTokens` or 22 | * `rememberToken` will be saved inside the 23 | * tokens table. 24 | * 25 | * @method tokens 26 | * 27 | * @return {Object} 28 | */ 29 | tokens () { 30 | return this.hasMany('App/Models/Token') 31 | } 32 | } 33 | 34 | module.exports = User 35 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/layouts/error.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 39 | 40 | 45 | -------------------------------------------------------------------------------- /template/_.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | browser: true, 5 | node: true 6 | }, 7 | <%_ if (server === 'adonis') { _%> 8 | globals: { 9 | use: true 10 | }, 11 | <%_ } _%> 12 | <%_ if (!typescript) { _%> 13 | parserOptions: { 14 | parser: 'babel-eslint' 15 | }, 16 | <%_ } _%> 17 | extends: [ 18 | <%_ if (typescript) { _%> 19 | '@nuxtjs/eslint-config-typescript', 20 | <%_ } else {_%> 21 | '@nuxtjs', 22 | <%_ } _%> 23 | <%_ if (prettier) { _%> 24 | 'prettier', 25 | 'prettier/vue', 26 | 'plugin:prettier/recommended', 27 | <%_ } _%> 28 | 'plugin:nuxt/recommended' 29 | ], 30 | <%_ if (prettier) { _%> 31 | plugins: [ 32 | 'prettier' 33 | ], 34 | <%_ } _%> 35 | // add your custom rules here 36 | rules: { 37 | <%_ if (!esm){ _%> 38 | 'nuxt/no-cjs-in-config': 'off' 39 | <%_ } _%> 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /template/frameworks/express/server/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const consola = require('consola') 3 | const { Nuxt, Builder } = require('nuxt<%= edge %>') 4 | const app = express() 5 | 6 | // Import and Set Nuxt.js options 7 | const config = require('../nuxt.config.js') 8 | config.dev = process.env.NODE_ENV !== 'production' 9 | 10 | async function start () { 11 | // Init Nuxt.js 12 | const nuxt = new Nuxt(config) 13 | 14 | const { host, port } = nuxt.options.server 15 | 16 | await nuxt.ready() 17 | // Build only in dev mode 18 | if (config.dev) { 19 | const builder = new Builder(nuxt) 20 | await builder.build() 21 | } 22 | 23 | // Give nuxt middleware to express 24 | app.use(nuxt.render) 25 | 26 | // Listen the server 27 | app.listen(port, host) 28 | consola.ready({ 29 | message: `Server listening on http://${host}:${port}`, 30 | badge: true 31 | }) 32 | } 33 | start() 34 | -------------------------------------------------------------------------------- /template/frameworks/fastify/server/index.js: -------------------------------------------------------------------------------- 1 | const { Nuxt, Builder } = require('nuxt<%= edge %>') 2 | const fastify = require('fastify')({ 3 | logger: true 4 | }) 5 | 6 | // Import and Set Nuxt.js options 7 | const config = require('../nuxt.config.js') 8 | config.dev = process.env.NODE_ENV !== 'production' 9 | 10 | async function start () { 11 | // Instantiate nuxt.js 12 | const nuxt = new Nuxt(config) 13 | 14 | const { 15 | host = process.env.HOST || '127.0.0.1', 16 | port = process.env.PORT || 3000 17 | } = nuxt.options.server 18 | 19 | await nuxt.ready() 20 | // Build only in dev mode 21 | if (config.dev) { 22 | const builder = new Builder(nuxt) 23 | await builder.build() 24 | } 25 | 26 | fastify.use(nuxt.render) 27 | 28 | fastify.listen(port, host, (err, address) => { 29 | if (err) { 30 | fastify.log.error(err) 31 | process.exit(1) 32 | } 33 | }) 34 | } 35 | 36 | start() 37 | -------------------------------------------------------------------------------- /template/frameworks/ava/test/e2e/index.js: -------------------------------------------------------------------------------- 1 | import { resolve } from 'path' 2 | import test from 'ava' 3 | import { Nuxt, Builder } from 'nuxt' 4 | 5 | // We keep the nuxt and server instance 6 | // So we can close them at the end of the test 7 | let nuxt = null 8 | 9 | // Init Nuxt.js and create a server listening on localhost:4000 10 | test.before(async () => { 11 | const config = { 12 | dev: false, 13 | rootDir: resolve(__dirname, '../../') 14 | } 15 | nuxt = new Nuxt(config) 16 | await new Builder(nuxt).build() 17 | await nuxt.server.listen(4000, 'localhost') 18 | }, 30000) 19 | 20 | // Example of testing only generated html 21 | test('Route / exits and render HTML', async (t) => { 22 | const { html } = await nuxt.renderRoute('/', {}) 23 | t.true(html.includes('Documentation')) 24 | }) 25 | 26 | // Close server and ask nuxt to stop listening to file changes 27 | test.after('Closing server and nuxt.js', (t) => { 28 | nuxt.close() 29 | }) 30 | -------------------------------------------------------------------------------- /template/frameworks/ava/test/e2e/index.spec.js: -------------------------------------------------------------------------------- 1 | import { resolve } from 'path' 2 | import test from 'ava' 3 | import { Nuxt, Builder } from 'nuxt' 4 | 5 | // We keep the nuxt and server instance 6 | // So we can close them at the end of the test 7 | let nuxt = null 8 | 9 | // Init Nuxt.js and create a server listening on localhost:4000 10 | test.before(async () => { 11 | const config = { 12 | dev: false, 13 | rootDir: resolve(__dirname, '../../') 14 | } 15 | nuxt = new Nuxt(config) 16 | await new Builder(nuxt).build() 17 | await nuxt.server.listen(4000, 'localhost') 18 | }, 30000) 19 | 20 | // Example of testing only generated html 21 | test('Route / exits and render HTML', async (t) => { 22 | const { html } = await nuxt.renderRoute('/', {}) 23 | t.true(html.includes('Documentation')) 24 | }) 25 | 26 | // Close server and ask nuxt to stop listening to file changes 27 | test.after('Closing server and nuxt.js', (t) => { 28 | nuxt.close() 29 | }) 30 | -------------------------------------------------------------------------------- /template/frameworks/adonis/server.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Http server 6 | |-------------------------------------------------------------------------- 7 | | 8 | | This file bootstrap Adonisjs to start the HTTP server. You are free to 9 | | customize the process of booting the http server. 10 | | 11 | | """ Loading ace commands """ 12 | | At times you may want to load ace commands when starting the HTTP server. 13 | | Same can be done by chaining `loadCommands()` method after 14 | | 15 | | """ Preloading files """ 16 | | Also you can preload files by calling `preLoad('path/to/file')` method. 17 | | Make sure to pass relative path from the project root. 18 | */ 19 | 20 | const { Ignitor } = require('@adonisjs/ignitor') 21 | 22 | new Ignitor(require('@adonisjs/fold')) 23 | .appRoot(__dirname) 24 | .fireHttpServer() 25 | .catch(console.error) // eslint-disable-line no-console 26 | -------------------------------------------------------------------------------- /template/frameworks/buefy/components/Card.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 43 | -------------------------------------------------------------------------------- /.github/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | ci: 13 | runs-on: ${{ matrix.os }} 14 | 15 | strategy: 16 | matrix: 17 | os: [ubuntu-latest, macos-latest, windows-latest] 18 | node: [10, 12] 19 | 20 | steps: 21 | - uses: actions/setup-node@v1 22 | with: 23 | node-version: ${{ matrix.node }} 24 | 25 | - name: checkout 26 | uses: actions/checkout@master 27 | 28 | - name: cache node_modules 29 | uses: actions/cache@v1 30 | with: 31 | path: node_modules 32 | key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} 33 | 34 | - name: install 35 | run: yarn --check-files --frozen-lockfile --non-interactive 36 | 37 | - name: lint 38 | run: yarn lint 39 | 40 | - name: test 41 | run: yarn test 42 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | ci: 13 | runs-on: ${{ matrix.os }} 14 | 15 | strategy: 16 | matrix: 17 | os: [ubuntu-latest, macos-latest, windows-latest] 18 | node: [10, 12] 19 | 20 | steps: 21 | - uses: actions/setup-node@v1 22 | with: 23 | node-version: ${{ matrix.node }} 24 | 25 | - name: checkout 26 | uses: actions/checkout@master 27 | 28 | - name: cache node_modules 29 | uses: actions/cache@v1 30 | with: 31 | path: node_modules 32 | key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} 33 | 34 | - name: install 35 | run: yarn --check-files --frozen-lockfile --non-interactive 36 | 37 | - name: lint 38 | run: yarn lint 39 | 40 | - name: test 41 | run: yarn test 42 | -------------------------------------------------------------------------------- /template/frameworks/micro/server/index.js: -------------------------------------------------------------------------------- 1 | const micro = require('micro') 2 | const consola = require('consola') 3 | const dispatch = require('micro-route/dispatch') 4 | const { Nuxt, Builder } = require('nuxt<%= edge %>') 5 | 6 | async function start () { 7 | // Require nuxt config 8 | const config = require('../nuxt.config.js') 9 | 10 | // Create a new nuxt instance 11 | const nuxt = new Nuxt(config) 12 | 13 | await nuxt.ready() 14 | // Enable live build & reloading on dev 15 | if (nuxt.options.dev) { 16 | await new Builder(nuxt).build() 17 | } 18 | 19 | const server = micro(async (req, res) => { 20 | await dispatch().dispatch('*', ['GET'], (req, res) => 21 | nuxt.render(req, res) 22 | )(req, res) 23 | }) 24 | 25 | const { 26 | host = process.env.HOST || '127.0.0.1', 27 | port = process.env.PORT || 3000 28 | } = nuxt.options.server 29 | 30 | // Listen the server 31 | server.listen(port, host) 32 | consola.ready({ 33 | message: `Server listening on http://${host}:${port}`, 34 | badge: true 35 | }) 36 | } 37 | 38 | start() 39 | -------------------------------------------------------------------------------- /template/frameworks/adonis/app/Commands/NuxtBuild.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { Command } = use('@adonisjs/ace') 4 | const { Builder } = require('nuxt<%= edge %>') 5 | 6 | class NuxtBuild extends Command { 7 | /** 8 | * signature defines the requirements and name 9 | * of command. 10 | * 11 | * @return {String} 12 | */ 13 | static get signature () { 14 | return 'nuxtbuild' 15 | } 16 | 17 | /** 18 | * description is the little helpful information displayed 19 | * on the console. 20 | * 21 | * @return {String} 22 | */ 23 | static get description () { 24 | return 'Build for production the nuxt.js application.' 25 | } 26 | 27 | /** 28 | * handle method is invoked automatically by ace, once your 29 | * command has been executed. 30 | * 31 | * @param {Object} args [description] 32 | * @param {Object} options [description] 33 | */ 34 | async handle (args, options) { 35 | const nuxt = use('Service/Nuxt') 36 | this.info('Building nuxt.js application...') 37 | await new Builder(nuxt).build() 38 | } 39 | } 40 | 41 | module.exports = NuxtBuild 42 | -------------------------------------------------------------------------------- /template/frameworks/feathers/server/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const consola = require('consola') 4 | const feathers = require('@feathersjs/feathers') 5 | const express = require('@feathersjs/express') 6 | 7 | process.env.NODE_CONFIG_DIR = path.join(__dirname, 'config/') 8 | 9 | async function start () { 10 | const app = express(feathers()) 11 | 12 | const { Nuxt, Builder } = require('nuxt<%= edge %>') 13 | 14 | // Setup nuxt.js 15 | const config = require('../nuxt.config.js') 16 | config.rootDir = path.resolve(__dirname, '..') 17 | config.dev = process.env.NODE_ENV !== 'production' 18 | 19 | const nuxt = new Nuxt(config) 20 | await nuxt.ready() 21 | if (config.dev) { 22 | const builder = new Builder(nuxt) 23 | await builder.build() 24 | } 25 | 26 | const configuration = require('@feathersjs/configuration') 27 | app.configure(configuration()).use(nuxt.render) 28 | 29 | const host = app.get('host') 30 | const port = app.get('port') 31 | 32 | app.listen(port) 33 | 34 | consola.ready({ 35 | message: `Feathers application started on ${host}:${port}`, 36 | badge: true 37 | }) 38 | } 39 | 40 | start() 41 | -------------------------------------------------------------------------------- /template/frameworks/koa/server/index.js: -------------------------------------------------------------------------------- 1 | const Koa = require('koa') 2 | const consola = require('consola') 3 | const { Nuxt, Builder } = require('nuxt<%= edge %>') 4 | 5 | const app = new Koa() 6 | 7 | // Import and Set Nuxt.js options 8 | const config = require('../nuxt.config.js') 9 | config.dev = app.env !== 'production' 10 | 11 | async function start () { 12 | // Instantiate nuxt.js 13 | const nuxt = new Nuxt(config) 14 | 15 | const { 16 | host = process.env.HOST || '127.0.0.1', 17 | port = process.env.PORT || 3000 18 | } = nuxt.options.server 19 | 20 | await nuxt.ready() 21 | // Build in development 22 | if (config.dev) { 23 | const builder = new Builder(nuxt) 24 | await builder.build() 25 | } 26 | 27 | app.use((ctx) => { 28 | ctx.status = 200 29 | ctx.respond = false // Bypass Koa's built-in response handling 30 | ctx.req.ctx = ctx // This might be useful later on, e.g. in nuxtServerInit or with nuxt-stash 31 | nuxt.render(ctx.req, ctx.res) 32 | }) 33 | 34 | app.listen(port, host) 35 | consola.ready({ 36 | message: `Server listening on http://${host}:${port}`, 37 | badge: true 38 | }) 39 | } 40 | 41 | start() 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Nuxt.js Team , @clarkdo & @egoist <0x142857@gmail.com> (https://egoist.moe) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /template/frameworks/buefy/pages/index.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 54 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-nuxt-typo3", 3 | "version": "0.7.0", 4 | "description": "Create a TYPO3 baed on Nuxt.js App in seconds.", 5 | "bin": "cli.js", 6 | "files": [ 7 | "cli.js", 8 | "prompts.js", 9 | "saofile.js", 10 | "template/" 11 | ], 12 | "repository": { 13 | "url": "git+https://github.com/TYPO3-Initiatives/create-nuxt-typo3", 14 | "type": "git" 15 | }, 16 | "scripts": { 17 | "lint": "eslint --ext .js,.mjs,.vue .", 18 | "test": "ava --verbose", 19 | "test:snapshot": "ava --verbose --update-snapshots", 20 | "release": "standard-version" 21 | }, 22 | "dependencies": { 23 | "cac": "^6.5.7", 24 | "chalk": "^2.4.2", 25 | "cross-spawn": "^7.0.1", 26 | "envinfo": "^7.5.0", 27 | "glob": "^7.1.6", 28 | "lodash": "^4.17.15", 29 | "sao": "^1.7.0", 30 | "superb": "^4.0.0", 31 | "validate-npm-package-name": "^3.0.0" 32 | }, 33 | "devDependencies": { 34 | "@nuxtjs/eslint-config": "^2.0.2", 35 | "@ava/babel": "^1.0.1", 36 | "ava": "^3.5.0", 37 | "eslint": "^6.8.0", 38 | "standard-version": "^7.1.0" 39 | }, 40 | "authors": [ 41 | "Egoist <0x142857@gmail.com>", 42 | "Nuxt team ", 43 | "Clark Du " 44 | ], 45 | "license": "MIT" 46 | } 47 | -------------------------------------------------------------------------------- /template/frameworks/iview/pages/index.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 34 | 35 | 64 | -------------------------------------------------------------------------------- /template/gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Node template 3 | # Logs 4 | /logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # TypeScript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | 62 | # parcel-bundler cache (https://parceljs.org/) 63 | .cache 64 | 65 | # next.js build output 66 | .next 67 | 68 | # nuxt.js build output 69 | .nuxt 70 | 71 | # Nuxt generate 72 | dist 73 | 74 | # vuepress build output 75 | .vuepress/dist 76 | 77 | # Serverless directories 78 | .serverless 79 | 80 | # IDE / Editor 81 | .idea 82 | 83 | # Service worker 84 | sw.* 85 | 86 | # macOS 87 | .DS_Store 88 | 89 | # Vim swap files 90 | *.swp 91 | -------------------------------------------------------------------------------- /template/frameworks/adonis/start/kernel.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Server = use('Server') 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Global Middleware 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Global middleware are executed on each http request only when the routes 11 | | match. 12 | | 13 | */ 14 | const globalMiddleware = [ 15 | 'Adonis/Middleware/BodyParser', 16 | 'Adonis/Middleware/Session', 17 | 'Adonis/Middleware/Shield', 18 | 'Adonis/Middleware/AuthInit' 19 | ] 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Named Middleware 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Named middleware is key/value object to conditionally add middleware on 27 | | specific routes or group of routes. 28 | | 29 | | // define 30 | | { 31 | | auth: 'Adonis/Middleware/Auth' 32 | | } 33 | | 34 | | // use 35 | | Route.get().middleware('auth') 36 | | 37 | */ 38 | const namedMiddleware = { 39 | auth: 'Adonis/Middleware/Auth' 40 | } 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Server Middleware 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Server levl middleware are executed even when route for a given URL is 48 | | not registered. Features like `static assets` and `cors` needs better 49 | | control over request lifecycle. 50 | | 51 | */ 52 | const serverMiddleware = [ 53 | 'Adonis/Middleware/Static', 54 | 'Adonis/Middleware/Cors' 55 | ] 56 | 57 | Server 58 | .registerGlobal(globalMiddleware) 59 | .registerNamed(namedMiddleware) 60 | .use(serverMiddleware) 61 | -------------------------------------------------------------------------------- /template/frameworks/buefy/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 75 | -------------------------------------------------------------------------------- /test/index.test.js: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import test from 'ava' 3 | import sao from 'sao' 4 | import saoConfig from '../saofile' 5 | 6 | const generator = path.join(__dirname, '..') 7 | 8 | const getPkgFields = (pkg) => { 9 | pkg = JSON.parse(pkg) 10 | delete pkg.name 11 | delete pkg.author 12 | delete pkg.version 13 | delete pkg.description 14 | return pkg 15 | } 16 | 17 | const normalizeNewlines = 18 | string => string.replace(/\r\n/g, '\n') 19 | 20 | const verifyFileList = async (t, answers = {}) => { 21 | const stream = await sao.mock({ generator }, answers) 22 | t.snapshot(stream.fileList, 'Generated files') 23 | } 24 | 25 | const verifyPkg = async (t, answers = {}) => { 26 | const stream = await sao.mock({ generator }, answers) 27 | const pkg = await stream.readFile('package.json') 28 | t.snapshot(getPkgFields(pkg), 'package.json') 29 | } 30 | 31 | const verifyNuxtConfig = async (t, answers = {}) => { 32 | const stream = await sao.mock({ generator }, answers) 33 | const configFile = answers.server === 'adonis' ? 'config/nuxt.js' : 'nuxt.config.js' 34 | const config = await stream.readFile(configFile) 35 | t.snapshot(normalizeNewlines(config), `Generated ${configFile}`) 36 | } 37 | 38 | test('verify default answers', async (t) => { 39 | await verifyFileList(t) 40 | await verifyPkg(t) 41 | await verifyNuxtConfig(t) 42 | }) 43 | 44 | for (const prompt of saoConfig.prompts) { 45 | if (Array.isArray(prompt.choices)) { 46 | for (const choice of prompt.choices) { 47 | test(`verify ${prompt.name}: ${choice.name}`, async (t) => { 48 | const answer = { [prompt.name]: prompt.type === 'checkbox' ? [choice.value] : choice.value } 49 | await verifyFileList(t, answer) 50 | await verifyPkg(t, answer) 51 | await verifyNuxtConfig(t, answer) 52 | }) 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/components/Logo.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 80 | -------------------------------------------------------------------------------- /cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const path = require('path') 3 | const sao = require('sao') 4 | const cac = require('cac') 5 | const chalk = require('chalk') 6 | const envinfo = require('envinfo') 7 | const { version } = require('./package.json') 8 | 9 | const generator = path.resolve(__dirname, './') 10 | 11 | const cli = cac('create-nuxt-typo3') 12 | 13 | const showEnvInfo = async () => { 14 | console.log(chalk.bold('\nEnvironment Info:')) 15 | const result = await envinfo 16 | .run({ 17 | System: ['OS', 'CPU'], 18 | Binaries: ['Node', 'Yarn', 'npm'], 19 | Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'], 20 | npmGlobalPackages: ['nuxt', 'create-typo3-nuxt-app'] 21 | }) 22 | console.log(result) 23 | process.exit(1) 24 | } 25 | 26 | cli 27 | .command('[out-dir]', 'Generate in a custom directory or current directory') 28 | .option('-e, --edge', 'To install `nuxt-edge` instead of `nuxt`') 29 | .option('-i, --info', 'Print out debugging information relating to the local environment') 30 | .option('--answers ', 'Skip all the prompts and use the provided answers') 31 | .option('--verbose', 'Show debug logs') 32 | .action((outDir = '.', cliOptions) => { 33 | if (cliOptions.info) { 34 | return showEnvInfo() 35 | } 36 | console.log() 37 | console.log(chalk`{cyan create-nuxt-typo3 v${version}}`) 38 | console.log(chalk`✨ Generating TYPO3 PWA based on Nuxt.js project in {cyan ${outDir}}`) 39 | 40 | const { verbose, answers } = cliOptions 41 | const logLevel = verbose ? 4 : 2 42 | // See https://saojs.org/api.html#standalone-cli 43 | sao({ generator, outDir, logLevel, answers, cliOptions }) 44 | .run() 45 | .catch((err) => { 46 | console.trace(err) 47 | process.exit(1) 48 | }) 49 | }) 50 | 51 | cli.help() 52 | 53 | cli.version(version) 54 | 55 | cli.parse() 56 | -------------------------------------------------------------------------------- /template/frameworks/adonis/README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | # AdoNuxt 4 | 5 | > [AdonisJS](http://adonisjs.com/) + [Nuxt.js](https://nuxtjs.org) = :fire: 6 | 7 | ## Installation 8 | 9 | This is a project template for [adonis-cli](https://github.com/adonisjs/adonis-cli). 10 | 11 | ```bash 12 | adonis new --blueprint nuxt-community/adonuxt-template 13 | ``` 14 | 15 | > Make sure to use a version of adonis-cli >= 2.1.8 (`adonis --version`). 16 | 17 | ## Usage 18 | 19 | | Command | Description | 20 | |---------|-------------| 21 | | npm run dev | Start AdonisJS server in development with Nuxt.js in dev mode (hot reloading). Listen on [http://localhost:3000](http://localhost:3000). | 22 | | npm run build | Build your nuxt.js web application for production. | 23 | | npm start | Start AdonisJS server in production. | 24 | | npm lint | Lint your code with [ESLint](http://eslint.org) and [Standard](http://standardjs.com). | 25 | 26 | ## Features 27 | 28 | See [AdonisJS features](http://adonisjs.com/docs/3.2/overview) and [Nuxt.js features](https://nuxtjs.org/guide/#features). 29 | 30 | ## AdonisJS Changes 31 | 32 | - No more `public` directory, use `resources/static/` instead. 33 | - No more `resources/views` directory. 34 | 35 | ## Nuxt.js Changes 36 | 37 | - The `nuxt.config.js` file is now in `config/nuxt.js`. 38 | - The Nuxt project directory is `resources`. 39 | 40 | ## Live Demo 41 | 42 | [https://ado.nuxtjs.org](https://ado.nuxtjs.org) 43 | 44 | *This demo has been deployed to [now.sh](https://zeit.co/now/) with the single command: `now`* 45 | 46 | ## Documentation 47 | 48 | - [AdonisJS](http://adonisjs.com/docs/) 49 | - [Nuxt.js](https://nuxtjs.org/guide/) 50 | - [Vue.js](http://vuejs.org/guide/) 51 | 52 | ## Licenses 53 | 54 | - [AdonisJS license](https://github.com/adonisjs/adonis-framework/blob/develop/LICENSE.txt) 55 | - [NuxtJS license](https://github.com/nuxt/nuxt.js/blob/master/LICENSE.md) 56 | - [VueJS license](https://github.com/vuejs/vue/blob/master/LICENSE) 57 | -------------------------------------------------------------------------------- /template/frameworks/adonis/start/app.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Providers 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Providers are building blocks for your Adonis app. Anytime you install 11 | | a new Adonis specific package, chances are you will register the 12 | | provider here. 13 | | 14 | */ 15 | const providers = [ 16 | '@adonisjs/framework/providers/AppProvider', 17 | '@adonisjs/framework/providers/ViewProvider', 18 | '@adonisjs/lucid/providers/LucidProvider', 19 | '@adonisjs/bodyparser/providers/BodyParserProvider', 20 | '@adonisjs/cors/providers/CorsProvider', 21 | '@adonisjs/shield/providers/ShieldProvider', 22 | '@adonisjs/session/providers/SessionProvider', 23 | '@adonisjs/auth/providers/AuthProvider', 24 | path.join(__dirname, '..', 'providers', 'NuxtProvider') 25 | ] 26 | 27 | /* 28 | |-------------------------------------------------------------------------- 29 | | Ace Providers 30 | |-------------------------------------------------------------------------- 31 | | 32 | | Ace providers are required only when running ace commands. For example 33 | | Providers for migrations, tests etc. 34 | | 35 | */ 36 | const aceProviders = [ 37 | '@adonisjs/lucid/providers/MigrationsProvider' 38 | ] 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Aliases 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Aliases are short unique names for IoC container bindings. You are free 46 | | to create your own aliases. 47 | | 48 | | For example: 49 | | { Route: 'Adonis/Src/Route' } 50 | | 51 | */ 52 | const aliases = {} 53 | 54 | /* 55 | |-------------------------------------------------------------------------- 56 | | Commands 57 | |-------------------------------------------------------------------------- 58 | | 59 | | Here you store ace commands for your package 60 | | 61 | */ 62 | const commands = [ 63 | 'App/Commands/NuxtBuild' 64 | ] 65 | 66 | module.exports = { providers, aceProviders, aliases, commands } 67 | -------------------------------------------------------------------------------- /template/frameworks/framevuerk/components/FramevuerkLogo.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 43 | 44 | 76 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/auth.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | /* 5 | |-------------------------------------------------------------------------- 6 | | Authenticator 7 | |-------------------------------------------------------------------------- 8 | | 9 | | Authentication is a combination of serializer and scheme with extra 10 | | config to define on how to authenticate a user. 11 | | 12 | | Available Schemes - basic, session, jwt, api 13 | | Available Serializers - lucid, database 14 | | 15 | */ 16 | authenticator: 'session', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Session 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Session authenticator makes use of sessions to authenticate a user. 24 | | Session authentication is always persistent. 25 | | 26 | */ 27 | session: { 28 | serializer: 'lucid', 29 | model: 'App/Models/User', 30 | scheme: 'session', 31 | uid: 'email', 32 | password: 'password' 33 | }, 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Basic Auth 38 | |-------------------------------------------------------------------------- 39 | | 40 | | The basic auth authenticator uses basic auth header to authenticate a 41 | | user. 42 | | 43 | | NOTE: 44 | | This scheme is not persistent and users are supposed to pass 45 | | login credentials on each request. 46 | | 47 | */ 48 | basic: { 49 | serializer: 'lucid', 50 | model: 'App/Models/User', 51 | scheme: 'basic', 52 | uid: 'email', 53 | password: 'password' 54 | }, 55 | 56 | /* 57 | |-------------------------------------------------------------------------- 58 | | Jwt 59 | |-------------------------------------------------------------------------- 60 | | 61 | | The jwt authenticator works by passing a jwt token on each HTTP request 62 | | via HTTP `Authorization` header. 63 | | 64 | */ 65 | jwt: { 66 | serializer: 'lucid', 67 | model: 'App/Models/User', 68 | scheme: 'jwt', 69 | uid: 'email', 70 | password: 'password', 71 | options: { 72 | secret: 'self::app.appKey' 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/database.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Env = use('Env') 4 | const Helpers = use('Helpers') 5 | 6 | module.exports = { 7 | /* 8 | |-------------------------------------------------------------------------- 9 | | Default Connection 10 | |-------------------------------------------------------------------------- 11 | | 12 | | Connection defines the default connection settings to be used while 13 | | interacting with SQL databases. 14 | | 15 | */ 16 | connection: Env.get('DB_CONNECTION', 'sqlite'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Sqlite 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Sqlite is a flat file database and can be good choice under development 24 | | environment. 25 | | 26 | | npm i --save sqlite3 27 | | 28 | */ 29 | sqlite: { 30 | client: 'sqlite3', 31 | connection: { 32 | filename: Helpers.databasePath('development.sqlite') 33 | }, 34 | useNullAsDefault: true 35 | }, 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | MySQL 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Here we define connection settings for MySQL database. 43 | | 44 | | npm i --save mysql 45 | | 46 | */ 47 | mysql: { 48 | client: 'mysql', 49 | connection: { 50 | host: Env.get('DB_HOST', 'localhost'), 51 | port: Env.get('DB_PORT', ''), 52 | user: Env.get('DB_USER', 'root'), 53 | password: Env.get('DB_PASSWORD', ''), 54 | database: Env.get('DB_DATABASE', 'adonis') 55 | } 56 | }, 57 | 58 | /* 59 | |-------------------------------------------------------------------------- 60 | | PostgreSQL 61 | |-------------------------------------------------------------------------- 62 | | 63 | | Here we define connection settings for PostgreSQL database. 64 | | 65 | | npm i --save pg 66 | | 67 | */ 68 | pg: { 69 | client: 'pg', 70 | connection: { 71 | host: Env.get('DB_HOST', 'localhost'), 72 | port: Env.get('DB_PORT', ''), 73 | user: Env.get('DB_USER', 'root'), 74 | password: Env.get('DB_PASSWORD', ''), 75 | database: Env.get('DB_DATABASE', 'adonis') 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /template/nuxt/layouts/default.vue: -------------------------------------------------------------------------------- 1 | <%_ if (skin) { _%> 2 | 9 | 13 | <%_ } else { _%> 14 | 36 | 46 | 103 | <%_ } _%> 104 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/pages/index.vue: -------------------------------------------------------------------------------- 1 | 81 | 82 | 93 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/cors.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | /* 5 | |-------------------------------------------------------------------------- 6 | | Origin 7 | |-------------------------------------------------------------------------- 8 | | 9 | | Set a list of origins to be allowed. The value can be one of the following 10 | | 11 | | Boolean: true - Allow current request origin 12 | | Boolean: false - Disallow all 13 | | String - Comma seperated list of allowed origins 14 | | Array - An array of allowed origins 15 | | String: * - A wildcard to allow current request origin 16 | | Function - Receives the current origin and should return one of the above values. 17 | | 18 | */ 19 | origin: false, 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Methods 24 | |-------------------------------------------------------------------------- 25 | | 26 | | HTTP methods to be allowed. The value can be one of the following 27 | | 28 | | String - Comma seperated list of allowed methods 29 | | Array - An array of allowed methods 30 | | 31 | */ 32 | methods: ['GET', 'PUT', 'POST'], 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | Headers 37 | |-------------------------------------------------------------------------- 38 | | 39 | | List of headers to be allowed via Access-Control-Request-Headers header. 40 | | The value can be on of the following. 41 | | 42 | | Boolean: true - Allow current request headers 43 | | Boolean: false - Disallow all 44 | | String - Comma seperated list of allowed headers 45 | | Array - An array of allowed headers 46 | | String: * - A wildcard to allow current request headers 47 | | Function - Receives the current header and should return one of the above values. 48 | | 49 | */ 50 | headers: true, 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Expose Headers 55 | |-------------------------------------------------------------------------- 56 | | 57 | | A list of headers to be exposed via `Access-Control-Expose-Headers` 58 | | header. The value can be on of the following. 59 | | 60 | | Boolean: false - Disallow all 61 | | String: Comma seperated list of allowed headers 62 | | Array - An array of allowed headers 63 | | 64 | */ 65 | exposeHeaders: false, 66 | 67 | /* 68 | |-------------------------------------------------------------------------- 69 | | Credentials 70 | |-------------------------------------------------------------------------- 71 | | 72 | | Define Access-Control-Allow-Credentials header. It should always be a 73 | | boolean. 74 | | 75 | */ 76 | credentials: false, 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | MaxAge 81 | |-------------------------------------------------------------------------- 82 | | 83 | | Define Access-Control-Allow-Max-Age 84 | | 85 | */ 86 | maxAge: 90 87 | } 88 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/session.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Env = use('Env') 4 | 5 | module.exports = { 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | Session Driver 9 | |-------------------------------------------------------------------------- 10 | | 11 | | The session driver to be used for storing session values. It can be 12 | | cookie, file or redis. 13 | | 14 | | For `redis` driver, make sure to install and register `@adonisjs/redis` 15 | | 16 | */ 17 | driver: Env.get('SESSION_DRIVER', 'cookie'), 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Cookie Name 22 | |-------------------------------------------------------------------------- 23 | | 24 | | The name of the cookie to be used for saving session id. Session ids 25 | | are signed and encrypted. 26 | | 27 | */ 28 | cookieName: 'adonis-session', 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Clear session when browser closes 33 | |-------------------------------------------------------------------------- 34 | | 35 | | If this value is true, the session cookie will be temporary and will be 36 | | removed when browser closes. 37 | | 38 | */ 39 | clearWithBrowser: true, 40 | 41 | /* 42 | |-------------------------------------------------------------------------- 43 | | Session age 44 | |-------------------------------------------------------------------------- 45 | | 46 | | This value is only used when `clearWithBrowser` is set to false. The 47 | | age must be a valid https://npmjs.org/package/ms string or should 48 | | be in milliseconds. 49 | | 50 | | Valid values are: 51 | | '2h', '10d', '5y', '2.5 hrs' 52 | | 53 | */ 54 | age: '2h', 55 | 56 | /* 57 | |-------------------------------------------------------------------------- 58 | | Cookie options 59 | |-------------------------------------------------------------------------- 60 | | 61 | | Cookie options defines the options to be used for setting up session 62 | | cookie 63 | | 64 | */ 65 | cookie: { 66 | httpOnly: true, 67 | sameSite: true, 68 | path: '/' 69 | }, 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Sessions location 74 | |-------------------------------------------------------------------------- 75 | | 76 | | If driver is set to file, we need to define the relative location from 77 | | the temporary path or absolute url to any location. 78 | | 79 | */ 80 | file: { 81 | location: 'sessions' 82 | }, 83 | 84 | /* 85 | |-------------------------------------------------------------------------- 86 | | Redis config 87 | |-------------------------------------------------------------------------- 88 | | 89 | | The configuration for the redis driver. By default we reference it from 90 | | the redis file. But you are free to define an object here too. 91 | | 92 | */ 93 | redis: 'self::redis.local' 94 | } 95 | -------------------------------------------------------------------------------- /template/frameworks/vuetify/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 118 | -------------------------------------------------------------------------------- /template/frameworks/vuesax/pages/index.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 75 | 76 | 135 | -------------------------------------------------------------------------------- /prompts.js: -------------------------------------------------------------------------------- 1 | const { random } = require('superb') 2 | 3 | module.exports = [ 4 | { 5 | name: 'name', 6 | message: 'Project name', 7 | default: '{outFolder}' 8 | }, 9 | { 10 | name: 'description', 11 | message: 'Project description', 12 | default: `My ${random()} TYPO3 Nuxt.js project` 13 | }, 14 | { 15 | name: 'author', 16 | type: 'string', 17 | message: 'Author name', 18 | default: '{gitUser.name}', 19 | store: true 20 | }, 21 | { 22 | name: 'language', 23 | message: 'Choose programming language', 24 | choices: [ 25 | { name: 'JavaScript', value: 'js' }, 26 | { name: 'TypeScript', value: 'ts' } 27 | ], 28 | type: 'list', 29 | default: 'js' 30 | }, 31 | { 32 | name: 'pm', 33 | message: 'Choose the package manager', 34 | choices: [ 35 | { name: 'Yarn', value: 'yarn' }, 36 | { name: 'Npm', value: 'npm' } 37 | ], 38 | type: 'list', 39 | default: 'yarn' 40 | }, 41 | { 42 | name: 'ui', 43 | message: 'Choose UI framework', 44 | type: 'list', 45 | pageSize: 15, 46 | choices: [ 47 | { name: 'None', value: 'none' }, 48 | { name: 'Ant Design Vue', value: 'ant-design-vue' }, 49 | { name: 'Bootstrap Vue', value: 'bootstrap' }, 50 | { name: 'Buefy', value: 'buefy' }, 51 | { name: 'Bulma', value: 'bulma' }, 52 | { name: 'Element', value: 'element-ui' }, 53 | { name: 'Framevuerk', value: 'framevuerk' }, 54 | { name: 'iView', value: 'iview' }, 55 | { name: 'Tachyons', value: 'tachyons' }, 56 | { name: 'Tailwind CSS', value: 'tailwind' }, 57 | { name: 'Vuesax', value: 'vuesax' }, 58 | { name: 'Vuetify.js', value: 'vuetify' } 59 | ], 60 | default: 'none' 61 | }, 62 | { 63 | name: 'server', 64 | message: 'Choose custom server framework', 65 | type: 'list', 66 | pageSize: 10, 67 | choices: [ 68 | { name: 'None (Recommended)', value: 'none' }, 69 | { name: 'AdonisJs', value: 'adonis' }, 70 | { name: 'Express', value: 'express' }, 71 | { name: 'Fastify', value: 'fastify' }, 72 | { name: 'Feathers', value: 'feathers' }, 73 | { name: 'hapi', value: 'hapi' }, 74 | { name: 'Koa', value: 'koa' }, 75 | { name: 'Micro', value: 'micro' } 76 | ], 77 | default: 'none' 78 | }, 79 | { 80 | name: 'runtime', 81 | message: 'Choose the runtime for TypeScript', 82 | type: 'list', 83 | choices: [ 84 | { name: 'Default', value: 'none' }, 85 | { name: '@nuxt/typescript-runtime', value: 'ts-runtime' } 86 | ], 87 | when: answers => answers.language === 'ts' && answers.server === 'none' 88 | }, 89 | { 90 | name: 'features', 91 | message: 'Choose Nuxt.js modules', 92 | type: 'checkbox', 93 | pageSize: 10, 94 | choices: [ 95 | { name: 'TYPO3', value: 'typo' }, 96 | { name: 'TYPO3 Tailwind', value: 'skin' }, 97 | { name: 'Axios', value: 'axios' }, 98 | { name: 'Progressive Web App (PWA) Support', value: 'pwa' }, 99 | { name: 'DotEnv', value: 'dotenv' } 100 | ], 101 | default: ['typo', 'skin', 'pwa'] 102 | }, 103 | { 104 | name: 'api', 105 | message: 'Your TYPO3 API url', 106 | type: String, 107 | default: 'https://api.t3pwa.com' 108 | }, 109 | { 110 | name: 'linter', 111 | message: 'Choose linting tools', 112 | type: 'checkbox', 113 | pageSize: 10, 114 | choices: [ 115 | { name: 'ESLint', value: 'eslint' }, 116 | { name: 'Prettier', value: 'prettier' }, 117 | { name: 'Lint staged files', value: 'lintStaged' }, 118 | { name: 'StyleLint', value: 'stylelint' } 119 | ], 120 | default: [] 121 | }, 122 | { 123 | name: 'test', 124 | message: 'Choose test framework', 125 | type: 'list', 126 | choices: [ 127 | { name: 'None', value: 'none' }, 128 | { name: 'Jest', value: 'jest' }, 129 | { name: 'AVA', value: 'ava' } 130 | ], 131 | default: 'none' 132 | }, 133 | { 134 | name: 'mode', 135 | message: 'Choose rendering mode', 136 | type: 'list', 137 | choices: [ 138 | { name: 'Universal (SSR)', value: 'universal' }, 139 | { name: 'Single Page App', value: 'spa' } 140 | ], 141 | default: 'universal' 142 | }, 143 | { 144 | name: 'devTools', 145 | message: 'Choose development tools', 146 | type: 'checkbox', 147 | choices: [ 148 | { name: 'jsconfig.json (Recommended for VS Code)', value: 'jsconfig.json' }, 149 | { name: 'Semantic Pull Requests', value: 'semantic-pull-requests' } 150 | ], 151 | default: [] 152 | } 153 | ] 154 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Create TYPO3 Nuxt App 2 | 3 | [![NPM version](https://img.shields.io/npm/v/create-nuxt-typo3-app.svg?style=flat)](https://npmjs.com/package/create-nuxt-typo3-app) 4 | [![NPM downloads](https://img.shields.io/npm/dm/create-nuxt-typo3-app.svg?style=flat)](https://npmjs.com/package/create-nuxt-typo3-app) 5 | [![CircleCI](https://img.shields.io/circleci/project/github/nuxt/create-nuxt-typo3-app/master.svg?style=flat)](https://circleci.com/gh/nuxt/create-nuxt-typo3-app/master) 6 | 7 | > Create a [Nuxt.js](https://github.com/nuxt/nuxt.js) project in seconds 8 | 9 | This is a fork of [create-nuxt-app](https://www.npmjs.com/package/create-nuxt-app) 10 | 11 |
Preview 12 | 13 | ![preview](https://ooo.0o0.ooo/2017/08/05/5984b16ed9749.gif) 14 |
15 | 16 | ## Usage 17 | 18 | Make sure you have [npx](https://www.npmjs.com/package/npx) installed (`npx` is shipped by default since [npm](https://www.npmjs.com/get-npm) `5.2.0`) 19 | 20 | ```bash 21 | npx create-nuxt-typo3 22 | ``` 23 | 24 | Or starting with npm v6.1 you can do: 25 | 26 | ```bash 27 | npm init nuxt-typo3 28 | ``` 29 | 30 | Or with [yarn](https://yarnpkg.com/en/): 31 | 32 | ```bash 33 | yarn create nuxt-typo3 34 | ``` 35 | 36 | ## Features :tada: 37 | 38 | 1. Choose the package manager 39 | - Yarn 40 | - Npm 41 | 1. Choose programming language 42 | - JavaScript 43 | - TypeScript 44 | 1. Choose your favorite UI framework: 45 | - None (feel free to add one later) 46 | - [Ant Design Vue](https://github.com/vueComponent/ant-design-vue) 47 | - [Bootstrap](https://github.com/bootstrap-vue/bootstrap-vue) 48 | - [Buefy](https://buefy.github.io) 49 | - [Bulma](https://github.com/jgthms/bulma) 50 | - [Element](https://github.com/ElemeFE/element) 51 | - [Framevuerk](https://github.com/framevuerk/framevuerk) 52 | - [iView](https://www.iviewui.com/) 53 | - [Tachyons](https://github.com/tachyons-css/tachyons) 54 | - [Tailwind CSS](https://github.com/tailwindcss/tailwindcss) 55 | - [Vuetify](https://github.com/vuetifyjs/vuetify) 56 | 3. Choose between integrated server-side frameworks: 57 | - None (Nuxt default server) 58 | - [Adonis](https://github.com/adonisjs/adonis-framework) 59 | - [Express](https://github.com/expressjs/express) 60 | - [Fastify](https://github.com/fastify/fastify) 61 | - [Feathers](https://github.com/feathersjs/feathers) 62 | - [Hapi](https://github.com/hapijs/hapi) 63 | - [Koa](https://github.com/koajs/koa) 64 | - [Micro](https://github.com/zeit/micro) 65 | 1. Choose the runtime for TypeScript (if you choose TypeScript) 66 | - Default 67 | - [@nuxt/typescript-runtime](https://github.com/nuxt/typescript) 68 | 1. Choose Nuxt.js modules: 69 | - [Nuxt-typo3](https://github.com/TYPO3-Initiatives/nuxt-typo3) 70 | - [Axios](https://github.com/nuxt-community/axios-module) 71 | - [Progressive Web App (PWA) Support](https://github.com/nuxt-community/pwa-module) 72 | 5. Choose linting tools: 73 | - [ESLint](https://github.com/nuxt/eslint-config) 74 | - [Prettier](https://github.com/prettier/prettier) 75 | - [Lint staged files](https://github.com/okonet/lint-staged) 76 | 6. Check the features needed for your project: 77 | - [PWA](https://pwa.nuxtjs.org/) 78 | - Linter / Formatter 79 | - [Prettier](https://prettier.io/) 80 | - [Axios](https://github.com/nuxt-community/axios-module) 81 | - [Tachyons](https://tachyons.io) 82 | 7. Choose your favorite test framework: 83 | - None 84 | - [Jest](https://github.com/facebook/jest) 85 | - [AVA](https://github.com/avajs/ava) 86 | 8. Choose rendering mode 87 | - [Universal (SSR)](https://nuxtjs.org/guide/#server-rendered-universal-ssr-) 88 | - [SPA](https://nuxtjs.org/guide/#single-page-applications-spa-) 89 | 90 | ## CLI Options 91 | 92 | ### `--edge` 93 | 94 | Alias: `-e`. 95 | 96 | To install [nuxt-edge](https://www.npmjs.com/package/nuxt-edge) instead of [nuxt](https://www.npmjs.com/package/nuxt), add the command line option `--edge`: 97 | 98 | ```bash 99 | npx create-nuxt-typo3 --edge 100 | ``` 101 | 102 | Or 103 | 104 | ```bash 105 | npm init nuxt-typo3 --edge 106 | ``` 107 | 108 | Or 109 | 110 | ```bash 111 | yarn create nuxt-typo3 --edge 112 | ``` 113 | 114 | ### `--info` 115 | 116 | Alias: `-i`. Print out debugging information relating to the local environment and exit. 117 | 118 | ### `--help` 119 | 120 | Alias: `-h`. Show the help information and exit, include: usage, command and all cli options. 121 | 122 | ### `--verbose` 123 | 124 | Show debug logs 125 | 126 | ### `--version` 127 | 128 | Alias: `-v`. Show version number and exit. 129 | 130 | ## Credits 131 | 132 | - [egoist](https://github.com/egoist) 133 | - [clarko](https://github.com/clarkdo) 134 | - All our contributors ([list](https://github.com/nuxt/create-nuxt-nuxt-app-app/contributors)). 135 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/bodyParser.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | /* 5 | |-------------------------------------------------------------------------- 6 | | JSON Parser 7 | |-------------------------------------------------------------------------- 8 | | 9 | | Below settings are applied when request body contains JSON payload. If 10 | | you want body parser to ignore JSON payload, then simply set `types` 11 | | to an empty array. 12 | */ 13 | json: { 14 | /* 15 | |-------------------------------------------------------------------------- 16 | | limit 17 | |-------------------------------------------------------------------------- 18 | | 19 | | Defines the limit of JSON that can be sent by the client. If payload 20 | | is over 1mb it will not be processed. 21 | | 22 | */ 23 | limit: '1mb', 24 | 25 | /* 26 | |-------------------------------------------------------------------------- 27 | | strict 28 | |-------------------------------------------------------------------------- 29 | | 30 | | When `scrict` is set to true, body parser will only parse Arrays and 31 | | Object. Otherwise everything parseable by `JSON.parse` is parsed. 32 | | 33 | */ 34 | strict: true, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | types 39 | |-------------------------------------------------------------------------- 40 | | 41 | | Which content types are processed as JSON payloads. You are free to 42 | | add your own types here, but the request body should be parseable 43 | | by `JSON.parse` method. 44 | | 45 | */ 46 | types: [ 47 | 'application/json', 48 | 'application/json-patch+json', 49 | 'application/vnd.api+json', 50 | 'application/csp-report' 51 | ] 52 | }, 53 | 54 | /* 55 | |-------------------------------------------------------------------------- 56 | | Raw Parser 57 | |-------------------------------------------------------------------------- 58 | | 59 | | 60 | | 61 | */ 62 | raw: { 63 | types: [ 64 | 'text/*' 65 | ] 66 | }, 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Form Parser 71 | |-------------------------------------------------------------------------- 72 | | 73 | | 74 | | 75 | */ 76 | form: { 77 | types: [ 78 | 'application/x-www-form-urlencoded' 79 | ] 80 | }, 81 | 82 | /* 83 | |-------------------------------------------------------------------------- 84 | | Files Parser 85 | |-------------------------------------------------------------------------- 86 | | 87 | | 88 | | 89 | */ 90 | files: { 91 | types: [ 92 | 'multipart/form-data' 93 | ], 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Max Size 98 | |-------------------------------------------------------------------------- 99 | | 100 | | Below value is the max size of all the files uploaded to the server. It 101 | | is validated even before files have been processed and hard exception 102 | | is thrown. 103 | | 104 | | Consider setting a reasonable value here, otherwise people may upload GB's 105 | | of files which will keep your server busy. 106 | | 107 | | Also this value is considered when `autoProcess` is set to true. 108 | | 109 | */ 110 | maxSize: '20mb', 111 | 112 | /* 113 | |-------------------------------------------------------------------------- 114 | | Auto Process 115 | |-------------------------------------------------------------------------- 116 | | 117 | | Whether or not to auto-process files. Since HTTP servers handle files via 118 | | couple of specific endpoints. It is better to set this value off and 119 | | manually process the files when required. 120 | | 121 | | This value can contain a boolean or an array of route patterns 122 | | to be autoprocessed. 123 | */ 124 | autoProcess: true, 125 | 126 | /* 127 | |-------------------------------------------------------------------------- 128 | | Process Manually 129 | |-------------------------------------------------------------------------- 130 | | 131 | | The list of routes that should not process files and instead rely on 132 | | manual process. This list should only contain routes when autoProcess 133 | | is to true. Otherwise everything is processed manually. 134 | | 135 | */ 136 | processManually: [] 137 | 138 | /* 139 | |-------------------------------------------------------------------------- 140 | | Temporary file name 141 | |-------------------------------------------------------------------------- 142 | | 143 | | Define a function, which should return a string to be used as the 144 | | tmp file name. 145 | | 146 | | If not defined, Bodyparser will use `uuid` as the tmp file name. 147 | | 148 | | To be defined as. If you are defining the function, then do make sure 149 | | to return a value from it. 150 | | 151 | | tmpFileName () { 152 | | return 'some-unique-value' 153 | | } 154 | | 155 | */ 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/shield.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | /* 5 | |-------------------------------------------------------------------------- 6 | | Content Security Policy 7 | |-------------------------------------------------------------------------- 8 | | 9 | | Content security policy filters out the origins not allowed to execute 10 | | and load resources like scripts, styles and fonts. There are wide 11 | | variety of options to choose from. 12 | */ 13 | csp: { 14 | /* 15 | |-------------------------------------------------------------------------- 16 | | Directives 17 | |-------------------------------------------------------------------------- 18 | | 19 | | All directives are defined in camelCase and here is the list of 20 | | available directives and their possible values. 21 | | 22 | | https://content-security-policy.com 23 | | 24 | | @example 25 | | directives: { 26 | | defaultSrc: ['self', '@nonce', 'cdnjs.cloudflare.com'] 27 | | } 28 | | 29 | */ 30 | directives: { 31 | }, 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Report only 35 | |-------------------------------------------------------------------------- 36 | | 37 | | Setting `reportOnly=true` will not block the scripts from running and 38 | | instead report them to a URL. 39 | | 40 | */ 41 | reportOnly: false, 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Set all headers 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Headers staring with `X` have been depreciated, since all major browsers 48 | | supports the standard CSP header. So its better to disable deperciated 49 | | headers, unless you want them to be set. 50 | | 51 | */ 52 | setAllHeaders: false, 53 | 54 | /* 55 | |-------------------------------------------------------------------------- 56 | | Disable on android 57 | |-------------------------------------------------------------------------- 58 | | 59 | | Certain versions of android are buggy with CSP policy. So you can set 60 | | this value to true, to disable it for Android versions with buggy 61 | | behavior. 62 | | 63 | | Here is an issue reported on a different package, but helpful to read 64 | | if you want to know the behavior. https://github.com/helmetjs/helmet/pull/82 65 | | 66 | */ 67 | disableAndroid: true 68 | }, 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | X-XSS-Protection 73 | |-------------------------------------------------------------------------- 74 | | 75 | | X-XSS Protection saves from applications from XSS attacks. It is adopted 76 | | by IE and later followed by some other browsers. 77 | | 78 | | Learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection 79 | | 80 | */ 81 | xss: { 82 | enabled: true, 83 | enableOnOldIE: false 84 | }, 85 | 86 | /* 87 | |-------------------------------------------------------------------------- 88 | | Iframe Options 89 | |-------------------------------------------------------------------------- 90 | | 91 | | xframe defines whether or not your website can be embedded inside an 92 | | iframe. Choose from one of the following options. 93 | | @available options 94 | | DENY, SAMEORIGIN, ALLOW-FROM http://example.com 95 | | 96 | | Learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options 97 | */ 98 | xframe: 'DENY', 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | No Sniff 103 | |-------------------------------------------------------------------------- 104 | | 105 | | Browsers have a habit of sniffing content-type of a response. Which means 106 | | files with .txt extension containing Javascript code will be executed as 107 | | Javascript. You can disable this behavior by setting nosniff to false. 108 | | 109 | | Learn more at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options 110 | | 111 | */ 112 | nosniff: true, 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | No Open 117 | |-------------------------------------------------------------------------- 118 | | 119 | | IE users can execute webpages in the context of your website, which is 120 | | a serious security risk. Below option will manage this for you. 121 | | 122 | */ 123 | noopen: true, 124 | 125 | /* 126 | |-------------------------------------------------------------------------- 127 | | CSRF Protection 128 | |-------------------------------------------------------------------------- 129 | | 130 | | CSRF Protection adds another layer of security by making sure, actionable 131 | | routes does have a valid token to execute an action. 132 | | 133 | */ 134 | csrf: { 135 | enable: true, 136 | methods: ['POST', 'PUT', 'DELETE'], 137 | filterUris: [], 138 | cookieOptions: { 139 | httpOnly: false, 140 | sameSite: true, 141 | path: '/', 142 | maxAge: 7200 143 | } 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /template/nuxt/static/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 14 | 15 | 30 | 42 | 44 | 47 | 49 | 52 | 53 | 56 | 64 | 65 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /template/nuxt/nuxt.config.js: -------------------------------------------------------------------------------- 1 | <%_ if (esm) { _%> 2 | <%_ if (ui === 'vuetify') { _%> 3 | import colors from 'vuetify/es5/util/colors' 4 | <%_ } _%> 5 | <%_ } else { _%> 6 | <%_ if (server === 'adonis') { _%> 7 | const { resolve } = require('path') 8 | <%_ } _%> 9 | <%_ if (ui === 'vuetify') { _%> 10 | const colors = require('vuetify/es5/util/colors').default 11 | <%_ } _%> 12 | <%_ } _%> 13 | 14 | <%_ if (esm) { _%> 15 | export default { 16 | <%_ } else { _%> 17 | module.exports = { 18 | <%_ } _%> 19 | <%_ if (server === 'adonis') { _%> 20 | dev: process.env.NODE_ENV === 'development', 21 | srcDir: resolve(__dirname, '..', 'resources'), 22 | <%_ } _%> 23 | components: true, 24 | /* 25 | ** Headers of the page 26 | */ 27 | head: { 28 | <%_ if (ui === 'vuetify') { _%> 29 | titleTemplate: '%s - ' + process.env.npm_package_name, 30 | <%_ } _%> 31 | title: process.env.npm_package_name || '', 32 | meta: [ 33 | { charset: 'utf-8' }, 34 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 35 | { hid: 'description', name: 'description', content: process.env.npm_package_description || '' } 36 | ], 37 | link: [ 38 | <%_ if (ui === 'framevuerk') { _%> 39 | { 40 | rel: 'stylesheet', 41 | href: 42 | 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' 43 | }, 44 | <%_ } _%> 45 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } 46 | ] 47 | }, 48 | /* 49 | ** Customize the progress-bar color 50 | */ 51 | loading: { color: '#ff8700' }, 52 | /* 53 | ** Global CSS 54 | */ 55 | css: [ 56 | <%_ if (ui === 'element-ui') { _%> 57 | 'element-ui/lib/theme-chalk/index.css' 58 | <%_ } else if (ui === 'iview') { _%> 59 | 'iview/dist/styles/iview.css' 60 | <%_ } else if (ui === 'ant-design-vue') { _%> 61 | 'ant-design-vue/dist/antd.css' 62 | <%_ } else if (ui === 'tachyons') { _%> 63 | 'tachyons/css/tachyons.css' 64 | <%_ } else if (ui === 'framevuerk') { _%> 65 | 'framevuerk/dist/framevuerk-nuxt.min.css' 66 | <%_ } else if (ui === 'vuesax') { _%> 67 | 'vuesax/dist/vuesax.css' 68 | <%_ } _%> 69 | ], 70 | /* 71 | ** Plugins to load before mounting the App 72 | */ 73 | plugins: [ 74 | <%_ if (ui === 'element-ui') { _%> 75 | '@/plugins/element-ui' 76 | <%_ } else if (ui === 'iview') { _%> 77 | '@/plugins/iview' 78 | <%_ } else if (ui === 'ant-design-vue') { _%> 79 | '@/plugins/antd-ui' 80 | <%_ } else if (ui === 'framevuerk') { _%> 81 | '@/plugins/framevuerk' 82 | <%_ } else if (ui === 'vuesax') { _%> 83 | '@/plugins/vuesax' 84 | <%_ } _%> 85 | ], 86 | /* 87 | ** Nuxt.js dev-modules 88 | */ 89 | buildModules: [ 90 | <%_ if (typescript) {_%> 91 | '@nuxt/typescript-build', 92 | <%_ } _%> 93 | <%_ if (eslint && !typescript) { _%> 94 | // Doc: https://github.com/nuxt-community/eslint-module 95 | '@nuxtjs/eslint-module', 96 | <%_ } _%> 97 | <%_ if (skin) { _%> 98 | // Doc: https://github.com/macopedia/nuxt-typo3-theme 99 | 'nuxt-typo3-tailwind', 100 | <%_ } _%> 101 | <%_ if (typo) { _%> 102 | // Doc: https://github.com/TYPO3-Initiatives/nuxt-typo3 103 | 'nuxt-typo3', 104 | <%_ } _%> 105 | <%_ if (stylelint) { _%> 106 | // Doc: https://github.com/nuxt-community/stylelint-module 107 | '@nuxtjs/stylelint-module', 108 | <%_ } _%> 109 | <%_ if (ui === 'tailwind') { _%> 110 | // Doc: https://github.com/nuxt-community/nuxt-tailwindcss 111 | '@nuxtjs/tailwindcss', 112 | <%_ } else if (ui === 'vuetify') { _%> 113 | '@nuxtjs/vuetify', 114 | <%_ } _%> 115 | ], 116 | /* 117 | ** Nuxt.js modules 118 | */ 119 | modules: [ 120 | <%_ if (ui === 'bootstrap') { _%> 121 | // Doc: https://bootstrap-vue.js.org 122 | 'bootstrap-vue/nuxt', 123 | <%_ } else if (ui === 'bulma') { _%> 124 | // Doc: https://github.com/nuxt-community/modules/tree/master/packages/bulma 125 | '@nuxtjs/bulma', 126 | <%_ } else if (ui === 'buefy') { _%> 127 | // Doc: https://buefy.github.io/#/documentation 128 | 'nuxt-buefy', 129 | <%_ } _%> 130 | <%_ if (axios) { _%> 131 | // Doc: https://axios.nuxtjs.org/usage 132 | '@nuxtjs/axios', 133 | <%_ } _%> 134 | <%_ if (pwa) { _%> 135 | '@nuxtjs/pwa', 136 | <%_ } _%> 137 | <%_ if (dotenv) { _%> 138 | // Doc: https://github.com/nuxt-community/dotenv-module 139 | '@nuxtjs/dotenv' 140 | <%_ } _%> 141 | ], 142 | <%_ if (typo) { _%> 143 | /* 144 | ** TYPO3 module configuration 145 | ** https://github.com/TYPO3-Initiatives/nuxt-typo3 146 | */ 147 | typo3: { 148 | baseURL: process.env.NUXT_HOST, 149 | forms: true, 150 | api: { 151 | baseURL: '<%= typoAPI %>' 152 | }, 153 | <%_ if (locales && locales.length) { _%> 154 | i18n: { 155 | locales: [<% for (var i = 0; i < locales.length; i++) {%> '<%= locales[i] %>',<% } %>], 156 | locale: '<%= locale %>', 157 | fallbackLocale: '<%= locale %>' 158 | } 159 | <%_ } _%> 160 | }, 161 | <%_ } _%> 162 | <%_ if (skin) { _%> 163 | typo3tailwind: { 164 | layouts: false 165 | }, 166 | <%_ } _%> 167 | <%_ if (axios) { _%> 168 | /* 169 | ** Axios module configuration 170 | ** See https://axios.nuxtjs.org/options 171 | */ 172 | axios: { 173 | }, 174 | <%_ } _%> 175 | <%_ if (ui === 'vuetify') { _%> 176 | /* 177 | ** vuetify module configuration 178 | ** https://github.com/nuxt-community/vuetify-module 179 | */ 180 | vuetify: { 181 | customVariables: ['~/assets/variables.scss'], 182 | theme: { 183 | dark: true, 184 | themes: { 185 | dark: { 186 | primary: colors.blue.darken2, 187 | accent: colors.grey.darken3, 188 | secondary: colors.amber.darken3, 189 | info: colors.teal.lighten1, 190 | warning: colors.amber.base, 191 | error: colors.deepOrange.accent4, 192 | success: colors.green.accent3 193 | } 194 | } 195 | } 196 | }, 197 | <%_ } _%> 198 | /* 199 | ** Build configuration 200 | */ 201 | build: { 202 | <%_ if (ui === 'bulma') { _%> 203 | postcss: { 204 | preset: { 205 | features: { 206 | customProperties: false 207 | } 208 | } 209 | }, 210 | <%_ } else if (ui === 'element-ui') { _%> 211 | transpile: [/^element-ui/], 212 | <%_ } _%> 213 | /* 214 | ** You can extend webpack config here 215 | */ 216 | extend (config, ctx) { 217 | } 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /saofile.js: -------------------------------------------------------------------------------- 1 | const { join, relative } = require('path') 2 | const glob = require('glob') 3 | const spawn = require('cross-spawn') 4 | const validate = require('validate-npm-package-name') 5 | 6 | const rootDir = __dirname 7 | 8 | module.exports = { 9 | prompts: require('./prompts'), 10 | templateData () { 11 | const typescript = this.answers.language.includes('ts') 12 | const tsRuntime = this.answers.runtime && this.answers.runtime.includes('ts-runtime') 13 | const pwa = this.answers.features.includes('pwa') 14 | const eslint = this.answers.linter.includes('eslint') 15 | const prettier = this.answers.linter.includes('prettier') 16 | const lintStaged = eslint && this.answers.linter.includes('lintStaged') 17 | const axios = this.answers.features.includes('axios') 18 | const typo = this.answers.features.includes('typo') 19 | const typoVersion = this.answers.typoVersion || 'latest' 20 | const skin = this.answers.features.includes('skin') 21 | const esm = this.answers.server === 'none' 22 | const pmRun = this.answers.pm === 'yarn' ? 'yarn' : 'npm run' 23 | const typoAPI = this.answers.api 24 | const certUnsafe = this.answers.cert === 'unsafe' 25 | const locales = this.answers.locales || [] 26 | const locale = this.answers.locale 27 | const stylelint = this.answers.linter.includes('stylelint') 28 | const dotenv = this.answers.features.includes('dotenv') 29 | const pm = this.answers.pm === 'yarn' ? 'yarn' : 'npm' 30 | 31 | const { cliOptions = {} } = this.sao.opts 32 | const edge = cliOptions.edge ? '-edge' : '' 33 | 34 | return { 35 | typescript, 36 | tsRuntime, 37 | pwa, 38 | eslint, 39 | prettier, 40 | lintStaged, 41 | axios, 42 | typo, 43 | skin, 44 | esm, 45 | edge, 46 | pmRun, 47 | typoAPI, 48 | locales, 49 | locale, 50 | stylelint, 51 | pm, 52 | dotenv, 53 | certUnsafe, 54 | typoVersion 55 | } 56 | }, 57 | actions () { 58 | const validation = validate(this.answers.name) 59 | validation.warnings && validation.warnings.forEach((warn) => { 60 | console.warn('Warning:', warn) 61 | }) 62 | validation.errors && validation.errors.forEach((err) => { 63 | console.error('Error:', err) 64 | }) 65 | validation.errors && validation.errors.length && process.exit(1) 66 | 67 | const actions = [{ 68 | type: 'add', 69 | files: '**', 70 | templateDir: 'template/nuxt', 71 | filters: { 72 | 'static/icon.png': 'features.includes("pwa")' 73 | } 74 | }] 75 | 76 | if (this.answers.ui !== 'none') { 77 | actions.push({ 78 | type: 'add', 79 | files: '**', 80 | templateDir: `template/frameworks/${this.answers.ui}` 81 | }) 82 | } 83 | 84 | if (this.answers.test !== 'none') { 85 | actions.push({ 86 | type: 'add', 87 | files: '**', 88 | templateDir: `template/frameworks/${this.answers.test}` 89 | }) 90 | } 91 | 92 | if (this.answers.server !== 'none') { 93 | if (this.answers.server === 'adonis') { 94 | const files = {} 95 | for (const action of actions) { 96 | const options = { cwd: join(rootDir, action.templateDir), dot: true } 97 | for (const file of glob.sync('*', options)) { 98 | files[file] = `resources/${file}` 99 | } 100 | } 101 | files['nuxt.config.js'] = 'config/nuxt.js' 102 | 103 | actions.push({ 104 | type: 'move', 105 | patterns: files 106 | }) 107 | } 108 | 109 | actions.push({ 110 | type: 'add', 111 | files: '**', 112 | templateDir: `template/frameworks/${this.answers.server}` 113 | }) 114 | } 115 | 116 | actions.push({ 117 | type: 'add', 118 | files: '*', 119 | filters: { 120 | '_.eslintrc.js': 'linter.includes("eslint")', 121 | '_.prettierrc': 'linter.includes("prettier")', 122 | '_jsconfig.json': 'devTools.includes("jsconfig.json")', 123 | 'tsconfig.json': 'language.includes("ts") || features.includes("skin")', 124 | 'semantic.yml': 'devTools.includes("semantic-pull-requests")', 125 | '.env': 'features.includes("dotenv")', 126 | '_stylelint.config.js': 'linter.includes("stylelint")' 127 | } 128 | }) 129 | 130 | actions.push({ 131 | type: 'move', 132 | patterns: { 133 | gitignore: '.gitignore', 134 | '_package.json': 'package.json', 135 | '_.prettierrc': '.prettierrc', 136 | '_.eslintrc.js': '.eslintrc.js', 137 | '_jsconfig.json': 'jsconfig.json', 138 | '_stylelint.config.js': 'stylelint.config.js', 139 | 'semantic.yml': '.github/semantic.yml' 140 | } 141 | }) 142 | 143 | actions.push({ 144 | type: 'modify', 145 | files: 'package.json', 146 | handler (data) { 147 | delete data.scripts[''] 148 | delete data.dependencies[''] 149 | delete data.devDependencies[''] 150 | return data 151 | } 152 | }) 153 | 154 | return actions 155 | }, 156 | async completed () { 157 | this.gitInit() 158 | 159 | await this.npmInstall({ npmClient: this.answers.pm }) 160 | 161 | if (this.answers.linter.includes('eslint')) { 162 | const options = ['run', 'lint', '--', '--fix'] 163 | if (this.answers.pm === 'yarn') { 164 | options.splice(2, 1) 165 | } 166 | spawn.sync(this.answers.pm, options, { 167 | cwd: this.outDir, 168 | stdio: 'inherit' 169 | }) 170 | } 171 | 172 | const chalk = this.chalk 173 | const isNewFolder = this.outDir !== process.cwd() 174 | const relativeOutFolder = relative(process.cwd(), this.outDir) 175 | const cdMsg = isNewFolder ? chalk`\t{cyan cd ${relativeOutFolder}}\n` : '' 176 | const pmRun = this.answers.pm === 'yarn' ? 'yarn' : 'npm run' 177 | 178 | console.log(chalk`\n🎉 {bold Successfully created project} {cyan ${this.answers.name}}\n`) 179 | 180 | console.log(chalk` {bold To get started:}\n`) 181 | console.log(chalk`${cdMsg}\t{cyan ${pmRun} dev}\n`) 182 | 183 | console.log(chalk` {bold To build & start for production:}\n`) 184 | console.log(chalk`${cdMsg}\t{cyan ${pmRun} build}`) 185 | console.log(chalk`\t{cyan ${pmRun} start}\n`) 186 | 187 | if (this.answers.test !== 'none') { 188 | console.log(chalk` {bold To test:}\n`) 189 | console.log(chalk`${cdMsg}\t{cyan ${pmRun} test}\n`) 190 | } 191 | 192 | if (this.answers.language.includes('ts')) { 193 | console.log(chalk`\n {bold For TypeScript users.} \n\n See : https://typescript.nuxtjs.org/cookbook/components/`) 194 | } 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /template/_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= name %>", 3 | "version": "1.0.0", 4 | "description": "<%= description %>", 5 | "author": "<%= author %>", 6 | "private": true, 7 | "scripts": { 8 | <%_ if (server === 'none') { _%> 9 | <%_ if (tsRuntime) { _%> 10 | "dev": "nuxt-ts", 11 | "build": "nuxt-ts build", 12 | "generate": "nuxt-ts generate", 13 | "start": "nuxt-ts start", 14 | <%_ } else { _%> 15 | "dev": "<%_ if (certUnsafe) { _%>NODE_TLS_REJECT_UNAUTHORIZED=0<%}%> nuxt", 16 | "build": "nuxt build", 17 | "start": "<%_ if (certUnsafe) { _%>NODE_TLS_REJECT_UNAUTHORIZED=0<%}%> nuxt start", 18 | "generate": "nuxt generate", 19 | <%_ } _%> 20 | <%_ } else if (server === 'adonis') { _%> 21 | "serve:dev": "<%= pmRun %> dev", 22 | "dev": "nodemon --watch app --watch bootstrap --watch config --watch .env -x node server.js", 23 | "build": "cross-env NODE_ENV=production node ./ace nuxtbuild", 24 | "start": "cross-env NODE_ENV=production node server.js", 25 | <%_ } else { _%> 26 | "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", 27 | "build": "nuxt build", 28 | "start": "cross-env NODE_ENV=production node server/index.js", 29 | "generate": "nuxt generate", 30 | <%_ } _%> 31 | <%_ if (ui === 'framevuerk') { _%> 32 | "build:framevuerk": "framevuerk-builder -c ./framevuerk-config.js", 33 | "prepublish": "<%= pmRun %> build:framevuerk", 34 | <%_ } _%> 35 | <%_ if (eslint) { _%> 36 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", 37 | <%_ } _%> 38 | <%_ if (test === 'ava') { _%> 39 | "test": "<%= test %>", 40 | "test:unit": "cross-env TEST=unit ava ./test/specs/**/*", 41 | "test:e2e": "cross-env TEST=e2e ava ./test/e2e/**/*", 42 | <%_ } else if (test !== 'none') { _%> 43 | "test": "<%= test %>", 44 | <%_ } _%> 45 | "": "" 46 | }, 47 | <%_ if (lintStaged) { _%> 48 | "lint-staged": { 49 | <%_ if (eslint) { _%> 50 | "*.{js,vue}": "<%= pmRun %> lint"<%= stylelint ? "," : "" %> 51 | <%_ } _%> 52 | <%_ if (stylelint) { _%> 53 | "*.{css,vue}": "stylelint" 54 | <%_ } _%> 55 | }, 56 | "husky": { 57 | "hooks": { 58 | "pre-commit": "lint-staged" 59 | } 60 | }, 61 | <%_ } _%> 62 | "dependencies": { 63 | <%_ if (edge) { _%> 64 | "nuxt-edge": "latest", 65 | <%_ } else { _%> 66 | "nuxt": "^2.0.0", 67 | <%_ } _%> 68 | <%_ if (tsRuntime) { _%> 69 | "@nuxt/typescript-runtime": "^0.4.0", 70 | <%_ } _%> 71 | <%_ if (server !== 'none') { _%> 72 | "cross-env": "^5.2.0", 73 | <%_ } _%> 74 | <%_ if (server === 'express') { _%> 75 | "express": "^4.16.4", 76 | <%_ } else if (server === 'koa') { _%> 77 | "koa": "^2.6.2", 78 | <%_ } else if (server === 'hapi') { _%> 79 | "@hapi/hapi": "^18.3.1", 80 | "@nuxtjs/hapi": "^2.2.1", 81 | <%_ } else if (server === 'micro') { _%> 82 | "micro": "^9.3.3", 83 | "micro-route": "^2.5.0", 84 | <%_ } else if (server === 'fastify') { _%> 85 | "fastify": "^1.13.3", 86 | <%_ } else if (server === 'feathers') { _%> 87 | "@feathersjs/feathers": "^3.3.1", 88 | "@feathersjs/express": "^1.3.1", 89 | "@feathersjs/configuration": "^2.0.6", 90 | <%_ } else if (server === 'adonis') { _%> 91 | "@adonisjs/ace": "^4.0.7", 92 | "@adonisjs/auth": "^2.0.10", 93 | "@adonisjs/bodyparser": "^1.0.8", 94 | "@adonisjs/cors": "^1.0.2", 95 | "@adonisjs/fold": "^4.0.5", 96 | "@adonisjs/framework": "^4.0.27", 97 | "@adonisjs/ignitor": "^1.0.14", 98 | "@adonisjs/lucid": "^4.0.22", 99 | "@adonisjs/session": "^1.0.19", 100 | "@adonisjs/shield": "^1.0.4", 101 | <%_ } _%> 102 | <%_ if (ui === 'bootstrap') { _%> 103 | "bootstrap-vue": "^2.0.0", 104 | "bootstrap": "^4.1.3", 105 | <%_ } else if (ui === 'bulma') { _%> 106 | "@nuxtjs/bulma": "^1.2.1", 107 | <%_ } else if (ui === 'element-ui') { _%> 108 | "element-ui": "^2.4.11", 109 | <%_ } else if (ui === 'ant-design-vue') { _%> 110 | "ant-design-vue": "^1.1.10", 111 | <%_ } else if (ui === 'buefy') { _%> 112 | "nuxt-buefy": "^0.3.2", 113 | <%_ } else if (ui === 'iview') { _%> 114 | "iview": "^3.1.5", 115 | <%_ } else if (ui === 'framevuerk') { _%> 116 | "framevuerk": "^2.2.5", 117 | <%_ } else if (ui === 'vuesax') { _%> 118 | "vuesax": "^4.0.1-alpha.8", 119 | <%_ } _%> 120 | <%_ if (axios) { _%> 121 | "@nuxtjs/axios": "^5.3.6", 122 | <%_ } _%> 123 | <%_ if (pwa) { _%> 124 | "@nuxtjs/pwa": "^3.0.0-0", 125 | <%_ } _%> 126 | <%_ if (typo) { _%> 127 | "nuxt-typo3": "<%= typoVersion %>", 128 | <%_ 129 | } _%> 130 | <%_ if (skin) { _%> 131 | "nuxt-typo3-tailwind": "https://github.com/macopedia/nuxt-typo3-tailwind.git", 132 | <%_ 133 | } _%> 134 | <%_ if (dotenv) { _%> 135 | "@nuxtjs/dotenv": "^1.4.0", 136 | <%_ } _%> 137 | <%_ if (ui === 'tachyons') { _%> 138 | "tachyons": "^4.11.1", 139 | <%_ } _%> 140 | "": "" 141 | }, 142 | "devDependencies": { 143 | <%_ if (server !== 'none') { _%> 144 | "nodemon": "^1.18.9", 145 | <%_ } _%> 146 | <%_ if (typescript) { _%> 147 | "@nuxt/typescript-build": "^0.6.0", 148 | <%_ } _%> 149 | <%_ if (ui === 'tailwind') { _%> 150 | "@nuxtjs/tailwindcss": "^1.0.0", 151 | <%_ } else if (ui === 'vuetify') { _%> 152 | "@nuxtjs/vuetify": "^1.0.0", 153 | <%_ } else if (ui === 'framevuerk') { _%> 154 | "framevuerk-builder": "^2.0.2", 155 | <%_ } _%> 156 | <%_ if (eslint) { _%> 157 | <%_ if (typescript) { _%> 158 | "@nuxtjs/eslint-config-typescript": "^1.0.0", 159 | <%_ } else { _%> 160 | "@nuxtjs/eslint-config": "^5.0.0", 161 | <%_ } _%> 162 | "@nuxtjs/eslint-module": "^3.0.1", 163 | "babel-eslint": "^10.0.1", 164 | "eslint": "^7.16.0", 165 | "eslint-plugin-nuxt": ">=0.4.2", 166 | <%_ } _%> 167 | <%_ if (prettier) { _%> 168 | "eslint-config-prettier": "^6.10.0", 169 | "eslint-plugin-prettier": "^3.1.2", 170 | "prettier": "^1.19.1", 171 | <%_ } _%> 172 | <%_ if (lintStaged) { _%> 173 | "husky": "^4.0.0", 174 | "lint-staged": "^10.0.0", 175 | <%_ } _%> 176 | <%_ if (stylelint) { _%> 177 | "@nuxtjs/stylelint-module": "^3.1.0", 178 | "stylelint": "^10.1.0", 179 | <%_ } _%> 180 | <%_ if (test !== 'none') { _%> 181 | "@vue/test-utils": "^1.0.0-beta.27", 182 | <%_ } _%> 183 | <%_ if (test === 'jest') { _%> 184 | "babel-jest": "^24.1.0", 185 | "jest": "^24.1.0", 186 | "vue-jest": "^4.0.0-0", 187 | <%_ if (typescript) { _%> 188 | "ts-jest": "^25.0.0", 189 | <%_ } _%> 190 | <%_ } else if (test === 'ava') { _%> 191 | "ava": "^3.0.0", 192 | "@ava/babel": "^1.0.0", 193 | "babel-plugin-module-resolver": "^3.2.0", 194 | "browser-env": "^3.2.5", 195 | "require-extension-hooks": "^0.3.3", 196 | "require-extension-hooks-babel": "^1.0.0", 197 | "require-extension-hooks-vue": "^2.0.0", 198 | <%_ } _%> 199 | "": "" 200 | }, 201 | "resolutions": { 202 | "@nuxt/kit": "3.0.0-rc.13" 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /template/frameworks/adonis/config/app.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Env = use('Env') 4 | 5 | module.exports = { 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | App Key 9 | |-------------------------------------------------------------------------- 10 | | 11 | | App key is a randomly generated 16 or 32 characters long string required 12 | | to encrypted cookies, sessions and other sensitive data. 13 | | 14 | */ 15 | appKey: Env.get('APP_KEY'), 16 | 17 | http: { 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Allow Method Spoofing 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Method spoofing allows to make requests by spoofing the http verb. 24 | | Which means you can make a GET request but instruct the server to 25 | | treat as a POST or PUT request. If you want this feature, set the 26 | | below value to true. 27 | | 28 | */ 29 | allowMethodSpoofing: true, 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Trust Proxy 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Trust proxy defines whether X-Forwaded-* headers should be trusted or not. 37 | | When your application is behind a proxy server like nginx, these values 38 | | are set automatically and should be trusted. Apart from setting it 39 | | to true or false Adonis supports handful or ways to allow proxy 40 | | values. Read documentation for that. 41 | | 42 | */ 43 | trustProxy: false, 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | Subdomains 48 | |-------------------------------------------------------------------------- 49 | | 50 | | Offset to be used for returning subdomains for a given request.For 51 | | majority of applications it will be 2, until you have nested 52 | | sudomains. 53 | | cheatsheet.adonisjs.com - offset - 2 54 | | virk.cheatsheet.adonisjs.com - offset - 3 55 | | 56 | */ 57 | subdomainOffset: 2, 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | JSONP Callback 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Default jsonp callback to be used when callback query string is missing 65 | | in request url. 66 | | 67 | */ 68 | jsonpCallback: 'callback', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Etag 73 | |-------------------------------------------------------------------------- 74 | | 75 | | Set etag on all HTTP response. In order to disable for selected routes, 76 | | you can call the `response.send` with an options object as follows. 77 | | 78 | | response.send('Hello', { ignoreEtag: true }) 79 | | 80 | */ 81 | etag: true 82 | }, 83 | 84 | views: { 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Cache Views 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Define whether or not to cache the compiled view. Set it to true in 91 | | production to optimize view loading time. 92 | | 93 | */ 94 | cache: Env.get('CACHE_VIEWS', true) 95 | }, 96 | 97 | static: { 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Dot Files 101 | |-------------------------------------------------------------------------- 102 | | 103 | | Define how to treat dot files when trying to server static resources. 104 | | By default it is set to ignore, which will pretend that dotfiles 105 | | does not exists. 106 | | 107 | | Can be one of the following 108 | | ignore, deny, allow 109 | | 110 | */ 111 | dotfiles: 'ignore', 112 | 113 | /* 114 | |-------------------------------------------------------------------------- 115 | | ETag 116 | |-------------------------------------------------------------------------- 117 | | 118 | | Enable or disable etag generation 119 | | 120 | */ 121 | etag: true, 122 | 123 | /* 124 | |-------------------------------------------------------------------------- 125 | | Extensions 126 | |-------------------------------------------------------------------------- 127 | | 128 | | Set file extension fallbacks. When set, if a file is not found, the given 129 | | extensions will be added to the file name and search for. The first 130 | | that exists will be served. Example: ['html', 'htm']. 131 | | 132 | */ 133 | extensions: false 134 | }, 135 | 136 | locales: { 137 | /* 138 | |-------------------------------------------------------------------------- 139 | | Driver 140 | |-------------------------------------------------------------------------- 141 | | 142 | | The driver to be used for fetching and updating locales. Below is the 143 | | list of available options. 144 | | 145 | | file, database 146 | | 147 | */ 148 | driver: 'file', 149 | 150 | /* 151 | |-------------------------------------------------------------------------- 152 | | Default Locale 153 | |-------------------------------------------------------------------------- 154 | | 155 | | Default locale to be used by Antl provider. You can always switch drivers 156 | | in runtime or use the official Antl middleware to detect the driver 157 | | based on HTTP headers/query string. 158 | | 159 | */ 160 | locale: 'en' 161 | }, 162 | 163 | logger: { 164 | /* 165 | |-------------------------------------------------------------------------- 166 | | Transport 167 | |-------------------------------------------------------------------------- 168 | | 169 | | Transport to be used for logging messages. You can have multiple 170 | | transports using same driver. 171 | | 172 | | Available drivers are: `file` and `console`. 173 | | 174 | */ 175 | transport: 'console', 176 | 177 | /* 178 | |-------------------------------------------------------------------------- 179 | | Console Transport 180 | |-------------------------------------------------------------------------- 181 | | 182 | | Using `console` driver for logging. This driver writes to `stdout` 183 | | and `stderr` 184 | | 185 | */ 186 | console: { 187 | driver: 'console', 188 | name: 'adonis-app', 189 | level: 'info' 190 | }, 191 | 192 | /* 193 | |-------------------------------------------------------------------------- 194 | | File Transport 195 | |-------------------------------------------------------------------------- 196 | | 197 | | File transport uses file driver and writes log messages for a given 198 | | file inside `tmp` directory for your app. 199 | | 200 | | For a different directory, set an absolute path for the filename. 201 | | 202 | */ 203 | file: { 204 | driver: 'file', 205 | name: 'adonis-app', 206 | filename: 'adonis.log', 207 | level: 'info' 208 | } 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /template/frameworks/framevuerk/pages/index.vue: -------------------------------------------------------------------------------- 1 | 135 | 136 | 174 | 175 | 184 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ## [2.15.0](https://github.com/nuxt/create-nuxt-app/compare/v2.14.0...v2.15.0) (2020-03-17) 6 | 7 | 8 | ### Bug Fixes 9 | 10 | * **ava:** no tests found in test/ava.setup.js ([#426](https://github.com/nuxt/create-nuxt-app/issues/426)) ([c1afad4](https://github.com/nuxt/create-nuxt-app/commit/c1afad4)) 11 | 12 | 13 | ### Features 14 | 15 | * add typescript support using typescript-build ([#328](https://github.com/nuxt/create-nuxt-app/issues/328)) ([e4b9cd8](https://github.com/nuxt/create-nuxt-app/commit/e4b9cd8)) 16 | 17 | ## [2.14.0](https://github.com/nuxt/create-nuxt-app/compare/v2.13.0...v2.14.0) (2020-02-09) 18 | 19 | 20 | ### Features 21 | 22 | * **eslint:** upgrade @nuxtjs/eslint-config to v2 ([85b368b](https://github.com/nuxt/create-nuxt-app/commit/85b368b6cfbe768f8de4cbe3d4820bf5a787f68b)) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * upgrade lint-staged packages ([e10fe52](https://github.com/nuxt/create-nuxt-app/commit/e10fe520c79a98467c4de976e1d46ea106099f19)) 28 | * upgrade prettier packages ([79075b0](https://github.com/nuxt/create-nuxt-app/commit/79075b0fd304c0a5dd5d9e5ce3a09bf193e6f986)) 29 | 30 | ## [2.13.0](https://github.com/nuxt/create-nuxt-app/compare/v2.12.0...v2.13.0) (2020-02-09) 31 | 32 | 33 | ### Features 34 | 35 | * **ava:** add support for ava v3 ([#414](https://github.com/nuxt/create-nuxt-app/issues/414)) ([0e14a6f](https://github.com/nuxt/create-nuxt-app/commit/0e14a6fb94e0cd40dcb06ba3dd4116b95f60b851)) 36 | * add semantic pull request support ([#405](https://github.com/nuxt/create-nuxt-app/issues/405)) ([35728ee](https://github.com/nuxt/create-nuxt-app/commit/35728ee328265239d4818cf3ff9c21b3e04b83b4)) 37 | * add stylelint to lint-staged ([33051e4](https://github.com/nuxt/create-nuxt-app/commit/33051e461e5c5c4984d87f0734cf2e22e09fda4d)) 38 | * add Vuesax framework ui ([#424](https://github.com/nuxt/create-nuxt-app/issues/424)) ([952dc47](https://github.com/nuxt/create-nuxt-app/commit/952dc4786428e00a675167f42a527cba56e28be0)) 39 | 40 | 41 | ### Bug Fixes 42 | 43 | * **template:** Stylelint config ([#387](https://github.com/nuxt/create-nuxt-app/issues/387)) ([28abd48](https://github.com/nuxt/create-nuxt-app/commit/28abd48e46dc5ca77ce880d4779428c8b2c9a01e)) 44 | * nuxt.ready is not called in dev mode ([441bb5b](https://github.com/nuxt/create-nuxt-app/commit/441bb5bd8b1cc6566202c59fb4e2f8dcb37290da)) 45 | * stylelint config rules is object ([6a6415e](https://github.com/nuxt/create-nuxt-app/commit/6a6415ebc0f94404d442134bf762a7728417fca5)) 46 | * **templates:** Vuetify copyright year ([#415](https://github.com/nuxt/create-nuxt-app/issues/415)) ([1f6d68f](https://github.com/nuxt/create-nuxt-app/commit/1f6d68fe045127acfdff326c8009dc681b57a01c)) 47 | 48 | ## [2.12.0](https://github.com/nuxt/create-nuxt-app/compare/v2.11.1...v2.12.0) (2019-11-24) 49 | 50 | 51 | ### Features 52 | 53 | * add dotenv module ([#358](https://github.com/nuxt/create-nuxt-app/issues/358)) ([40dd947](https://github.com/nuxt/create-nuxt-app/commit/40dd947dc2342dd3358adf92c4a912a4cf293a48)) 54 | * add stylelint module ([#278](https://github.com/nuxt/create-nuxt-app/issues/278)) ([18740f8](https://github.com/nuxt/create-nuxt-app/commit/18740f86eb2afd3226d277b42000e6ab21e94deb)) 55 | * update logo component with the new nuxt logo ([#363](https://github.com/nuxt/create-nuxt-app/issues/363)) ([b5a4417](https://github.com/nuxt/create-nuxt-app/commit/b5a4417bcc56aa7e7fec571b3baf4161db63f634)) 56 | 57 | ### [2.11.1](https://github.com/nuxt/create-nuxt-app/compare/v2.11.0...v2.11.1) (2019-09-30) 58 | 59 | 60 | ### Bug Fixes 61 | 62 | * add prompts.js into npm package ([#352](https://github.com/nuxt/create-nuxt-app/issues/352)) ([fef1a2e](https://github.com/nuxt/create-nuxt-app/commit/fef1a2e)) 63 | 64 | ## [2.11.0](https://github.com/nuxt/create-nuxt-app/compare/v2.10.1...v2.11.0) (2019-09-30) 65 | 66 | 67 | ### Bug Fixes 68 | 69 | * **tests:** update babel config for ava ([#342](https://github.com/nuxt/create-nuxt-app/issues/342)) ([a257561](https://github.com/nuxt/create-nuxt-app/commit/a257561)) 70 | * update snapshots ([10ad76f](https://github.com/nuxt/create-nuxt-app/commit/10ad76f)) 71 | 72 | 73 | ### Features 74 | 75 | * Add e2e testing support using Ava ([#303](https://github.com/nuxt/create-nuxt-app/issues/303)) ([4d8fe95](https://github.com/nuxt/create-nuxt-app/commit/4d8fe95)) 76 | * add support for semantic-pull-requests ([#322](https://github.com/nuxt/create-nuxt-app/issues/322)) ([5af63c0](https://github.com/nuxt/create-nuxt-app/commit/5af63c0)) 77 | * answers option ([#347](https://github.com/nuxt/create-nuxt-app/issues/347)) ([75db75e](https://github.com/nuxt/create-nuxt-app/commit/75db75e)) 78 | * bump `bootstrap-vue` to v2.0.0 stable ([#334](https://github.com/nuxt/create-nuxt-app/issues/334)) ([38af656](https://github.com/nuxt/create-nuxt-app/commit/38af656)) 79 | 80 | ### [2.10.1](https://github.com/nuxt/create-nuxt-app/compare/v2.10.0...v2.10.1) (2019-08-31) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * use framevuerk-nuxt.min.css in framevuerk ([1b5713b](https://github.com/nuxt/create-nuxt-app/commit/1b5713b)) 86 | 87 | # [2.10.0](https://github.com/nuxt/create-nuxt-app/compare/v2.9.2...v2.10.0) (2019-08-21) 88 | 89 | 90 | ### Bug Fixes 91 | 92 | * comment vuetify/variables.scss with doc link ([#318](https://github.com/nuxt/create-nuxt-app/issues/318)) ([e4f1d64](https://github.com/nuxt/create-nuxt-app/commit/e4f1d64)) 93 | * rename devModules to buildModules ([9d9c962](https://github.com/nuxt/create-nuxt-app/commit/9d9c962)) 94 | 95 | 96 | ### Features 97 | 98 | * add alias (@/~) support in ava tests ([#304](https://github.com/nuxt/create-nuxt-app/issues/304)) ([499e852](https://github.com/nuxt/create-nuxt-app/commit/499e852)) 99 | * add jsconfig.json file for VS Code users ([#277](https://github.com/nuxt/create-nuxt-app/issues/277)) ([3fee8e1](https://github.com/nuxt/create-nuxt-app/commit/3fee8e1)) 100 | 101 | 102 | 103 | ## [2.9.2](https://github.com/nuxt/create-nuxt-app/compare/v2.9.1...v2.9.2) (2019-08-05) 104 | 105 | 106 | ### Bug Fixes 107 | 108 | * lint-staged should only check staged files ([b516d23](https://github.com/nuxt/create-nuxt-app/commit/b516d23)) 109 | * updgrade @nuxtjs/pwa to v3 ([#216](https://github.com/nuxt/create-nuxt-app/issues/216)) ([de66e4e](https://github.com/nuxt/create-nuxt-app/commit/de66e4e)) 110 | 111 | 112 | 113 | ## [2.9.1](https://github.com/nuxt/create-nuxt-app/compare/v2.9.0...v2.9.1) (2019-08-04) 114 | 115 | 116 | ### Bug Fixes 117 | 118 | * cannot find module babel-core ([#310](https://github.com/nuxt/create-nuxt-app/issues/310)) ([cf1dbde](https://github.com/nuxt/create-nuxt-app/commit/cf1dbde)) 119 | * framevuerk error ([250c6e1](https://github.com/nuxt/create-nuxt-app/commit/250c6e1)) 120 | * ignore vim swap files ([#263](https://github.com/nuxt/create-nuxt-app/issues/263)) ([2ff7b11](https://github.com/nuxt/create-nuxt-app/commit/2ff7b11)) 121 | * remove unnecessary nodemon in devDependencies ([#309](https://github.com/nuxt/create-nuxt-app/issues/309)) ([cddccd6](https://github.com/nuxt/create-nuxt-app/commit/cddccd6)) 122 | 123 | 124 | ### Features 125 | 126 | * upgrade eslint-module ([#300](https://github.com/nuxt/create-nuxt-app/issues/300)) ([b61e88e](https://github.com/nuxt/create-nuxt-app/commit/b61e88e)) 127 | 128 | 129 | 130 | # [2.9.0](https://github.com/nuxt/create-nuxt-app/compare/v2.8.0...v2.9.0) (2019-07-26) 131 | 132 | 133 | ### Bug Fixes 134 | 135 | * Adonis commands always running nuxt build ([#268](https://github.com/nuxt/create-nuxt-app/issues/268)) ([d38aa96](https://github.com/nuxt/create-nuxt-app/commit/d38aa96)) 136 | * Duplicate key 'devModules' ([#273](https://github.com/nuxt/create-nuxt-app/issues/273)) ([e7ef3a9](https://github.com/nuxt/create-nuxt-app/commit/e7ef3a9)) 137 | * prettier error in vuetify ([#281](https://github.com/nuxt/create-nuxt-app/issues/281)) ([b7756a2](https://github.com/nuxt/create-nuxt-app/commit/b7756a2)) 138 | 139 | 140 | ### Features 141 | 142 | * add --verbose cli flag ([0d964e2](https://github.com/nuxt/create-nuxt-app/commit/0d964e2)) 143 | * add alias for --edge and --info ([7d0522d](https://github.com/nuxt/create-nuxt-app/commit/7d0522d)) 144 | * add UI framework Framevuerk ([#291](https://github.com/nuxt/create-nuxt-app/issues/291)) ([db8441e](https://github.com/nuxt/create-nuxt-app/commit/db8441e)) 145 | * lint git staged files ([#269](https://github.com/nuxt/create-nuxt-app/issues/269)) ([1760f6a](https://github.com/nuxt/create-nuxt-app/commit/1760f6a)) 146 | * replace tailwind with @nuxtjs/tailwindcss ([#254](https://github.com/nuxt/create-nuxt-app/issues/254)) ([5d0c6ff](https://github.com/nuxt/create-nuxt-app/commit/5d0c6ff)) 147 | * upgrade Ava ([#284](https://github.com/nuxt/create-nuxt-app/issues/284)) ([54c29ff](https://github.com/nuxt/create-nuxt-app/commit/54c29ff)) 148 | * upgrade vuetify to 2.x ([#297](https://github.com/nuxt/create-nuxt-app/issues/297)) ([f735b63](https://github.com/nuxt/create-nuxt-app/commit/f735b63)) 149 | * **chore:** included a dedicated option to show up envinfo ([#272](https://github.com/nuxt/create-nuxt-app/issues/272)) ([d2917a9](https://github.com/nuxt/create-nuxt-app/commit/d2917a9)) 150 | * **cli:** use cac for cli ([#264](https://github.com/nuxt/create-nuxt-app/issues/264)) ([b80fa2d](https://github.com/nuxt/create-nuxt-app/commit/b80fa2d)) 151 | 152 | 153 | 154 | # [2.8.0](https://github.com/nuxt/create-nuxt-app/compare/v2.7.1...v2.8.0) (2019-06-24) 155 | 156 | 157 | ### Bug Fixes 158 | 159 | * iview UI package version match ([#265](https://github.com/nuxt/create-nuxt-app/issues/265)) ([e547353](https://github.com/nuxt/create-nuxt-app/commit/e547353)) 160 | 161 | 162 | ### Features 163 | 164 | * move linting tool to separete prompt ([a6a4ac9](https://github.com/nuxt/create-nuxt-app/commit/a6a4ac9)) 165 | 166 | 167 | 168 | ## [2.7.1](https://github.com/nuxt/create-nuxt-app/compare/v2.7.0...v2.7.1) (2019-06-06) 169 | 170 | 171 | ### Bug Fixes 172 | 173 | * undefined colors vuetify errors in nuxt.config.js ([650fe6c](https://github.com/nuxt/create-nuxt-app/commit/650fe6c)) 174 | 175 | 176 | 177 | # [2.7.0](https://github.com/nuxt/create-nuxt-app/compare/v2.6.0...v2.7.0) (2019-06-06) 178 | 179 | 180 | ### Bug Fixes 181 | 182 | * **antd-ui:** register plugin only once ([#233](https://github.com/nuxt/create-nuxt-app/issues/233)) ([afe1c6c](https://github.com/nuxt/create-nuxt-app/commit/afe1c6c)) 183 | * **element:** register element UI only once ([#232](https://github.com/nuxt/create-nuxt-app/issues/232)) ([7e533dd](https://github.com/nuxt/create-nuxt-app/commit/7e533dd)) 184 | * **iview:** register plugin only once ([#234](https://github.com/nuxt/create-nuxt-app/issues/234)) ([7ab985d](https://github.com/nuxt/create-nuxt-app/commit/7ab985d)) 185 | 186 | 187 | ### Features 188 | 189 | * **hapi:** upgrade to hapi 18 ([#231](https://github.com/nuxt/create-nuxt-app/issues/231)) ([3112b75](https://github.com/nuxt/create-nuxt-app/commit/3112b75)) 190 | * **vuetify:** use vuetify module ([#225](https://github.com/nuxt/create-nuxt-app/issues/225)) ([1c8d944](https://github.com/nuxt/create-nuxt-app/commit/1c8d944)) 191 | * upgrade tailwindcss to v1 ([#237](https://github.com/nuxt/create-nuxt-app/issues/237)) ([b429533](https://github.com/nuxt/create-nuxt-app/commit/b429533)) 192 | 193 | 194 | 195 | # [2.6.0](https://github.com/nuxt/create-nuxt-app/compare/v2.5.1...v2.6.0) (2019-03-13) 196 | 197 | 198 | ### Bug Fixes 199 | 200 | * disable no cjs rule ([#203](https://github.com/nuxt/create-nuxt-app/issues/203)) ([9e29192](https://github.com/nuxt/create-nuxt-app/commit/9e29192)) 201 | 202 | 203 | ### Features 204 | 205 | * use ESM syntax for Nuxt config ([#195](https://github.com/nuxt/create-nuxt-app/issues/195)) ([4f9706f](https://github.com/nuxt/create-nuxt-app/commit/4f9706f)) 206 | 207 | 208 | 209 | ## [2.5.1](https://github.com/nuxt/create-nuxt-app/compare/v2.5.0...v2.5.1) (2019-03-06) 210 | 211 | 212 | 213 | # [2.5.0](https://github.com/nuxt/create-nuxt-app/compare/v2.4.3...v2.5.0) (2019-03-06) 214 | 215 | 216 | ### Bug Fixes 217 | 218 | * add coverage config to jest setup ([#198](https://github.com/nuxt/create-nuxt-app/issues/198)) ([85a29ec](https://github.com/nuxt/create-nuxt-app/commit/85a29ec)) 219 | * initial value of Express host and port ([#202](https://github.com/nuxt/create-nuxt-app/issues/202)) ([84110e2](https://github.com/nuxt/create-nuxt-app/commit/84110e2)) 220 | 221 | 222 | ### Features 223 | 224 | * add eslint nuxt plugin ([#199](https://github.com/nuxt/create-nuxt-app/issues/199)) ([730e6a0](https://github.com/nuxt/create-nuxt-app/commit/730e6a0)) 225 | --------------------------------------------------------------------------------