Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
electron-mksnapshot
Advanced tools
Simple node module to download the mksnapshot
binaries compatible with
Electron for creating v8 snapshots.
The major version of this library tracks the major version of the Electron
versions released. So if you are using Electron 2.0.x
you would want to use
an electron-mksnapshot
dependency of ~2.0.0
in your package.json
file.
npm install --save-dev electron-mksnapshot
mksnapshot.js file.js (--output_dir OUTPUT_DIR).
Running mksnapshot.js will generate both a snapshot_blob.bin and v8_context_snapshot.bin files which are needed to use custom snapshots in Electron. If an output directory isn't specified, the current directory will be used. (Additional mksnapshot args except for --startup_blob are supported, run mksnapshot --help to see options)
You can set the ELECTRON_MIRROR
or NPM_CONFIG_ELECTRON_MIRROR
environment variables to use a custom base URL for downloading mksnapshot zips.
# Electron mirror for China
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
# Local mirror
# Example of requested URL: http://localhost:8080/1.2.0/mksnapshot-v1.2.0-darwin-x64.zip
ELECTRON_MIRROR="http://localhost:8080/"
The version downloaded can be overriden by setting the ELECTRON_CUSTOM_VERSION
environment variable.
# Install mksnapshot for Electron v8.3.0
ELECTRON_CUSTOM_VERSION=8.3.0 npm install
If you need to generate snapshots for Linux on 32 bit ARM, Linux on ARM64, or Windows on ARM64 you will need to install a cross arch mksnapshot on an Intel x64 machine. To do so, set the npm config arch
to the proper arch and then run npm install --save-dev electron-mksnapshot
. For example:
From an Intel x64 Linux OS run:
npm config set arch arm64
npm install --save-dev electron-mksnapshot
From an Intel x64 Linux OS run:
npm config set arch armv7l
npm install --save-dev electron-mksnapshot
From an Intel x64 Windows OS run:
npm config set arch arm64
npm install --save-dev electron-mksnapshot
FAQs
Electron version of the mksnapshot binary
The npm package electron-mksnapshot receives a total of 521 weekly downloads. As such, electron-mksnapshot popularity was classified as not popular.
We found that electron-mksnapshot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.