Skip to content

Commit 8962e69

Browse files
author
Justus Bogner
committed
Initial commit
1 parent eb6351e commit 8962e69

20 files changed

+11298
-2
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 4

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# git ls-files --others --exclude-from=.git/info/exclude
2+
# Lines that start with '#' are comments.
3+
*.settings
4+
*.classpath
5+
node_modules
6+
dist
7+
build
8+
target
9+
npm-debug.log
10+
.vscode
11+
typings
12+
build.log.json
13+
coverage/

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
# skeleton-vue-typescript
2-
A skeleton project with Vue.js, TypeScript, Bootstrap, Less, Webpack, and Jest.
1+
# Vue.js TypeScript Frontend Skeleton Project
2+
3+
> A skeleton project with Vue.js, TypeScript, Bootstrap, Less, Webpack, and Jest.
4+
5+
## Structure
6+
7+
- `src/app.ts`: main file of the app that loads and configures all dependencies and kickstarts the parent Vue component
8+
- `src/routes.ts`: configuration of routes (`route`: binding a `component` to a certain `path`)
9+
- `src/common/`: directory for shared functionality that is not specific to a certain Vue or domain concept
10+
- `src/components/`: directory for all Vues; should be structured according to domain concepts
11+
- `src/components/App.vue`: basic app skeleton with header/nav, body, and footer
12+
- `src/conf/config.ts`: configuration file with app or environment specific properties
13+
- `test/`: directory for all tests
14+
15+
## Build Setup
16+
17+
``` bash
18+
# install dependencies
19+
npm install
20+
21+
# serve locally with hot reload (localhost:9000, adjustable in webpack.dev.config.js)
22+
npm start
23+
24+
# build for production with minification
25+
npm run build
26+
27+
# run TypeScript linter
28+
npm run lint
29+
30+
# run tests and create coverage reports
31+
npm test
32+
```
33+
34+
## Useful VSCode Extensions
35+
36+
- Vetur (helps with Vue SFCs)
37+
- TSLint (enforces coding rules in `tslint.json`)
38+
- Prettier (formats Vue files)
39+
- EditorConfig (enforces code formatting in `.editorconfig`)
40+
41+
## VSCode Settings
42+
43+
```json
44+
{
45+
"editor.formatOnSave": true,
46+
"prettier.disableLanguages": [
47+
"markdown"
48+
],
49+
"tslint.alwaysShowRuleFailuresAsWarnings": true,
50+
"tslint.autoFixOnSave": true,
51+
"vetur.format.defaultFormatter.html": "js-beautify-html"
52+
}
53+
```

declarations.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// allows you to `import Foo from "./Foo"` without warnings when Foo is a ".vue" file.
2+
// this is kinda similar to webpack's `extensions: [".vue"]`, but for TypeScript tooling
3+
declare module "*.vue" {
4+
import Vue from "vue";
5+
export default Vue;
6+
}

0 commit comments

Comments
 (0)