build: lint Markdown (#3247)
This commit is contained in:
Родитель
fd7b1e79b8
Коммит
725e4dea3a
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "@electron/lint-roller/configs/markdownlint.json"
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
**/node_modules/**
|
||||
CHANGELOG.md
|
|
@ -15,7 +15,10 @@
|
|||
"docs:generate": "yarn docs:plugin && node --max-old-space-size=8192 -r ts-node/register ./tools/gen-docs.ts",
|
||||
"docs:plugin": "cd ./tools/doc-plugin && yarn build",
|
||||
"lerna:publish": "lerna publish --force-publish --conventional-commits --no-changelog --exact",
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"lint:js": "prettier --check . && eslint .",
|
||||
"lint:markdown": "electron-markdownlint \"**/*.md\"",
|
||||
"lint:markdown-links": "electron-lint-markdown-links --root . --ignore-path .markdownlintignore \"**/*.md\"",
|
||||
"lint": "npm run lint:js && npm run lint:markdown && npm run lint:markdown-links",
|
||||
"lint:fix": "prettier --write .",
|
||||
"link:prepare": "lerna exec -- node ../../../tools/silent.js yarn link --silent --no-bin-links --link-folder ../../../.links",
|
||||
"link:remove": "lerna exec -- node ../../../tools/silent.js yarn unlink --silent --no-bin-links --link-folder ../../../.links",
|
||||
|
@ -81,6 +84,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@electron/fuses": ">=1.0.0",
|
||||
"@electron/lint-roller": "^1.5.0",
|
||||
"@knodes/typedoc-plugin-monorepo-readmes": "0.22.5",
|
||||
"@malept/eslint-config": "^2.0.0",
|
||||
"@types/chai": "^4.2.12",
|
||||
|
|
|
@ -5,14 +5,14 @@ API as a number of simple JS functions.
|
|||
|
||||
## Basic Usage
|
||||
|
||||
```js
|
||||
```javascript
|
||||
import { api } from '@electron-forge/core';
|
||||
|
||||
// Package the current directory as an Electron app
|
||||
api.package(__dirname);
|
||||
```
|
||||
|
||||
The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/api/core/classes/forgeapi).
|
||||
The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/classes/_electron_forge_core.ForgeAPI.html).
|
||||
All the methods are async and expose the core forge methods, please note that all
|
||||
user-side configuration is still done through your forge config file or the "config.forge"
|
||||
section of your package.json. This API simply let's you call the methods in
|
||||
|
|
|
@ -6,22 +6,22 @@ Create Electron App allows you to quickly bootstrap a new Electron app, using El
|
|||
|
||||
Initialize a new project by running the following:
|
||||
|
||||
```
|
||||
// yarn 1
|
||||
```sh
|
||||
# yarn 1
|
||||
yarn create electron-app my-app
|
||||
|
||||
// npm
|
||||
# npm
|
||||
npx create-electron-app@latest my-app
|
||||
```
|
||||
|
||||
You should now have a directory called my-app with an ultra-minimal Electron app boilerplate inside. If you head into that directory and start up the app, you'll be all set to start developing!
|
||||
|
||||
```
|
||||
// yarn 1
|
||||
```sh
|
||||
# yarn 1
|
||||
cd my-app
|
||||
yarn start
|
||||
|
||||
// npm
|
||||
# npm
|
||||
cd my-app
|
||||
npm start
|
||||
```
|
||||
|
|
|
@ -6,7 +6,7 @@ You can only build the AppX target on Windows machines with the Windows 10 SDK i
|
|||
|
||||
Configuration options are documented in [`MakerAppXConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_appx.MakerAppXConfig.html).
|
||||
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
name: '@electron-forge/maker-appx',
|
||||
config: {
|
||||
|
@ -15,4 +15,4 @@ Configuration options are documented in [`MakerAppXConfig`](https://js.electronf
|
|||
certPass: 'abcd'
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Configuration options are documented in [`MakerDebConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_deb.InternalOptions.MakerDebConfigOptions.html).
|
||||
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
name: '@electron-forge/maker-deb',
|
||||
config: {
|
||||
|
|
|
@ -12,4 +12,4 @@ Configuration options are documented in [`MakerDMGConfig`](https://js.electronfo
|
|||
format: 'ULFO'
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
You can only build the Snapcraft target on Linux systems with the `snapcraft` package installed.
|
||||
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
name: '@electron-forge/maker-snap',
|
||||
config: {
|
||||
|
@ -17,4 +17,4 @@ You can only build the Snapcraft target on Linux systems with the `snapcraft` pa
|
|||
summary: 'My application'
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
`@electron-forge/maker-squirrel` builds a number of files required to distribute apps using the Squirrel.Windows framework. It generates a `{appName} Setup.exe` file which is the main installer for your application, `{appName}-full.nupkg` and a `RELEASES` file which you use to issue updates to your application.
|
||||
|
||||
Pre-requisites:
|
||||
|
||||
* Windows machine
|
||||
* MacOS /Linux machine with `mono` and `wine` installed.
|
||||
|
||||
|
@ -10,10 +11,10 @@ Configuration options are documented in [`MakerSquirrelConfigOptions`](https://j
|
|||
|
||||
```javascript
|
||||
{
|
||||
"name": "@electron-forge/maker-squirrel",
|
||||
"config": {
|
||||
"certificateFile": "./cert.pfx",
|
||||
"certificatePassword": "this-is-a-secret"
|
||||
name: '@electron-forge/maker-squirrel',
|
||||
config: {
|
||||
certificateFile: './cert.pfx',
|
||||
certificatePassword: 'this-is-a-secret'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
The WiX MSI target builds `.msi` files, which are "traditional" Windows installer files.
|
||||
|
||||
Pre-requisites:
|
||||
|
||||
* `light` and `candle` installed from [the WiX toolkit](https://github.com/felixrieseberg/electron-wix-msi#prerequisites).
|
||||
|
||||
Configuration options are documented in [`MakerWixConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_wix.MakerWixConfig.html).
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
Note: There are no configuration options for this target.
|
||||
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
name: '@electron-forge/maker-zip'
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This plugin will automatically add all native Node modules in your node_modules folder to the `asar.unpack` config option in your `packagerConfig`. If your app uses native Node modules, you should probably use this to reduce loading times and disk consumption on your users' machines.
|
||||
|
||||
```
|
||||
```javascript
|
||||
// forge.config.js
|
||||
|
||||
module.exports = {
|
||||
|
@ -12,4 +12,4 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
The Electronegativity plugin integrates Doyensec's Electronegativity tool into the Electron Forge workflow. After packaging your Electron app, it identifies any known misconfigurations and security anti-patterns.
|
||||
|
||||
```
|
||||
```javascript
|
||||
// forge.config.js
|
||||
|
||||
module.exports = {
|
||||
|
@ -15,4 +15,4 @@ module.exports = {
|
|||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@electron-forge/plugin-fuses
|
||||
=====
|
||||
## @electron-forge/plugin-fuses
|
||||
|
||||
This plugin allows flipping [Electron Fuses](https://github.com/electron/fuses) when packaging your app with Electron Forge.
|
||||
|
||||
## Usage
|
||||
### Usage
|
||||
|
||||
Install `@electron-forge/plugin-fuses` and `@electron/fuses` as dev dependencies and add this plugin to the `plugins` array in your Forge configuration:
|
||||
|
||||
```shell
|
||||
# Yarn
|
||||
yarn add --dev @electron-forge/plugin-fuses @electron/fuses
|
||||
|
|
|
@ -4,7 +4,7 @@ This plugin allows you to both run and build your app using a local build of Ele
|
|||
|
||||
_Note: This plugin should only be used by people who are building Electron locally themselves. If you want to set up a local build of Electron, you should check out [Electron Build Tools](https://github.com/electron/build-tools)._
|
||||
|
||||
```
|
||||
```javascript
|
||||
// forge.config.js
|
||||
|
||||
{
|
||||
|
@ -13,4 +13,4 @@ _Note: This plugin should only be used by people who are building Electron local
|
|||
electronPath: '/Users/me/projects/electron/out/Testing',
|
||||
},
|
||||
},
|
||||
```
|
||||
```
|
||||
|
|
|
@ -33,4 +33,4 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This plugin makes it easy to set up standard webpack tooling to compile both your main process code and your renderer process code, with built-in support for Hot Module Replacement (HMR) in the renderer process and support for multiple renderers.
|
||||
|
||||
```
|
||||
```javascript
|
||||
// forge.config.js
|
||||
|
||||
module.exports = {
|
||||
|
@ -26,4 +26,4 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -6,7 +6,6 @@ This publish target is for Bitbucket Cloud only and will not work with self host
|
|||
|
||||
Configuration options are documented in [`PublisherBitbucketConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_bitbucket.PublisherBitbucketConfig.html).
|
||||
|
||||
|
||||
```javascript title=forge.config.js
|
||||
module.exports = {
|
||||
// ...
|
||||
|
@ -29,12 +28,12 @@ module.exports = {
|
|||
|
||||
Alternatively you can (and should) use environment variables for the authentication
|
||||
|
||||
```
|
||||
//env.sh
|
||||
```sh
|
||||
# env.sh
|
||||
BITBUCKET_USERNAME="myusername"
|
||||
BITBUCKET_APP_PASSWORD="mysecretapppassword"
|
||||
```
|
||||
|
||||
```
|
||||
```sh
|
||||
source env.sh
|
||||
```
|
||||
```
|
||||
|
|
|
@ -6,7 +6,6 @@ Please note that Electron Release Server is a community powered project and is n
|
|||
|
||||
Configuration options are documented in [`PublisherERSConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_electron_release_server.PublisherERSConfig.html).
|
||||
|
||||
|
||||
```javascript title=forge.config.js
|
||||
module.exports = {
|
||||
// ...
|
||||
|
@ -21,4 +20,4 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
Configuration options are documented in [`PublisherGithubConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_github.PublisherGitHubConfig.html).
|
||||
|
||||
|
||||
```javascript title=forge.config.js
|
||||
module.exports = {
|
||||
// ...
|
||||
|
|
|
@ -7,7 +7,6 @@ Check out the README at [`atlassian/nucleus`](https://github.com/atlassian/nucle
|
|||
Configuration options are documented in [`Publisher
|
||||
NucleusConfig](https://js.electronforge.io/interfaces/_electron_forge_publisher_nucleus.PublisherNucleusConfig.html).
|
||||
|
||||
|
||||
```javascript title=forge.config.js
|
||||
module.exports = {
|
||||
// ...
|
||||
|
@ -25,4 +24,4 @@ module.exports = {
|
|||
}
|
||||
```
|
||||
|
||||
We recommend you set the `token`option using an environment variable, don't hard code into in your config.
|
||||
We recommend you set the `token`option using an environment variable, don't hard code into in your config.
|
||||
|
|
|
@ -8,7 +8,6 @@ ${config.folder || appVersion}/${artifactName}
|
|||
|
||||
Configuration options are documented in [PublisherS3Config](https://js.electronforge.io/interfaces/_electron_forge_publisher_s3.PublisherS3Config.html).
|
||||
|
||||
|
||||
```javascript title=forge.config.js
|
||||
module.exports = {
|
||||
// ...
|
||||
|
@ -28,4 +27,4 @@ If you run publish twice with the same version on the same platform, it is possi
|
|||
|
||||
### Authentication
|
||||
|
||||
It is recommended to follow the [Amazon AWS guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) and set either a shared credentials guide or the proper environment variables. However, if that is not possible, the publisher config allows the setting of the accessKeyId and secretAccessKey configuration options.
|
||||
It is recommended to follow the [Amazon AWS guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) and set either a shared credentials guide or the proper environment variables. However, if that is not possible, the publisher config allows the setting of the accessKeyId and secretAccessKey configuration options.
|
||||
|
|
|
@ -4,8 +4,7 @@ The Snapcraft target publishes your .snap artifacts to the Snap Store. All confi
|
|||
|
||||
This target requires that the system has the snapcraft utility installed.
|
||||
|
||||
Configuration options are documented in [PublisherSnapConfig](https://js.electronforge.io/interfaces/_electron_forge_publisher_snapcraft.PublisherSnapcraftConfig.htmls).
|
||||
|
||||
Configuration options are documented in [PublisherSnapConfig](https://js.electronforge.io/interfaces/_electron_forge_publisher_snapcraft.PublisherSnapcraftConfig.html).
|
||||
|
||||
```javascript title=forge.config.js
|
||||
module.exports = {
|
||||
|
@ -20,4 +19,3 @@ module.exports = {
|
|||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
@ -9,7 +9,7 @@ as well.
|
|||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
```javascript
|
||||
import Logger from '@electron-forge/web-multi-logger';
|
||||
|
||||
const logger = new Logger();
|
||||
|
|
1196
yarn.lock
1196
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче