Skip to content

Commit

Permalink
package configure
Browse files Browse the repository at this point in the history
  • Loading branch information
milkrong committed Aug 22, 2020
1 parent a997415 commit 2c007c5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# IntelliJ
.idea

/dist
# dependencies
/node_modules
/.pnp
Expand Down
39 changes: 39 additions & 0 deletions frontend/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
matrix:
include:
- os: osx
osx_image: xcode10.2
language: node_js
node_js: "10"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

- os: linux
services: docker
language: generic

cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "npm run package"
else
npm run package
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"homepage": "./",
"productName": "Bullet Journal",
"main": "./electron.js",
"dependencies": {
"@ant-design/compatible": "0.0.1-rc.0",
Expand Down Expand Up @@ -55,6 +56,8 @@
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-scripts eject",
"build-electron": "mkdir build/electron && cp electron.js build/electron",
"release": "electron-builder build --mac --win -c.extraMetadata.main=build/electron/electron.js --publish never",
"electron-dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\""
},
"eslintConfig": {
Expand Down

0 comments on commit 2c007c5

Please sign in to comment.