Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
feng-fu committed Feb 13, 2017
1 parent 945e8f2 commit e331c6e
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 29 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
> * 回帖,顶帖 √
> * 待续

已打包称android app [点击下载](http://fengfu.space/vue-cnode/android/package.apk)

## Build Setup

``` bash
Expand All @@ -27,7 +30,8 @@ npm run dev

# build for production with minification
npm run build
因为需要打包Android App,所以对build做了些修改,变成了相对路径的方式如需build,请将build所生成的处于根目录下的img文件夹复制入dist中的static文件夹内,双击打开index.html文件即可
cd dist
open index.html in a server.
```

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
Binary file modified android/package.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = {
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('../../img/[name].[hash:7].[ext]')
name: utils.assetsPath('/img/[name].[hash:7].[ext]')
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
assetsPublicPath: '/',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
Expand Down
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta name=renderer content=webkit><meta name=browsermode content=application><meta name=x5-page-mode content=app><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta http-equiv=Cache-Control content=no-siteapp><meta name=keywords content="vue cnode"><meta name=apple-mobile-web-app-title content=cnode><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no,email=no"><meta name=screen-orientation content=portrait><meta name=x5-orientation content=portrait><meta name=full-screen content=yes><meta name=x5-fullscreen content=true><title>vue-cnode</title><link rel=stylesheet href=./static/css/reset.css><link href=./static/css/app.dcf12a606fd800ecb92ea60c098304c2.css rel=stylesheet></head><body><div id=app></div><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta name=renderer content=webkit><meta name=browsermode content=application><meta name=x5-page-mode content=app><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta http-equiv=Cache-Control content=no-siteapp><meta name=keywords content="vue cnode"><meta name=apple-mobile-web-app-title content=cnode><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no,email=no"><meta name=screen-orientation content=portrait><meta name=x5-orientation content=portrait><meta name=full-screen content=yes><meta name=x5-fullscreen content=true><title>vue-cnode</title><link rel=stylesheet href=./static/css/reset.css><link href=./static/css/app.9c1bc29583ba23d74418dc614111a69b.css rel=stylesheet></head><body><div id=app></div><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-91534508-1', 'auto');
ga('send', 'pageview');</script><script type=text/javascript src=./static/js/manifest.b78a27e08be86e0b86ae.js></script><script type=text/javascript src=./static/js/vendor.c0ba7e884ffde72173f4.js></script><script type=text/javascript src=./static/js/app.699120ee1171b2bcf253.js></script></body></html>
ga('send', 'pageview');</script><script type=text/javascript src=./static/js/manifest.c890dc60da653af3d4c5.js></script><script type=text/javascript src=./static/js/vendor.dccd940dd61805c5e189.js></script><script type=text/javascript src=./static/js/app.c0a9f42f709e0f1489b3.js></script></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

1 change: 0 additions & 1 deletion dist/static/js/app.699120ee1171b2bcf253.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/static/js/app.c0a9f42f709e0f1489b3.js.map

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/static/js/vendor.c0ba7e884ffde72173f4.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/static/js/vendor.dccd940dd61805c5e189.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/components/about/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</div>
<p>扫描二维码预览:</p>
<img src="../../assets/ewm.png" alt="扫我">
<p>Android App <a href="http://fengfu.space/vue-cnode/android/package.apk" target="_blank">下载</a></p>
</div>
</template>

Expand Down
26 changes: 20 additions & 6 deletions src/components/publish/publish.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<mt-button icon="back" @click='$router.go(-1)' slot="left"></mt-button>
</mt-header>
<mt-field label="标题" placeholder="标题" type="text" v-model="title" @keyup.enter="titleInputCheck" :state="titleState"></mt-field>
<mt-radio
title="选择分类"
v-model="category"
align="right"
:options="['ask', 'job', 'share']">
</mt-radio>
<label class="select_category" for="">选择分类 </label>
<select v-model="category">
<option>ask</option>
<option>job</option>
<option>share</option>
</select>
<mt-field label="内容" placeholder="请输入内容,支持markdown语法" type="textarea" rows="10" v-model="content"></mt-field>
<mt-button type="primary" size="large" @click="publishTheme">发布</mt-button>
</div>
Expand Down Expand Up @@ -85,4 +85,18 @@
<style lang="stylus" rel="stylesheet/stylus">
.publish
margin-top: 50px
select
width: 150px
height: 30px
border-radius: 3px
margin-left: 36px
option
text-align: center
button
margin-top: 20px
textarea,input
border: 1px solid #ccc
border-radius: 3px
.select_category
padding-left: 10px
</style>

0 comments on commit e331c6e

Please sign in to comment.