Skip to content

Commit b925c02

Browse files
author
BYSu
committed
init
0 parents  commit b925c02

32 files changed

+10651
-0
lines changed

.browserslistrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 1%
2+
last 2 versions

.editorconfig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[*.{js,jsx,ts,tsx,vue}]
2+
indent_style = space
3+
indent_size = 2
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true

.eslintrc.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:vue/recommended',
8+
'@vue/standard'
9+
],
10+
rules: {
11+
'no-console': 'off',
12+
'no-debugger': 'off'
13+
},
14+
parserOptions: {
15+
parser: 'babel-eslint'
16+
},
17+
overrides: [
18+
{
19+
files: [
20+
'**/__tests__/*.{j,t}s?(x)'
21+
],
22+
env: {
23+
mocha: true
24+
}
25+
}
26+
]
27+
}

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script>
2+
export default {
3+
name: '{{ camelCase name }}'
4+
}
5+
</script>
6+
7+
<template src="./template.html"></template>
8+
<style lang="scss" src="./style.scss"></style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"suffixesToIgnoreInInput": [
3+
"Component"
4+
],
5+
"createFilesInFolderWithPattern": "__pascalCase_name__"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.{{camelCase name}}{
2+
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="{{camelCase name}}">
2+
{{pascalCase name}}
3+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Vue from 'vue'
2+
import {{pascalCase name}} from './index.vue'
3+
4+
Vue.component('{{pascalCase name}}', {{pascalCase name}})
5+
6+
export default { title: '{{pascalCase name}}' }
7+
8+
export const withText = () => '<{{pascalCase name}}>with text</{{pascalCase name}}>'
9+
10+
export const withEmoji = () => '<{{pascalCase name}}>😀 😎 👍 💯{{pascalCase name}}</{{pascalCase name}}>'
11+
12+
export const asAComponent = () => ({
13+
name: 'asAComponent',
14+
components: { {{pascalCase name}} },
15+
render: h => <{{pascalCase name}} ></{{pascalCase name}}>
16+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<template>
2+
<div class="{{camelCase name}}">
3+
{{pascalCase name}}
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: '{{ camelCase name }}'
10+
}
11+
</script>
12+
13+
<style lang="scss" src="./style.scss"></style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"suffixesToIgnoreInInput": [
3+
"Component"
4+
],
5+
"createFilesInFolderWithPattern": "__pascalCase_name__"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.{{camelCase name}}{
2+
3+
}

.vscode/extensions.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"octref.vetur",
5+
"esbenp.prettier-vscode",
6+
"kisstkondoros.vscode-codemetrics",
7+
"streetsidesoftware.code-spell-checker"
8+
]
9+
}

.vscode/settings.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"editor.formatOnSave": false,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll": true
5+
},
6+
"eslint.autoFixOnSave": true,
7+
"eslint.alwaysShowStatus": true,
8+
"eslint.options": {
9+
"extenstions": [
10+
".html",
11+
".js",
12+
".vue"
13+
]
14+
},
15+
"eslint.validate": [
16+
{
17+
"language": "html",
18+
"autoFix": true
19+
},
20+
{
21+
"language": "javascript",
22+
"autoFix": true
23+
},
24+
{
25+
"language": "vue",
26+
"autoFix": true
27+
}
28+
],
29+
"blueprint.templatesPath": [
30+
"../blueprint-templates",
31+
"./.vscode/blueprint-templates"
32+
]
33+
}

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# vuejs-playground
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn run build
16+
```
17+
18+
### Run your tests
19+
```
20+
yarn run test
21+
```
22+
23+
### Lints and fixes files
24+
```
25+
yarn run lint
26+
```
27+
28+
### Run your unit tests
29+
```
30+
yarn run test:unit
31+
```
32+
33+
### Customize configuration
34+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

package.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "vuejs-playground",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint",
9+
"dev": "vue-cli-service build --mode development",
10+
"test:unit": "vue-cli-service test:unit"
11+
},
12+
"dependencies": {
13+
"core-js": "^3.4.3",
14+
"vue": "^2.6.11",
15+
"vue-router": "^3.1.3",
16+
"vuex": "^3.1.2"
17+
},
18+
"devDependencies": {
19+
"@vue/cli-plugin-babel": "^4.1.0",
20+
"@vue/cli-plugin-eslint": "^4.1.0",
21+
"@vue/cli-plugin-unit-mocha": "^4.1.0",
22+
"@vue/cli-service": "^4.5.0",
23+
"@vue/eslint-config-standard": "^4.0.0",
24+
"@vue/test-utils": "1.0.0-beta.29",
25+
"babel-eslint": "^10.0.3",
26+
"chai": "^4.1.2",
27+
"eslint": "^5.16.0",
28+
"eslint-plugin-vue": "^5.0.0",
29+
"lint-staged": "^9.4.3",
30+
"node-sass": "^4.12.0",
31+
"sass-loader": "^8.0.0",
32+
"vue-template-compiler": "^2.6.11"
33+
},
34+
"gitHooks": {
35+
"pre-commit": "lint-staged"
36+
},
37+
"lint-staged": {
38+
"*.{js,vue}": [
39+
"vue-cli-service lint",
40+
"git add"
41+
]
42+
}
43+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/index.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-TW">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<meta
8+
name="Description"
9+
content="請更新內容"
10+
/>
11+
<meta http-equiv="Cache-control" content="no-cache" />
12+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
13+
<title>vue-cli-template</title>
14+
</head>
15+
<body>
16+
<noscript>
17+
<strong>We're sorry but vue-cli-template doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
18+
</noscript>
19+
<div id="app"></div>
20+
<!-- built files will be auto injected -->
21+
</body>
22+
</html>

src/App.vue

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<div id="app">
3+
<div id="nav">
4+
<router-link to="/">
5+
Home
6+
</router-link> |
7+
<router-link to="/about">
8+
About
9+
</router-link>
10+
</div>
11+
<router-view />
12+
</div>
13+
</template>
14+
15+
<style lang="scss" src="./assets/style/main.scss"></style>

src/assets/logo.png

6.69 KB
Loading

src/assets/style/main.scss

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@import 'reset';
2+
@import 'utils';
3+
4+
#app {
5+
font-family: 'Avenir', Helvetica, Arial, sans-serif;
6+
-webkit-font-smoothing: antialiased;
7+
-moz-osx-font-smoothing: grayscale;
8+
text-align: center;
9+
color: #2c3e50;
10+
}
11+
12+
#nav {
13+
padding: 30px;
14+
15+
a {
16+
font-weight: bold;
17+
color: #2c3e50;
18+
19+
&.router-link-exact-active {
20+
color: #42b983;
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)