Skip to content

Commit

Permalink
html canvas replace node canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
blogwy committed May 29, 2022
1 parent 9d36feb commit ad28011
Show file tree
Hide file tree
Showing 20 changed files with 2,476 additions and 2,995 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
root: true,
env: {
node: true,
"vue/setup-compiler-macros": true
'vue/setup-compiler-macros': true
},
extends: [
'plugin:vue/vue3-essential',
Expand All @@ -16,11 +16,12 @@ module.exports = {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'camelcase': 'off',
camelcase: 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-prototype-builtins': 'off',
'eol-last': 'off',
'no-useless-escape': 'off'
'no-useless-escape': 'off',
'no-useless-constructor': 'off'
}
}
40 changes: 8 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, macos-latest, 'ubuntu-latest']
os: [windows-latest, macos-latest, 'ubuntu-latest']

# create steps
steps:
Expand All @@ -35,38 +35,14 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3

# step3: Install Dependencies for mac/win/linux
- name: Install Windows Dependencies
if: matrix.os == 'windows-2019'
run: |
Invoke-WebRequest "https://ftp-osl.osuosl.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip"
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
.\libjpeg.exe /S
npm install --global --production windows-build-tools
npm install -g node-gyp@latest
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: Install macOS Dependencies
if: matrix.os == 'macos-latest'
run: |
brew update
brew install pkg-config cairo pango libpng jpeg giflib librsvg
- name: Install Linux Dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev
# step4: npm install
# step3: npm install
- name: npm install
run: |
npm install
# step5: build app for mac/win/linux
# step4: build app for mac/win/linux
- name: Build windows app
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
run: |
npm run electron:build
env:
Expand All @@ -86,9 +62,9 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# step6: cleanup artifacts in dist_electron
# step5: cleanup artifacts in dist_electron
- name: cleanup artifacts for windows
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
run: |
npx rimraf "dist_electron/!(*.exe)"
Expand All @@ -102,14 +78,14 @@ jobs:
run: |
npx rimraf "dist_electron/!(*.AppImage)"
# step7: upload artifacts
# step6: upload artifacts
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: dist_electron

# step8: create release
# step7: create release
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
Loading

0 comments on commit ad28011

Please sign in to comment.