Skip to content

Commit c8b7851

Browse files
committedJul 13, 2021
feat: 项目初始化
0 parents  commit c8b7851

26 files changed

+9183
-0
lines changed
 

‎.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
insert_final_newline = true

‎.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### gradle ###
2+
.gradle
3+
4+
### vertx ###
5+
.vertx
6+
7+
### class ###
8+
out
9+
bin
10+
target
11+
12+
### idea ###
13+
.idea
14+
*.iml
15+
16+
### log ###
17+
logs
18+
*.log
19+
20+
### mac ###
21+
*.DS_Store
22+

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
无忧建站

‎build.gradle.kts

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
3+
4+
plugins {
5+
java
6+
id("com.github.johnrengelman.shadow") version "7.0.0"
7+
}
8+
9+
group = "cn.youyi"
10+
version = "1.0.0-SNAPSHOT"
11+
12+
repositories {
13+
mavenCentral()
14+
}
15+
16+
val vertxVersion = "4.1.1"
17+
val junitJupiterVersion = "5.7.0"
18+
19+
val mainClassName = "cn.youyi.dockerv.AppBootstrap"
20+
21+
dependencies {
22+
implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
23+
implementation("io.vertx:vertx-web-validation")
24+
implementation("io.vertx:vertx-auth-jwt")
25+
implementation("io.vertx:vertx-web")
26+
implementation("io.vertx:vertx-pg-client")
27+
implementation("io.vertx:vertx-mail-client")
28+
implementation("io.vertx:vertx-web-templ-freemarker")
29+
implementation("com.jcraft:jsch:0.1.55")
30+
testImplementation("io.vertx:vertx-junit5")
31+
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
32+
}
33+
34+
java {
35+
sourceCompatibility = JavaVersion.VERSION_11
36+
targetCompatibility = JavaVersion.VERSION_11
37+
}
38+
39+
tasks.withType<ShadowJar> {
40+
minimize()
41+
archiveClassifier.set("fat")
42+
manifest {
43+
attributes(mapOf("Main-Class" to mainClassName))
44+
}
45+
mergeServiceFiles()
46+
}
47+
48+
tasks.withType<Test> {
49+
useJUnitPlatform()
50+
testLogging {
51+
events = setOf(PASSED, SKIPPED, FAILED)
52+
}
53+
}

‎gradle/wrapper/gradle-wrapper.jar

57.8 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

‎gradlew

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
#!/usr/bin/env sh
2+
3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
##############################################################################
20+
##
21+
## Gradle start up script for UN*X
22+
##
23+
##############################################################################
24+
25+
# Attempt to set APP_HOME
26+
# Resolve links: $0 may be a link
27+
PRG="$0"
28+
# Need this for relative symlinks.
29+
while [ -h "$PRG" ] ; do
30+
ls=`ls -ld "$PRG"`
31+
link=`expr "$ls" : '.*-> \(.*\)$'`
32+
if expr "$link" : '/.*' > /dev/null; then
33+
PRG="$link"
34+
else
35+
PRG=`dirname "$PRG"`"/$link"
36+
fi
37+
done
38+
SAVED="`pwd`"
39+
cd "`dirname \"$PRG\"`/" >/dev/null
40+
APP_HOME="`pwd -P`"
41+
cd "$SAVED" >/dev/null
42+
43+
APP_NAME="Gradle"
44+
APP_BASE_NAME=`basename "$0"`
45+
46+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48+
49+
# Use the maximum available, or set MAX_FD != -1 to use that value.
50+
MAX_FD="maximum"
51+
52+
warn () {
53+
echo "$*"
54+
}
55+
56+
die () {
57+
echo
58+
echo "$*"
59+
echo
60+
exit 1
61+
}
62+
63+
# OS specific support (must be 'true' or 'false').
64+
cygwin=false
65+
msys=false
66+
darwin=false
67+
nonstop=false
68+
case "`uname`" in
69+
CYGWIN* )
70+
cygwin=true
71+
;;
72+
Darwin* )
73+
darwin=true
74+
;;
75+
MINGW* )
76+
msys=true
77+
;;
78+
NONSTOP* )
79+
nonstop=true
80+
;;
81+
esac
82+
83+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84+
85+
86+
# Determine the Java command to use to start the JVM.
87+
if [ -n "$JAVA_HOME" ] ; then
88+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89+
# IBM's JDK on AIX uses strange locations for the executables
90+
JAVACMD="$JAVA_HOME/jre/sh/java"
91+
else
92+
JAVACMD="$JAVA_HOME/bin/java"
93+
fi
94+
if [ ! -x "$JAVACMD" ] ; then
95+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96+
97+
Please set the JAVA_HOME variable in your environment to match the
98+
location of your Java installation."
99+
fi
100+
else
101+
JAVACMD="java"
102+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103+
104+
Please set the JAVA_HOME variable in your environment to match the
105+
location of your Java installation."
106+
fi
107+
108+
# Increase the maximum file descriptors if we can.
109+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110+
MAX_FD_LIMIT=`ulimit -H -n`
111+
if [ $? -eq 0 ] ; then
112+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113+
MAX_FD="$MAX_FD_LIMIT"
114+
fi
115+
ulimit -n $MAX_FD
116+
if [ $? -ne 0 ] ; then
117+
warn "Could not set maximum file descriptor limit: $MAX_FD"
118+
fi
119+
else
120+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121+
fi
122+
fi
123+
124+
# For Darwin, add options to specify how the application appears in the dock
125+
if $darwin; then
126+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127+
fi
128+
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
134+
JAVACMD=`cygpath --unix "$JAVACMD"`
135+
136+
# We build the pattern for arguments to be converted via cygpath
137+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138+
SEP=""
139+
for dir in $ROOTDIRSRAW ; do
140+
ROOTDIRS="$ROOTDIRS$SEP$dir"
141+
SEP="|"
142+
done
143+
OURCYGPATTERN="(^($ROOTDIRS))"
144+
# Add a user-defined pattern to the cygpath arguments
145+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147+
fi
148+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
149+
i=0
150+
for arg in "$@" ; do
151+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153+
154+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156+
else
157+
eval `echo args$i`="\"$arg\""
158+
fi
159+
i=`expr $i + 1`
160+
done
161+
case $i in
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172+
esac
173+
fi
174+
175+
# Escape application args
176+
save () {
177+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178+
echo " "
179+
}
180+
APP_ARGS=`save "$@"`
181+
182+
# Collect all arguments for the java command, following the shell quoting and substitution rules
183+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184+
185+
exec "$JAVACMD" "$@"

‎gradlew.bat

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
17+
@if "%DEBUG%" == "" @echo off
18+
@rem ##########################################################################
19+
@rem
20+
@rem Gradle startup script for Windows
21+
@rem
22+
@rem ##########################################################################
23+
24+
@rem Set local scope for the variables with windows NT shell
25+
if "%OS%"=="Windows_NT" setlocal
26+
27+
set DIRNAME=%~dp0
28+
if "%DIRNAME%" == "" set DIRNAME=.
29+
set APP_BASE_NAME=%~n0
30+
set APP_HOME=%DIRNAME%
31+
32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
35+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37+
38+
@rem Find java.exe
39+
if defined JAVA_HOME goto findJavaFromJavaHome
40+
41+
set JAVA_EXE=java.exe
42+
%JAVA_EXE% -version >NUL 2>&1
43+
if "%ERRORLEVEL%" == "0" goto execute
44+
45+
echo.
46+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47+
echo.
48+
echo Please set the JAVA_HOME variable in your environment to match the
49+
echo location of your Java installation.
50+
51+
goto fail
52+
53+
:findJavaFromJavaHome
54+
set JAVA_HOME=%JAVA_HOME:"=%
55+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56+
57+
if exist "%JAVA_EXE%" goto execute
58+
59+
echo.
60+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61+
echo.
62+
echo Please set the JAVA_HOME variable in your environment to match the
63+
echo location of your Java installation.
64+
65+
goto fail
66+
67+
:execute
68+
@rem Setup the command line
69+
70+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71+
72+
73+
@rem Execute Gradle
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75+
76+
:end
77+
@rem End local scope for the variables with windows NT shell
78+
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
80+
:fail
81+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82+
rem the _cmd.exe /c_ return code!
83+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84+
exit /b 1
85+
86+
:mainEnd
87+
if "%OS%"=="Windows_NT" endlocal
88+
89+
:omega

‎settings.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "docker-v"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package cn.youyi.dockerv;
2+
3+
import io.vertx.core.Vertx;
4+
5+
public class AppBootstrap {
6+
7+
public static void main(String[] args) {
8+
Vertx.vertx().createHttpServer().requestHandler(req -> {
9+
req.response()
10+
.putHeader("content-type", "text/plain")
11+
.end("Hello from Vert.x!");
12+
}).listen(8888, http -> {
13+
if (http.succeeded()) {
14+
System.out.println("HTTP server started on port 8888");
15+
} else {
16+
System.err.println(http.cause().getMessage());
17+
}
18+
});
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package cn.youyi.dockerv;
2+
3+
import io.vertx.core.Vertx;
4+
import io.vertx.junit5.VertxExtension;
5+
import io.vertx.junit5.VertxTestContext;
6+
import org.junit.jupiter.api.BeforeEach;
7+
import org.junit.jupiter.api.Test;
8+
import org.junit.jupiter.api.extension.ExtendWith;
9+
10+
@ExtendWith(VertxExtension.class)
11+
public class TestAppBootstrap {
12+
13+
@BeforeEach
14+
void deploy_verticle(Vertx vertx, VertxTestContext testContext) {
15+
// vertx.deployVerticle(new AppBootstrap(), testContext.succeeding(id -> testContext.completeNow()));
16+
}
17+
18+
@Test
19+
void verticle_deployed(Vertx vertx, VertxTestContext testContext) throws Throwable {
20+
testContext.completeNow();
21+
}
22+
}

‎web/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

‎web/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# web
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
yarn lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

‎web/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+
}

‎web/package.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "docker-v",
3+
"version": "1.0.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+
},
10+
"dependencies": {
11+
"core-js": "^3.6.5",
12+
"vue": "^2.6.11",
13+
"vue-router": "^3.2.0",
14+
"vuex": "^3.4.0"
15+
},
16+
"devDependencies": {
17+
"@vue/cli-plugin-babel": "~4.5.0",
18+
"@vue/cli-plugin-eslint": "~4.5.0",
19+
"@vue/cli-plugin-router": "~4.5.0",
20+
"@vue/cli-plugin-vuex": "~4.5.0",
21+
"@vue/cli-service": "~4.5.0",
22+
"babel-eslint": "^10.1.0",
23+
"eslint": "^6.7.2",
24+
"eslint-plugin-vue": "^6.2.2",
25+
"vue-template-compiler": "^2.6.11"
26+
},
27+
"eslintConfig": {
28+
"root": true,
29+
"env": {
30+
"node": true
31+
},
32+
"extends": [
33+
"plugin:vue/essential",
34+
"eslint:recommended"
35+
],
36+
"parserOptions": {
37+
"parser": "babel-eslint"
38+
},
39+
"rules": {}
40+
},
41+
"browserslist": [
42+
"> 1%",
43+
"last 2 versions",
44+
"not dead"
45+
]
46+
}

‎web/public/favicon.ico

4.19 KB
Binary file not shown.

‎web/public/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="">
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+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

‎web/src/App.vue

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<template>
2+
<div id="app">
3+
<div id="nav">
4+
<router-link to="/">Home</router-link> |
5+
<router-link to="/about">About</router-link>
6+
</div>
7+
<router-view/>
8+
</div>
9+
</template>
10+
11+
<style>
12+
#app {
13+
font-family: Avenir, Helvetica, Arial, sans-serif;
14+
-webkit-font-smoothing: antialiased;
15+
-moz-osx-font-smoothing: grayscale;
16+
text-align: center;
17+
color: #2c3e50;
18+
}
19+
20+
#nav {
21+
padding: 30px;
22+
}
23+
24+
#nav a {
25+
font-weight: bold;
26+
color: #2c3e50;
27+
}
28+
29+
#nav a.router-link-exact-active {
30+
color: #42b983;
31+
}
32+
</style>

‎web/src/assets/logo.png

6.69 KB
Loading

‎web/src/components/HelloWorld.vue

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<template>
2+
<div class="hello">
3+
<h1>{{ msg }}</h1>
4+
<p>
5+
For a guide and recipes on how to configure / customize this project,<br>
6+
check out the
7+
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8+
</p>
9+
<h3>Installed CLI Plugins</h3>
10+
<ul>
11+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
12+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
13+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
14+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
15+
</ul>
16+
<h3>Essential Links</h3>
17+
<ul>
18+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
19+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
20+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
21+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
22+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
23+
</ul>
24+
<h3>Ecosystem</h3>
25+
<ul>
26+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
27+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
28+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
29+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
30+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
31+
</ul>
32+
</div>
33+
</template>
34+
35+
<script>
36+
export default {
37+
name: 'HelloWorld',
38+
props: {
39+
msg: String
40+
}
41+
}
42+
</script>
43+
44+
<!-- Add "scoped" attribute to limit CSS to this component only -->
45+
<style scoped>
46+
h3 {
47+
margin: 40px 0 0;
48+
}
49+
ul {
50+
list-style-type: none;
51+
padding: 0;
52+
}
53+
li {
54+
display: inline-block;
55+
margin: 0 10px;
56+
}
57+
a {
58+
color: #42b983;
59+
}
60+
</style>

‎web/src/main.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Vue from 'vue'
2+
import App from './App.vue'
3+
import router from './router'
4+
import store from './store'
5+
6+
Vue.config.productionTip = false
7+
8+
new Vue({
9+
router,
10+
store,
11+
render: h => h(App)
12+
}).$mount('#app')

‎web/src/router/index.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import Vue from 'vue'
2+
import VueRouter from 'vue-router'
3+
import Home from '../views/Home.vue'
4+
5+
Vue.use(VueRouter)
6+
7+
const routes = [
8+
{
9+
path: '/',
10+
name: 'Home',
11+
component: Home
12+
},
13+
{
14+
path: '/about',
15+
name: 'About',
16+
// route level code-splitting
17+
// this generates a separate chunk (about.[hash].js) for this route
18+
// which is lazy-loaded when the route is visited.
19+
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
20+
}
21+
]
22+
23+
const router = new VueRouter({
24+
routes
25+
})
26+
27+
export default router

‎web/src/store/index.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Vue from 'vue'
2+
import Vuex from 'vuex'
3+
4+
Vue.use(Vuex)
5+
6+
export default new Vuex.Store({
7+
state: {
8+
},
9+
mutations: {
10+
},
11+
actions: {
12+
},
13+
modules: {
14+
}
15+
})

‎web/src/views/About.vue

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div class="about">
3+
<h1>This is an about page</h1>
4+
</div>
5+
</template>

‎web/src/views/Home.vue

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<div class="home">
3+
<img alt="Vue logo" src="../assets/logo.png">
4+
<HelloWorld msg="Welcome to Your Vue.js App"/>
5+
</div>
6+
</template>
7+
8+
<script>
9+
// @ is an alias to /src
10+
import HelloWorld from '@/components/HelloWorld.vue'
11+
12+
export default {
13+
name: 'Home',
14+
components: {
15+
HelloWorld
16+
}
17+
}
18+
</script>

‎web/yarn.lock

+8,490
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.