Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
fix: updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
seo-rii committed Aug 5, 2021
1 parent e72d995 commit 8c4211c
Show file tree
Hide file tree
Showing 12 changed files with 251 additions and 658 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run pre-commit
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/customizable/public/carbon.min.js
2 changes: 1 addition & 1 deletion examples/customizable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"scripts": {
"start": "npx electron ."
}
}
}
5 changes: 2 additions & 3 deletions examples/customizable/public/browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
const electron = require('electron').remote
const browser = electron.getCurrentWindow()
window.browser = browser
const browser = require('electron').remote.getCurrentWindow()
window.browser = browser
2 changes: 0 additions & 2 deletions examples/customizable/public/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const closeControlEl = document.getElementById('close-control'),
restoreControlEl = document.getElementById('restore-control'),
minimizeControlEl = document.getElementById('minimize-control')


function updateWindowMaximizeState() {
if (window.browser.isMaximized()) {
document.body.classList.add('maximized')
Expand All @@ -12,7 +11,6 @@ function updateWindowMaximizeState() {
}
}


window.browser.on('maximize', updateWindowMaximizeState)
window.browser.on('unmaximize', updateWindowMaximizeState)

Expand Down
2 changes: 1 addition & 1 deletion examples/customizable/public/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const blurLink = document.getElementById('blur-link'),
devtoolsLink.addEventListener('click', () => {
window.browser.webContents.openDevTools({
mode: 'detach',
activate: true
activate: true,
})
})

Expand Down
7 changes: 5 additions & 2 deletions examples/customizable/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const path = require('path')

function isVibrancySupported() {
// Windows 10 or greater
return process.platform === 'win32' && parseInt(os.release().split('.')[0]) >= 10
return (
process.platform === 'win32' &&
parseInt(os.release().split('.')[0]) >= 10
)
}

let window
Expand Down Expand Up @@ -47,7 +50,7 @@ function createWindow() {
window.webContents.setWindowOpenHandler((details) => {
shell.openExternal(details.url)
return { action: 'deny' }
});
})

window.show()
}
Expand Down
40 changes: 18 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-acrylic-window",
"version": "0.5.7",
"version": "0.5.8",
"description": "Add vibrancy effect for electron",
"keywords": [
"node",
Expand Down Expand Up @@ -30,13 +30,9 @@
"test": "yarn build && yarn --cwd examples/customizable start",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"lint": "eslint . --fix --ext .js,.jsx,.ts,.tsx",
"release": "standard-version"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
"release": "standard-version",
"prepare": "husky install",
"pre-commit": "lint-staged"
},
"commitlint": {
"extends": [
Expand All @@ -48,30 +44,30 @@
"*.{js,jsx,ts,tsx,json,md}": "prettier --write"
},
"dependencies": {
"@seorii/win32-displayconfig": "^0.1.1",
"bindings": "^1.5.0",
"node-addon-api": "^4.0.0",
"node-gyp": "^8.1.0",
"win32-displayconfig": "^0.1.0"
"node-gyp": "^8.1.0"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/node": "^16.3.0",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"electron": "^13.1.7",
"eslint": "^7.30.0",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@types/node": "^16.4.12",
"@typescript-eslint/eslint-plugin": "^4.29.0",
"@typescript-eslint/parser": "^4.29.0",
"electron": "^13.1.8",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-flowtype": "^5.8.0",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"husky": "^4.3.8",
"lint-staged": "^11.0.0",
"husky": "^7.0.0",
"lint-staged": "^11.1.1",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1",
"standard-version": "^9.3.0",
"standard-version": "^9.3.1",
"typescript": "^4.3.5",
"yarn": "^1.22.10"
"yarn": "^1.22.11"
},
"engines": {
"node": ">=8.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/win10refresh.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VerticalRefreshRateContext } from 'win32-displayconfig'
import { VerticalRefreshRateContext } from '@seorii/win32-displayconfig'
import { BrowserWindow } from './browserWindow'
import * as electron from 'electron'
import process from 'process'
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@
"esModuleInterop": true,
"outDir": "dist"
},
"include": [
"src"
]
"include": ["src"]
}
Loading

0 comments on commit 8c4211c

Please sign in to comment.