Skip to content

Commit 1f00c90

Browse files
committed
Feature(template): add basic vue-typescript-admin-template code
0 parents  commit 1f00c90

File tree

107 files changed

+12283
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+12283
-0
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

.editorconfig

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# http://editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
# Indentation override for js(x), ts(x) and vue files
14+
[*.{js,jsx,ts,tsx,vue}]
15+
indent_size = 2
16+
indent_style = space
17+
18+
# Indentation override for css related files
19+
[*.{css,styl,scss,less,sass}]
20+
indent_size = 2
21+
indent_style = space
22+
23+
# Indentation override for html files
24+
[*.html]
25+
indent_size = 2
26+
indent_style = space
27+
28+
# Trailing space override for markdown file
29+
[*.md]
30+
trim_trailing_whitespace = false
31+
32+
# Indentation override for config files
33+
[*.{json,yml}]
34+
indent_size = 2
35+
indent_style = space

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VUE_APP_MOCK_API=https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin

.eslintrc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "eslint:recommended",
3+
"parserOptions": {
4+
"ecmaVersion": 6
5+
},
6+
"env": {
7+
"node": true
8+
},
9+
"rules": {
10+
"comma-dangle": 2
11+
}
12+
}

.github/CODE_OF_CONDUCT.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)
72+
73+
[homepage]: https://www.contributor-covenant.org

.github/COMMIT_CONVENTION.md

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
## TL;DR
6+
7+
Messages must be matched by the following regex:
8+
9+
``` js
10+
/^(Revert: )?(Feature|Fix|Docs|Improve|Config|Example|Refactor|Style|Test|Build|CI)(\(.+\))?: .{1,80}/
11+
```
12+
13+
## Commit Message Format
14+
15+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
16+
17+
```text
18+
<type>(<scope>): <subject>
19+
<BLANK LINE>
20+
<body>
21+
<BLANK LINE>
22+
<footer>
23+
```
24+
25+
The **header** is mandatory and the **scope** of the header is optional.
26+
27+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
28+
to read on GitHub as well as in various git tools.
29+
30+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
31+
32+
Samples: (even more [samples](https://github.com/Armour/vue-typescript-admin-template/commits/master))
33+
34+
```text
35+
Docs(changelog): update changelog to beta.5
36+
```
37+
38+
```text
39+
Feature($browser): onUrlChange event (popstate/hashchange/polling)
40+
41+
Added new event to $browser:
42+
- forward popstate event if available
43+
- forward hashchange event if popstate not available
44+
- do polling when neither popstate nor hashchange available
45+
46+
Breaks $browser.onHashChange, which was removed (use onUrlChange instead)
47+
```
48+
49+
```text
50+
Fix(release): need to depend on latest rxjs and zone.js
51+
52+
The version in our package.json gets copied to the one we publish, and users need the latest of these.
53+
54+
Closes #123, #245, #992
55+
56+
BREAKING CHANGE: isolate scope bindings definition has changed and
57+
the inject option for the directive controller injection was removed.
58+
59+
To migrate the code follow the example below:
60+
61+
Before:
62+
63+
scope: {
64+
myAttr: 'attribute',
65+
myBind: 'bind',
66+
myExpression: 'expression',
67+
myEval: 'evaluate',
68+
myAccessor: 'accessor'
69+
}
70+
71+
After:
72+
73+
scope: {
74+
myAttr: '@',
75+
myBind: '@',
76+
myExpression: '&',
77+
// myEval - usually not useful, but in cases where the expression is assignable, you can use '='
78+
myAccessor: '=' // in directive's template change myAccessor() to myAccessor
79+
}
80+
81+
The removed `inject` wasn't generaly useful for directives so there should be no code using it.
82+
```
83+
84+
### Revert
85+
86+
If the commit reverts a previous commit, it should begin with `Revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
87+
88+
### Type
89+
90+
Must be one of the following:
91+
92+
* **Build**: Changes that affect the build system or external dependencies (example scopes: gulp, npm, yarn)
93+
* **CI**: Changes to CI related configuration files and scripts (example scopes: travis, circle, browserstack)
94+
* **Config**: Changes to other configuration files (example scopes: webpack, babel, docker)
95+
* **Docs**: Documentation only changes (example scopes: readme, changelog)
96+
* **Example**: Changes for example code
97+
* **Feature**: A new feature
98+
* **Fix**: A bug fix
99+
* **Improve**: Backwards-compatible enhancement changes
100+
* **Refactor**: A code change that neither fixes a bug nor adds a feature
101+
* **Style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
102+
* **Test**: Changes for testing code
103+
104+
If the prefix is `Feature` or `Fix`, it will appear in the changelog. However if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
105+
106+
### Scope
107+
108+
The scope could be anything specifying place of the commit change. For example `core`, `compiler`, `ssr`, `v-model`, `transition` etc...
109+
110+
### Subject
111+
112+
The subject contains succinct description of the change:
113+
114+
* use the imperative, present tense: "change" not "changed" nor "changes"
115+
* don't capitalize the first letter
116+
* no dot (.) at the end
117+
118+
### Body
119+
120+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
121+
The body should include the motivation for the change and contrast this with previous behavior.
122+
123+
### Footer
124+
125+
The footer should contain any information about **Breaking Changes** and is also the place to
126+
reference GitHub issues that this commit **Closes**.
127+
128+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
129+
130+
A detailed explanation can be found in this [document](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit)

.github/CONTRIBUTING.md

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Contributing
2+
3+
## Code of Conduct
4+
5+
Help us keep vue-typescript-admin-template open and inclusive. Please read and follow the [Code of Conduct](https://github.com/Armour/vue-typescript-admin-template/blob/master/.github/CODE_OF_CONDUCT.md).
6+
7+
## Found a Bug
8+
9+
If you find a bug in the source code, you can help us by [submitting an issue](#submitting-an-issue) to our [GitHub Repository](https://github.com/Armour/vue-typescript-admin-template). Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix.
10+
11+
## Missing a Feature
12+
13+
You can *request* a new feature by [submitting an issue](#submitting-an-issue) to our GitHub Repository. If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
14+
15+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
16+
17+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request).
18+
19+
## Submission Guidelines
20+
21+
### Submitting an Issue
22+
23+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
24+
25+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction scenario. Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions.
26+
27+
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
28+
29+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
30+
31+
You can file new issues by filling out the [new issue form](https://github.com/Armour/vue-typescript-admin-template/issues/new).
32+
33+
### Submitting a Pull Request
34+
35+
Before you submit your Pull Request (PR) consider the following guidelines:
36+
37+
1. Search [GitHub](https://github.com/Armour/vue-typescript-admin-template/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort.
38+
39+
1. Fork this repo.
40+
41+
1. Make your changes in a new git branch.
42+
43+
```shell
44+
git checkout -b my-new-feature master
45+
```
46+
47+
1. Commit your changes using a descriptive commit message that follows our [commit message convention](#commit-message-convention). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
48+
49+
```shell
50+
git commit -am 'Add some feature'
51+
```
52+
53+
1. Push your branch.
54+
55+
```shell
56+
git push origin my-new-feature
57+
```
58+
59+
1. Send a pull request :D
60+
61+
That's it! Thank you for your contribution!
62+
63+
#### After your pull request is merged
64+
65+
After your pull request is merged, you can safely delete your branch and pull the changes
66+
from the main (upstream) repository:
67+
68+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
69+
70+
```shell
71+
git push origin --delete my-new-feature
72+
```
73+
74+
* Check out the master branch:
75+
76+
```shell
77+
git checkout master -f
78+
```
79+
80+
* Delete the local branch:
81+
82+
```shell
83+
git branch -D my-new-feature
84+
```
85+
86+
* Update your master with the latest upstream version:
87+
88+
```shell
89+
git pull
90+
```
91+
92+
## Commit Message Convention
93+
94+
We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate the change log**.
95+
96+
Please read and follow the [Commit Message Format](https://github.com/Armour/vue-typescript-admin-template/blob/master/.github/COMMIT_CONVENTION.md).

.github/ISSUE_TEMPLATE.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!--
2+
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.
3+
4+
ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
5+
-->
6+
7+
<!-- Please search GitHub for a similar issue or PR before submitting -->
8+
9+
# I'm submitting a
10+
11+
<!--
12+
E.g.
13+
bug report,
14+
feature request,
15+
performance issue,
16+
regression (a behavior that used to work and stopped working in a new release),
17+
documentation issue or request,
18+
or others... (please describe)
19+
-->
20+
21+
## Current behavior
22+
23+
<!-- Describe how the issue manifests. -->
24+
25+
## Expected behavior
26+
27+
<!-- Describe what the desired behavior would be. -->
28+
29+
## Minimal reproduction of the problem with instructions
30+
31+
<!--
32+
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via github repo or similar tools.
33+
-->
34+
35+
## What is the motivation / use case for changing the behavior
36+
37+
<!-- Describe the motivation or the concrete use case. -->
38+
39+
## Environment
40+
41+
<!-- Anything may be useful? Platform, Operating system version, IDE, package manager, HTTP server, ... -->

0 commit comments

Comments
 (0)