some electron deprecation fixes

This commit is contained in:
Benjamin Pasero 2017-05-11 07:54:36 +02:00
parent 9cce34d949
commit 5057c95e6b
5 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@
const path = require('path');
const cp = require('child_process');
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/atom-shell') {
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') {
console.error("You can't use plain npm to install Code's dependencies.");
console.error(
/^win/.test(process.platform)

View file

@ -1,7 +1,7 @@
@echo off
setlocal
set npm_config_disturl="https://atom.io/download/atom-shell"
set npm_config_disturl="https://atom.io/download/electron"
for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a
set npm_config_arch="ia32"
set npm_config_runtime="electron"

View file

@ -22,7 +22,7 @@ ELECTRON_VERSION=$(
ELECTRON_GYP_HOME=~/.electron-gyp
mkdir -p $ELECTRON_GYP_HOME
npm_config_disturl=https://atom.io/download/atom-shell \
npm_config_disturl=https://atom.io/download/electron \
npm_config_target=$ELECTRON_VERSION \
npm_config_runtime=electron \
HOME=$ELECTRON_GYP_HOME \

View file

@ -4466,7 +4466,7 @@ declare namespace Electron {
/**
* Sets the maximum and minimum zoom level.
*/
setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
/**
* Executes the editing command undo in web page.
*/
@ -5161,7 +5161,7 @@ declare namespace Electron {
/**
* Sets the maximum and minimum zoom level.
*/
setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
/**
* Sets a provider for spell checking in input fields and text areas.
*/

View file

@ -148,7 +148,7 @@ function main() {
// disable pinch zoom & apply zoom level early to avoid glitches
const zoomLevel = configuration.zoomLevel;
webFrame.setZoomLevelLimits(1, 1);
webFrame.setVisualZoomLevelLimits(1, 1);
if (typeof zoomLevel === 'number' && zoomLevel !== 0) {
webFrame.setZoomLevel(zoomLevel);
}