diff --git a/.babelrc b/.babelrc index 386f3224..e0d7f937 100644 --- a/.babelrc +++ b/.babelrc @@ -26,7 +26,7 @@ "stage-0" ] }, - "web": { + "production": { "presets": [ ["env", { "modules": false diff --git a/.electron-vue/webpack.docs.config.js b/.electron-vue/webpack.docs.config.js index 0c5fff4c..205bdcff 100644 --- a/.electron-vue/webpack.docs.config.js +++ b/.electron-vue/webpack.docs.config.js @@ -1,6 +1,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin') const ExtractTextPlugin = require('extract-text-webpack-plugin') const path = require('path') +const webpack = require('webpack') module.exports = { context: path.resolve(__dirname, '../docs'), @@ -90,3 +91,24 @@ module.exports = { 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 + }) + ]) +} diff --git a/.travis.yml b/.travis.yml index 11085506..9164cb6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ language: c matrix: include: - os: osx - - os: linux + # - os: linux env: CC=clang CXX=clang++ npm_config_clang=1 compiler: clang 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-$([ "$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 -- 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: #- export DISPLAY=':99.0' #- 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 - source ~/.bashrc - npm install -g xvfb-maybe @@ -38,6 +38,15 @@ script: #- 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 build +- yarn run build:docs branches: only: - 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 diff --git a/README.md b/README.md index 52bf24f1..1ba514c3 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,41 @@ -# picgo +# PicGo -> Easy to upload your pic & copy to write +> 图片上传+管理新体验 +
+
+
+
+
+
+