Skip to content

Commit

Permalink
setup enviroment
Browse files Browse the repository at this point in the history
  • Loading branch information
viccjiang committed Apr 18, 2022
1 parent faa118d commit ecaed2d
Show file tree
Hide file tree
Showing 16 changed files with 1,971 additions and 48 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ module.exports = {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'max-len': 'off'
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules


# local env files
.env
.env.local
.env.*.local

Expand Down
22 changes: 22 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh

# 当发生错误时中止脚本
set -e

# 构建
npm run build

# cd 到构建输出的目录下
cd dist

# 部署到自定义域域名
# echo 'www.example.com' > CNAME

git init
git add -A
git commit -m 'deploy'

# 部署到 https://<USERNAME>.github.io/<REPO>
git push -f https://github.com/viccjiang/taiwan_travel.git master:gh-pages

cd -
144 changes: 136 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.26.1",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.8.1",
"core-js": "^3.6.5",
"jssha": "^3.2.0",
"mitt": "^3.0.0",
"vue": "^3.0.0",
"vue-axios": "^3.4.1",
"vue-loading-overlay": "^5.0.3",
"vue-router": "^4.0.0-0"
},
"devDependencies": {
Expand Down
30 changes: 11 additions & 19 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
<template>
<Navbar></Navbar>
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view/>
</template>

<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
<script>
import Navbar from './components/Navbar.vue';
a {
font-weight: bold;
color: #2c3e50;
export default {
components: {
Navbar,
},
};
</script>

&.router-link-exact-active {
color: #42b983;
}
}
}
<style lang="scss">
@import "./assets/all.scss";
</style>
Loading

0 comments on commit ecaed2d

Please sign in to comment.