Skip to content

Commit

Permalink
Remove $ from shell commands in README (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlatz authored Apr 7, 2024
1 parent a199fd8 commit 5e8952d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To develop Homebridge plugins you must have Node.js 18 or later installed, and a
Using a terminal, navigate to the project folder and run this command to install the development dependencies:

```shell
$ npm install
npm install
```

### Update package.json
Expand Down Expand Up @@ -65,21 +65,21 @@ Open the [`config.schema.json`](./config.schema.json) file and change the follow
TypeScript needs to be compiled into JavaScript before it can run. The following command will compile the contents of your [`src`](./src) directory and put the resulting code into the `dist` folder.

```shell
$ npm run build
npm run build
```

### Link To Homebridge

Run this command so your global installation of Homebridge can discover the plugin in your development environment:

```shell
$ npm link
npm link
```

You can now start Homebridge, use the `-D` flag, so you can see debug log messages in your plugin:

```shell
$ homebridge -D
homebridge -D
```

### Watch For Changes and Build Automatically
Expand All @@ -106,7 +106,7 @@ If you want to have your code compile automatically as you make changes, and res
and then you can run:

```shell
$ npm run watch
npm run watch
```

This will launch an instance of Homebridge in debug mode which will restart every time you make a change to the source code. It will load the config stored in the default location under `~/.homebridge`. You may need to stop other running instances of Homebridge while using this command to prevent conflicts. You can adjust the Homebridge startup command in the [`nodemon.json`](./nodemon.json) file.
Expand All @@ -131,21 +131,21 @@ You can use the `npm version` command to help you with this:

```shell
# major update / breaking changes
$ npm version major
npm version major

# minor update / new features
$ npm version update
npm version update

# patch / bugfixes
$ npm version patch
npm version patch
```

### Publish Package

When you are ready to publish your plugin to [npm](https://www.npmjs.com/), make sure you have removed the `private` attribute from the [`package.json`](./package.json) file then run:

```shell
$ npm publish
npm publish
```

If you are publishing a scoped plugin, i.e. `@username/homebridge-xxx` you will need to add `--access=public` to command the first time you publish.
Expand All @@ -156,16 +156,16 @@ You can publish *beta* versions of your plugin for other users to test before yo

```shell
# create a new pre-release version (eg. 2.1.0-beta.1)
$ npm version prepatch --preid beta
npm version prepatch --preid beta

# publish to @beta
$ npm publish --tag=beta
npm publish --tag=beta
```

Users can then install the *beta* version by appending `@beta` to the install command, for example:

```shell
$ sudo npm install -g homebridge-example-plugin@beta
sudo npm install -g homebridge-example-plugin@beta
```

### Best Practices
Expand Down

0 comments on commit 5e8952d

Please sign in to comment.