prefer sh to bash in the docs

This commit is contained in:
Charles Kerr 2017-11-24 11:13:57 +01:00
parent c18afc924b
commit 1b0c1842ca
16 changed files with 87 additions and 81 deletions

View file

@ -15,13 +15,13 @@ Steps to package your app into an `asar` archive:
### 1. Install the asar Utility
```bash
```sh
$ npm install -g asar
```
### 2. Package with `asar pack`
```bash
```sh
$ asar pack your-app app.asar
```
@ -38,7 +38,7 @@ files in the filesystem.
For example, suppose we have an `example.asar` archive under `/path/to`:
```bash
```sh
$ asar list /path/to/example.asar
/app.js
/file.txt
@ -174,7 +174,7 @@ To work around this, you can unpack some files creating archives by using the
`--unpack` option, an example of excluding shared libraries of native modules
is:
```bash
```sh
$ asar pack app app.asar --unpack *.node
```

View file

@ -2,7 +2,7 @@
### 1. Open an Electron project in VSCode.
```bash
```sh
$ git clone git@github.com:electron/electron-quick-start.git
$ code electron-quick-start
```

View file

@ -82,7 +82,7 @@ with the Bundle ID of your app.
And then sign your app with the following script:
```bash
```sh
#!/bin/bash
# Name of your app.
@ -129,7 +129,7 @@ Native modules used in your app also need to be signed. If using
electron-osx-sign, be sure to include the path to the built binaries in the
argument list:
```bash
```sh
electron-osx-sign YourApp.app YourApp.app/Contents/Resources/app/node_modules/nativemodule/build/release/nativemodule
```

View file

@ -169,7 +169,7 @@ an `npm` module that contains pre-compiled versions of Electron.
If you've installed it globally with `npm`, then you will only need to run the
following in your app's source directory:
```bash
```sh
electron .
```
@ -177,19 +177,19 @@ If you've installed it locally, then run:
#### macOS / Linux
```bash
```sh
$ ./node_modules/.bin/electron .
```
#### Windows
```bash
```sh
$ .\node_modules\.bin\electron .
```
#### Node v8.2.0 and later
```bash
```sh
$ npx electron .
```
@ -200,19 +200,19 @@ binary to execute your app directly.
#### macOS
```bash
```sh
$ ./Electron.app/Contents/MacOS/Electron your-app/
```
#### Linux
```bash
```sh
$ ./electron/electron your-app/
```
#### Windows
```bash
```sh
$ .\electron\electron.exe your-app\
```
@ -232,7 +232,7 @@ repository.
**Note**: Running this requires [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) (which includes [npm](https://npmjs.org)) on your system.
```bash
```sh
# Clone the repository
$ git clone https://github.com/electron/electron-quick-start
# Go into the repository

View file

@ -16,7 +16,7 @@ directly.
An example of installing all dependencies for Electron:
```bash
```sh
# Electron's version.
export npm_config_target=1.2.3
# The architecture of Electron, can be ia32 or x64.
@ -41,7 +41,7 @@ of downloading headers and building native modules for your app.
An example of installing `electron-rebuild` and then rebuild modules with it:
```bash
```sh
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this:
@ -57,7 +57,7 @@ If you are a developer developing a native module and want to test it against
Electron, you might want to rebuild the module for Electron manually. You can
use `node-gyp` directly to build for Electron:
```bash
```sh
cd /path-to-module/
HOME=~/.electron-gyp node-gyp rebuild --target=1.2.3 --arch=x64 --dist-url=https://atom.io/download/electron
```

View file

@ -14,7 +14,7 @@ From [ChromeDriver - WebDriver for Chrome][chrome-driver]:
for Electron. It is built on top of [WebdriverIO](http://webdriver.io/) and
has helpers to access Electron APIs in your tests and bundles ChromeDriver.
```bash
```sh
$ npm install --save-dev spectron
```
@ -57,7 +57,7 @@ a Node package for testing with web driver, we will use it as an example.
First you need to download the `chromedriver` binary, and run it:
```bash
```sh
$ npm install electron-chromedriver
$ ./node_modules/.bin/chromedriver
Starting ChromeDriver (v2.10.291558) on port 9515
@ -68,7 +68,7 @@ Remember the port number `9515`, which will be used later
### 2. Install WebDriverJS
```bash
```sh
$ npm install selenium-webdriver
```
@ -114,7 +114,7 @@ driver.
First you need to download the `chromedriver` binary, and run it:
```bash
```sh
$ npm install electron-chromedriver
$ ./node_modules/.bin/chromedriver --url-base=wd/hub --port=9515
Starting ChromeDriver (v2.10.291558) on port 9515
@ -125,7 +125,7 @@ Remember the port number `9515`, which will be used later
### 2. Install WebdriverIO
```bash
```sh
$ npm install webdriverio
```