├── src
├── views
│ ├── About.vue
│ ├── 404.vue
│ ├── Home.vue
│ ├── Article.vue
│ ├── ModifyBlog.vue
│ └── Edit.vue
├── assets
│ ├── logo.png
│ └── styles
│ │ ├── app.scss
│ │ ├── common.scss
│ │ ├── element.scss
│ │ ├── responsive.scss
│ │ └── modules
│ │ └── card.scss
├── shims-vue.d.ts
├── Interfaces
│ └── Posts.ts
├── store
│ ├── index.ts
│ └── modules
│ │ ├── globalValues.ts
│ │ └── posts.ts
├── shims-tsx.d.ts
├── utils
│ └── utils.ts
├── main.ts
├── api
│ └── index.ts
├── App.vue
├── router
│ └── index.ts
└── components
│ ├── Navbar.vue
│ └── HelloWorld.vue
├── .browserslistrc
├── .prettierrc.js
├── babel.config.js
├── public
├── favicon.ico
└── index.html
├── jest.config.js
├── tests
└── unit
│ └── example.spec.ts
├── .gitignore
├── tsconfig.json
├── .eslintrc.js
├── README.md
└── package.json
/src/views/About.vue:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | semi: false,
3 | singleQuote: true
4 | }
5 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ["@vue/cli-plugin-babel/preset"]
3 | };
4 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/preetishhs/Vue-typescript-example/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/preetishhs/Vue-typescript-example/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/src/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.vue" {
2 | import Vue from "vue";
3 | export default Vue;
4 | }
5 |
--------------------------------------------------------------------------------
/src/assets/styles/app.scss:
--------------------------------------------------------------------------------
1 | @import 'responsive';
2 | @import 'common';
3 | @import './modules/card.scss';
4 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel"
3 | };
4 |
--------------------------------------------------------------------------------
/src/assets/styles/common.scss:
--------------------------------------------------------------------------------
1 | .page-title {
2 | text-align: center;
3 | font-size: 32px;
4 | padding: 4rem;
5 | }
6 |
--------------------------------------------------------------------------------
/src/Interfaces/Posts.ts:
--------------------------------------------------------------------------------
1 | interface Post {
2 | title: string
3 | id: number
4 | body: string
5 | }
6 |
7 | export { Post }
8 |
--------------------------------------------------------------------------------
/src/assets/styles/element.scss:
--------------------------------------------------------------------------------
1 | $--font-path: '~element-ui/lib/theme-chalk/fonts';
2 | @import '~element-ui/packages/theme-chalk/src/index';
3 |
--------------------------------------------------------------------------------
/tests/unit/example.spec.ts:
--------------------------------------------------------------------------------
1 | import { shallowMount } from '@vue/test-utils'
2 |
3 | describe('HelloWorld.vue', () => {
4 | it('Sanity test', () => {
5 | expect(1).toBe(1)
6 | })
7 | })
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
--------------------------------------------------------------------------------
/src/store/index.ts:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import globalValues from '@/store/modules/globalValues'
4 | import posts from '@/store/modules/posts'
5 | Vue.use(Vuex)
6 | const store = new Vuex.Store({
7 | modules: {
8 | globalValues,
9 | posts
10 | }
11 | })
12 | export default store
13 |
--------------------------------------------------------------------------------
/src/views/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
23 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation.
10 |