mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-06 16:07:06 +08:00
Updated: docs build process & travis-ci config
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
"stage-0"
|
"stage-0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"web": {
|
"production": {
|
||||||
"presets": [
|
"presets": [
|
||||||
["env", {
|
["env", {
|
||||||
"modules": false
|
"modules": false
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
context: path.resolve(__dirname, '../docs'),
|
context: path.resolve(__dirname, '../docs'),
|
||||||
@@ -90,3 +91,24 @@ module.exports = {
|
|||||||
new ExtractTextPlugin("styles.css")
|
new ExtractTextPlugin("styles.css")
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
// module.exports.devtool = '#source-map'
|
||||||
|
// http://vue-loader.vuejs.org/en/workflow/production.html
|
||||||
|
module.exports.plugins = (module.exports.plugins || []).concat([
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
NODE_ENV: '"production"'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
|
sourceMap: true,
|
||||||
|
compress: {
|
||||||
|
warnings: false
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
minimize: true
|
||||||
|
})
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|||||||
+12
-3
@@ -7,7 +7,7 @@ language: c
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: osx
|
- os: osx
|
||||||
- os: linux
|
# - os: linux
|
||||||
env: CC=clang CXX=clang++ npm_config_clang=1
|
env: CC=clang CXX=clang++ npm_config_clang=1
|
||||||
compiler: clang
|
compiler: clang
|
||||||
cache:
|
cache:
|
||||||
@@ -25,11 +25,11 @@ before_install:
|
|||||||
- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([
|
- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([
|
||||||
"$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz
|
"$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz
|
||||||
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
|
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
|
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
|
||||||
install:
|
install:
|
||||||
#- export DISPLAY=':99.0'
|
#- export DISPLAY=':99.0'
|
||||||
#- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
#- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
||||||
- nvm install 7
|
- nvm install 8.9
|
||||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||||
- source ~/.bashrc
|
- source ~/.bashrc
|
||||||
- npm install -g xvfb-maybe
|
- npm install -g xvfb-maybe
|
||||||
@@ -38,6 +38,15 @@ script:
|
|||||||
#- xvfb-maybe node_modules/.bin/karma start test/unit/karma.conf.js
|
#- xvfb-maybe node_modules/.bin/karma start test/unit/karma.conf.js
|
||||||
#- yarn run pack && xvfb-maybe node_modules/.bin/mocha test/e2e
|
#- yarn run pack && xvfb-maybe node_modules/.bin/mocha test/e2e
|
||||||
- yarn run build
|
- yarn run build
|
||||||
|
- yarn run build:docs
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
after_script:
|
||||||
|
- cd docs/dist
|
||||||
|
- git init
|
||||||
|
- git config user.name "Molunerfinn"
|
||||||
|
- git config user.email "marksz@teamsz.xyz"
|
||||||
|
- git add .
|
||||||
|
- git commit -m "Travis build docs"
|
||||||
|
- git push --force --quiet "https://${GITHUB_TOKEN}@github.com/ecomfe/san-transition.git" master:gh-pages
|
||||||
|
|||||||
@@ -1,28 +1,41 @@
|
|||||||
# picgo
|
# PicGo
|
||||||
|
|
||||||
> Easy to upload your pic & copy to write
|
> 图片上传+管理新体验
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://ws1.sinaimg.cn/large/8700af19ly1fmd6ou9eynj2046046glj" alt="">
|
||||||
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/feross/standard">
|
||||||
|
<img src="https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square" alt="">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
#### Build Setup
|
## 精致设计
|
||||||
|
|
||||||
``` bash
|

|
||||||
# install dependencies
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# serve with hot reload at localhost:9080
|
macOS系统下,支持拖拽至menubar图标实现上传。menubar app 窗口显示最新上传的5张图片以及剪贴板里的图片。点击图片自动将上传的链接复制到剪贴板。
|
||||||
npm run dev
|
|
||||||
|
|
||||||
# build electron application for production
|
## 便捷管理
|
||||||
npm run build
|
|
||||||
|
|
||||||
# run unit & end-to-end tests
|

|
||||||
npm test
|
|
||||||
|
|
||||||
|
查看你的上传记录,重复使用更方便。支持点击图片大图查看。支持删除图片(仅本地记录),让界面更加干净。
|
||||||
|
|
||||||
# lint all JS/Vue component files in `src/`
|
## 可选图床
|
||||||
npm run lint
|
|
||||||
|
|
||||||
```
|

|
||||||
|
|
||||||
---
|
目前支持微博图床和七牛图床。未来将支持更多。方便不同图床的上传需求。
|
||||||
|
|
||||||
This project was generated with [electron-vue](https://github.com/SimulatedGREG/electron-vue) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about the original structure can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).
|
## 多样链接
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
支持4种剪贴板链接格式,让你的文本编辑游刃有余。
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2017 Molunerfinn
|
||||||
|
|||||||
+2
-2
@@ -6,7 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/electron/main.js",
|
"main": "./dist/electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node .electron-vue/build.js && electron-builder",
|
"build": "node .electron-vue/build.js && electron-builder --publish onTagOrDraft",
|
||||||
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
|
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
|
||||||
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
||||||
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
|
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"test": "npm run unit && npm run e2e",
|
"test": "npm run unit && npm run e2e",
|
||||||
"unit": "karma start test/unit/karma.conf.js",
|
"unit": "karma start test/unit/karma.conf.js",
|
||||||
"postinstall": "npm run lint:fix",
|
"postinstall": "npm run lint:fix",
|
||||||
"build:docs": "webpack -p --config .electron-vue/webpack.docs.config.js",
|
"build:docs": "cross-env NODE_ENV=production webpack -p --config .electron-vue/webpack.docs.config.js",
|
||||||
"docs": "webpack-dev-server --content-base docs/dist --config .electron-vue/webpack.docs.config.js --hot --inline"
|
"docs": "webpack-dev-server --content-base docs/dist --config .electron-vue/webpack.docs.config.js --hot --inline"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
|
|||||||
Reference in New Issue
Block a user