Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Aug 1, 2019
1 parent 8e266fc commit d9a9958
Show file tree
Hide file tree
Showing 46 changed files with 95 additions and 156 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
MIX_API_URL=http://yike.test/api/

// Auth client id
MIX_AUTH_CLIENT_ID=4
MIX_AUTH_CLIENT_SECRET=aZCeyP3Sg5dUp3Pevx3q3V8ESNRqDi72TmGMDkfU

# 腾讯防水墙配置
MIX_CAPTCHA_ID_REGISTER=
MIX_CAPTCHA_ID_PUBLISH=
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
node_modules
yarn.lock
/dist
package-lock.json

# local env files
.env
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_js: stable
install:
- npm install
script:
- npm run lint
- npm run lint
- npm run prod
8 changes: 4 additions & 4 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@

desc('Run build.');

task('npm:install-and-compile', function(){
task('yarn:install-and-compile', function(){
// if (has('previous_release')) {
// run('cp -R {{previous_release}}/node_modules {{release_path}}/node_modules');
// }

within('{{release_path}}', function () {
// run('npm install --registry=http://registry.npm.taobao.org ');
run('npm install');
run('npm run prod');
run('yarn install');
run('yarn run prod');
});
});

Expand All @@ -56,7 +56,7 @@
'deploy:release',
'deploy:update_code',
'deploy:shared',
'npm:install-and-compile',
'yarn:install-and-compile',
'deploy:writable',
'deploy:clear_paths',
'deploy:symlink',
Expand Down
1 change: 0 additions & 1 deletion hot

This file was deleted.

5 changes: 0 additions & 5 deletions mix-manifest.json

This file was deleted.

20 changes: 15 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"animate.css": "^3.7.2",
"axios": "^0.18.1",
"babel-loader": "^8.0.6",
"bootstrap": "^4.3.1",
"brace": "^0.11.1",
"clipboard": "^2.0.4",
"codemirror": "^5.48.0",
"css-loader": "^3.1.0",
"dayjs": "^1.8.15",
"element-ui": "^2.10.1",
"emojify.js": "^1.1.0",
"emojione": "^4.5.0",
"extract-text-webpack-plugin": "2.1.2",
"file-loader": "^4.1.0",
"jquery": "^3.4.1",
"laravel-mix": "^4.1.2",
"laravel-mix": "^4.0.16",
"localforage": "^1.7.3",
"lodash": "^4.17.11",
"mo-js": "^0.288.2",
Expand All @@ -32,14 +39,17 @@
"qrcode": "^1.3.3",
"sass-loader": "^7.1.0",
"tributejs": "^3.7.1",
"typeface-ubuntu-mono": "0.0.72",
"typeface-ubuntu-mono": "^0.0.72",
"vue": "^2.6.10",
"vue-avatar-cropper": "1.0.5",
"vue-avatar-cropper": "^1.0.5",
"vue-loader": "^15.7.1",
"vue-material-design-icons": "^3.3.1",
"vue-router": "^3.0.4",
"vue-template-compiler": "^2.6.10",
"vuex": "^3.1.1",
"vuex-router-sync": "^5.0.0"
"vuex-router-sync": "^5.0.0",
"webpack": "^4.38.0",
"webpack-cli": "^3.3.6"
},
"eslintConfig": {
"root": true,
Expand Down Expand Up @@ -79,7 +89,7 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.3",
"resolve-url-loader": "3.1.0",
"resolve-url-loader": "^3.1.0",
"standard": "*"
}
}
1 change: 0 additions & 1 deletion public/hot

This file was deleted.

4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="/yike.png" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="/css/app.css" />
<title>一刻 | 高品质微信开发者社区</title>

<style>
Expand All @@ -22,6 +22,6 @@
<!-- built files will be auto injected -->
<script async src="https://ssl.captcha.qq.com/TCaptcha.js"></script>

<script src="app.js"></script>
<script src="/js/app.js"></script>
</body>
</html>
11 changes: 2 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ cp .env.example .env.local
cp .env.example .env.production
```

其中有两个变量是你在安装后端时 `passport:install` 得到的 **Password Grant Client**`id``secret`

```
VUE_APP_AUTH_CLIENT_ID=
VUE_APP_AUTH_CLIENT_SECRET=
```

如果你忘记了,就去找 `oauth_clients` 表中找吧。


Expand All @@ -59,8 +52,8 @@ VUE_APP_AUTH_CLIENT_SECRET=

```env
# 腾讯防水墙配置
VUE_APP_CAPTCHA_ID_REGISTER=
VUE_APP_CAPTCHA_ID_PUBLISH=
MIX_CAPTCHA_ID_REGISTER=
MIX_CAPTCHA_ID_PUBLISH=
```


Expand Down
2 changes: 0 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import http from '$utils/http'
import { Message } from 'element-ui'
import 'element-ui/lib/theme-chalk/icon.css'
import 'element-ui/lib/theme-chalk/message.css'
import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import './bootstrap'
Expand Down
3 changes: 0 additions & 3 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ try {
window.$ = window.jQuery = $

import('bootstrap')
import('prismjs/themes/prism.css')
import('animate.css')
import('typeface-ubuntu-mono')
import('vue-material-design-icons/styles.css')
} catch (e) {
throw e
}
2 changes: 1 addition & 1 deletion src/components/editor/at-completer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import http from '$utils/http'
import CodeMirror from 'codemirror'

require('codemirror/addon/hint/show-hint.css')
// require('codemirror/addon/hint/show-hint.css')
require('codemirror/addon/hint/show-hint')
require('codemirror/addon/hint/html-hint')

Expand Down
2 changes: 1 addition & 1 deletion src/components/editor/emoji-completer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CodeMirror from 'codemirror'

require('codemirror/addon/hint/show-hint.css')
// require('codemirror/addon/hint/show-hint.css')
require('codemirror/addon/hint/show-hint')
require('codemirror/addon/hint/html-hint')

Expand Down
16 changes: 8 additions & 8 deletions src/components/editor/src/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ import FormatListBulletedIcon from '$icons/FormatListBulleted'
import FormatListNumbersIcon from '$icons/FormatListNumbered'
import MarkdownBody from '$components/markdown-body'
require('codemirror/mode/gfm/gfm')
require('codemirror/addon/edit/continuelist')
require('codemirror/addon/edit/matchbrackets')
require('codemirror/addon/edit/closebrackets')
require('codemirror/addon/edit/matchtags')
require('codemirror/addon/display/placeholder')
require('codemirror/keymap/sublime')
require('../theme/yike.css')
import 'codemirror/mode/gfm/gfm'
import 'codemirror/addon/edit/continuelist'
import 'codemirror/addon/edit/matchbrackets'
import 'codemirror/addon/edit/closebrackets'
import 'codemirror/addon/edit/matchtags'
import 'codemirror/addon/display/placeholder'
import 'codemirror/keymap/sublime'
// import '../theme/yike.css'
export default {
name: 'editor',
Expand Down
3 changes: 0 additions & 3 deletions src/components/editor/theme/yike.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
font-weight: 400;
}

.CodeMirror-lines {
}

.CodeMirror pre {
padding: 0 4px;
font-family: 'Ubuntu Mono', 'Operator Mono', Monaco, PingFang SC, Hiragino Sans GB, Arial, Microsoft YaHei, Helvetica Neue, sans-serif;
Expand Down
3 changes: 0 additions & 3 deletions src/components/empty-state.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ export default {
}
}
</script>

<style scoped>
</style>
2 changes: 1 addition & 1 deletion src/components/guest-login-guide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
}
</script>

<style scoped>
<style scoped lang="scss">
.guest-login-guide {
background: url("/banners/technology.jpg");
background-size: 160%;
Expand Down
3 changes: 0 additions & 3 deletions src/components/hot-tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/markdown-body.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/new-users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/quick-docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,3 @@ export default {
components: { DocsIcon }
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/socialite-login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/threads-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/user-list-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/user-profile-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@ export default {
components: { UserMedia, FollowBtn, PlusIcon, UserSocialBtns }
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/components/user-ranking.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,3 @@ export default {
}
}
</script>

<style scoped>
</style>
22 changes: 11 additions & 11 deletions src/components/user-social-btns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ export default {
</script>

<style scoped lang="scss">
.user-social-btns {
@each $size in 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20
{
.spacing-#{$size} {
margin-left: #{$size}px;
margin-right: #{$size}px;
margin-bottom: #{$size}px;
}
}
}
// .user-social-btns {
// @each $size in 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
// 19, 20
// {
// .spacing-#{$size} {
// margin-left: #{$size}px;
// margin-right: #{$size}px;
// margin-bottom: #{$size}px;
// }
// }
// }
</style>
3 changes: 0 additions & 3 deletions src/components/wechat-qrcode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ export default {
}
}
</script>

<style scoped>
</style>
3 changes: 0 additions & 3 deletions src/modules/auth/oauth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ export default {
}
}
</script>

<style scoped>
</style>
12 changes: 6 additions & 6 deletions src/modules/auth/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ export default [
{
path: 'auth/login',
name: 'auth.login',
component: () => import('./login')
component: () => import('./login').default
},
{
path: 'auth/register',
name: 'auth.register',
component: () => import('./register')
component: () => import('./register').default
},
{
path: 'auth/oauth-redirect/:platform',
Expand All @@ -16,7 +16,7 @@ export default [
navbar: false,
container: false
},
component: () => import('./oauth')
component: () => import('./oauth').default
},
{
path: 'auth/oauth-callback/:platform',
Expand All @@ -25,16 +25,16 @@ export default [
navbar: false,
container: false
},
component: () => import('./oauth')
component: () => import('./oauth').default
},
{
path: '/user/forget-password',
name: 'auth.forget-password',
component: () => import('./forget-password')
component: () => import('./forget-password').default
},
{
path: '/user/reset-password',
name: 'auth.reset-password',
component: () => import('./reset-password')
component: () => import('./reset-password').default
}
]

0 comments on commit d9a9958

Please sign in to comment.