├── .browserslistrc ├── .eslintrc.js ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── LICENSE ├── README.md ├── babel.config.js ├── cypress.json ├── dev.code-workspace ├── jest.config.js ├── package.json ├── public ├── favicon.ico ├── img │ ├── icons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── android-chrome-maskable-192x192.png │ │ ├── android-chrome-maskable-512x512.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── logo.svg │ │ ├── msapplication-icon-144x144.png │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ ├── vue-boilerplates-bg.png │ │ ├── vue-boilerplates.png │ │ └── vue-boilerplates.svg │ └── vue-boilerplates.svg ├── index.html └── robots.txt ├── src ├── App.vue ├── assets │ ├── css │ │ └── styles.scss │ └── img │ │ └── logo.svg ├── components │ └── Navbar.vue ├── main.ts ├── pages │ ├── About.vue │ └── Home.vue ├── registerServiceWorker.ts ├── router │ └── index.ts ├── shims-tsx.d.ts ├── shims-vue.d.ts ├── store │ └── index.ts └── utils │ └── vue-imports.ts ├── tests ├── e2e │ ├── .eslintrc.js │ ├── plugins │ │ └── index.js │ ├── specs │ │ └── test.js │ └── support │ │ ├── commands.js │ │ └── index.js └── unit │ └── example.spec.ts ├── tsconfig.json ├── vue.config.js └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | browser: true, 6 | }, 7 | extends: [ 8 | "plugin:vue/essential", 9 | "plugin:prettier/recommended", 10 | "eslint:recommended", 11 | "@vue/typescript/recommended", 12 | "@vue/prettier", 13 | "@vue/prettier/@typescript-eslint", 14 | ], 15 | parserOptions: { 16 | ecmaVersion: 2020, 17 | }, 18 | rules: { 19 | "vue/component-name-in-template-casing": ["error", "PascalCase"], 20 | "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", 21 | "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", 22 | }, 23 | overrides: [ 24 | { 25 | files: [ 26 | "**/__tests__/*.{j,t}s?(x)", 27 | "**/tests/unit/**/*.spec.{j,t}s?(x)", 28 | ], 29 | env: { 30 | jest: true, 31 | }, 32 | }, 33 | ], 34 | }; 35 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | ko_fi: sureshbabusakthi 3 | custom: ['https://www.buymeacoffee.com/zxqp'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | /tests/e2e/videos/ 6 | /tests/e2e/screenshots/ 7 | 8 | # local env files 9 | .env.local 10 | .env.*.local 11 | 12 | # Log files 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | 17 | #lock file 18 | #yarn.lock 19 | .yarnclean 20 | 21 | # Editor directories and files 22 | .idea 23 | .vscode 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | #*.code-workspace 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Suresh Babu Sakthi 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Boilerplates : vue-typescript-boilerplate 2 | [](https://app.fossa.com/projects/git%2Bgithub.com%2FVue-Boilerplates%2Fvue-typescript-boilerplate?ref=badge_shield) 3 | 4 | 5 | > A vue.js project with Latest Vue + Typescript + Lazy loading and code splitting 6 | 7 | ## Why to choose Vue Boilerplates? 8 | > While mobile-first approach becomes a standard and uncertain network conditions are something we should always take into consideration, it’s harder and harder to keep your application loading fast. Hence **Vue Boilerplates** are built with vue.js performance optimization techniques that make them loading instantly and perform smooth :rocket:. 9 | **Please consider becoming a [donor](https://opencollective.com/vue-boilerplates)**. :pray: 10 | 11 | ## Features 12 | The following features are delivered out of the box in this repo, you are just one click away from starting your Progressive Web application (PWA) with advanced features of Vue, 13 | 14 | - Vue 15 | - Vue router 16 | - Vuex 17 | - Vue Class Component 18 | - Typescript 19 | - PWA - service worker 20 | - SASS 21 | - babel 22 | - Webpack bundling 23 | - Prettier 24 | - ESLint 25 | - cypress 26 | - jest 27 | - gitignore 28 | - VScode Workspace (optional) 29 | 30 | ## Bonus 31 | **Lazy loading and Code Splitting** 32 | With dynamic imports, all pages including their dependency libraries are exported as web chunks with custom name references for lazy loading :sunglasses: 33 | Even Vue library was exported as a seperate web chunk :heart_eyes: 34 | 35 | ## Getting started 36 | 37 | ```bash 38 | # 1. Clone the repository. 39 | git clone https://github.com/Vue-Boilerplates/vue-typescript-boilerplate.git my-new-project 40 | 41 | # 2. Enter your newly-cloned folder. 42 | cd my-new-project 43 | 44 | ``` 45 | 46 | ```bash 47 | ## proceed with yarn 48 | 49 | # 3. Install dependencies. Make sure yarn is installed: https://yarnpkg.com/lang/en/docs/install 50 | yarn 51 | 52 | # 4. Serve with hot reload at localhost:8080 53 | yarn serve 54 | 55 | # 5. Build for production with minification 56 | yarn build 57 | ``` 58 | 59 | 60 | ```bash 61 | ## proceed with npm 62 | 63 | # 3. Install dependencies. Make sure npm is installed: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm 64 | npm install 65 | 66 | # 4. Serve with hot reload at localhost:8080 67 | npm run serve 68 | 69 | # 5. Build for production with minification 70 | npm run build 71 | ``` 72 | 73 | ## Coming Soon! 74 | - More Boilerplates - Android and iOS Apps 75 | - Detailed Documentation 76 | - Practical Examples 77 | 78 | # Support 79 | 80 | [Give me a Star⭐️](https://github.com/Vue-Boilerplates/vue-typescript-boilerplate) 81 | 82 | [Buy me a ☕️!](https://www.buymeacoffee.com/zxqp) 83 | 84 | [](https://ko-fi.com/sureshbabusakthi) 85 | 86 | # License 87 | Released under the MIT [License](./LICENSE) 88 | 89 | [](https://app.fossa.com/api/projects/git%2Bgithub.com%2FVue-Boilerplates%2Fvue-typescript-boilerplate.svg?type=small) 90 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"], 3 | }; 4 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /dev.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | }, 6 | ], 7 | "settings": { 8 | "eslint.validate": [ 9 | "vue", 10 | "javascript", 11 | "typescript", 12 | "javascriptreact" 13 | ], 14 | // "eslint.validate": [ 15 | // { 16 | // "language": "vue", 17 | // "autoFix": true 18 | // }, 19 | // { 20 | // "language": "javascript", 21 | // "autoFix": true 22 | // }, 23 | // { 24 | // "language": "typescript", 25 | // "autoFix": true 26 | // }, 27 | // { 28 | // "language": "javascriptreact", 29 | // "autoFix": true 30 | // } 31 | // ], 32 | // "eslint.autoFixOnSave": true, 33 | // "editor.formatOnSave": false, 34 | "vetur.validation.template": true, 35 | "editor.codeActionsOnSave": { 36 | "source.fixAll.eslint": true 37 | }, 38 | "cSpell.words": [ 39 | 40 | ], 41 | "editor.renameOnType": true 42 | } 43 | } -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel", 3 | }; 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-typescript-boilerplate", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "test:unit": "vue-cli-service test:unit", 9 | "test:e2e": "vue-cli-service test:e2e", 10 | "lint": "vue-cli-service lint" 11 | }, 12 | "dependencies": { 13 | "core-js": "3.6.5", 14 | "moment": "2.27.0", 15 | "register-service-worker": "1.7.1", 16 | "vue": "2.6.11", 17 | "vue-router": "3.3.4", 18 | "vuex": "3.5.1" 19 | }, 20 | "devDependencies": { 21 | "@types/jest": "25.2.3", 22 | "@typescript-eslint/eslint-plugin": "2.34.0", 23 | "@typescript-eslint/parser": "2.34.0", 24 | "@vue/cli-plugin-babel": "4.4.6", 25 | "@vue/cli-plugin-e2e-cypress": "4.4.6", 26 | "@vue/cli-plugin-eslint": "4.4.6", 27 | "@vue/cli-plugin-pwa": "4.4.6", 28 | "@vue/cli-plugin-router": "4.4.6", 29 | "@vue/cli-plugin-typescript": "4.4.6", 30 | "@vue/cli-plugin-unit-jest": "4.4.6", 31 | "@vue/cli-plugin-vuex": "4.4.6", 32 | "@vue/cli-service": "4.4.6", 33 | "@vue/eslint-config-prettier": "6.0.0", 34 | "@vue/eslint-config-typescript": "5.0.2", 35 | "@vue/preload-webpack-plugin": "1.1.1", 36 | "@vue/test-utils": "1.0.3", 37 | "eslint": "6.8.0", 38 | "eslint-plugin-prettier": "3.1.4", 39 | "eslint-plugin-vue": "6.2.2", 40 | "moment-locales-webpack-plugin": "1.2.0", 41 | "node-sass": "4.14.1", 42 | "prettier": "2.0.5", 43 | "sass-loader": "8.0.2", 44 | "typescript": "3.9.6", 45 | "vue-class-component": "7.2.3", 46 | "vue-property-decorator": "8.5.0", 47 | "vue-template-compiler": "2.6.11" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/favicon.ico -------------------------------------------------------------------------------- /public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-maskable-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/android-chrome-maskable-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-maskable-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/android-chrome-maskable-512x512.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/favicon.ico -------------------------------------------------------------------------------- /public/img/icons/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/icons/vue-boilerplates-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/vue-boilerplates-bg.png -------------------------------------------------------------------------------- /public/img/icons/vue-boilerplates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vue-Boilerplates/vue-typescript-boilerplate/baad3a1cfc6bc0447bef373e2e549f40e80e89cd/public/img/icons/vue-boilerplates.png -------------------------------------------------------------------------------- /public/img/icons/vue-boilerplates.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/vue-boilerplates.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |11 | While mobile-first approach becomes a standard and uncertain network 12 | conditions are something we should always take into consideration, it’s 13 | harder and harder to keep your application loading fast. Vue 14 | Boilerplates was built with vue.js performance optimization techniques 15 | that make them loading instantly and perform smooth 🚀. 16 |
17 |22 | Make a custom one time or recurring contribution to support my open 23 | source projects 24 |
25 | Donate 30 | 31 |