Skip to content

Commit 39916a2

Browse files
authored
Merge pull request #6 from salesforcecli/mdonnalley/update-readme
chore: update readme
2 parents a01e5a9 + 0de118c commit 39916a2

File tree

2 files changed

+50
-225
lines changed

2 files changed

+50
-225
lines changed

COMMANDS.md

Lines changed: 0 additions & 196 deletions
This file was deleted.

README.md

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,70 @@
22

33
Commands to interact with Users and Permission Sets in a scratch org
44

5-
## Getting Started
5+
This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
66

7-
To build the plugin locally, make sure to have yarn installed and run the following commands:
7+
We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
88

9+
## Install
10+
11+
```bash
12+
sfdx plugins:install user@x.y.z
913
```
10-
Clone the repository
11-
$ git clone git@github.com:salesforcecli/plugin-user
12-
Install the dependencies and compile
13-
$ yarn install
14-
$ yarn prepack
15-
Link your plugin to the sfdx cli
16-
$ sfdx plugins:link .
17-
To verify
18-
$ sfdx plugins
19-
```
2014

21-
## Debugging your plugin
15+
## Issues
16+
17+
Please report any issues at https://github.com/forcedotcom/cli/issues
18+
19+
## Contributing
20+
21+
1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
22+
2. Create a new issue before starting your project so that we can keep track of
23+
what you are trying to add/fix. That way, we can also offer suggestions or
24+
let you know if there is already an effort in progress.
25+
3. Fork this repository.
26+
4. [Build the plugin locally](#build)
27+
5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
28+
6. Edit the code in your fork.
29+
7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
30+
8. Sign CLA (see [CLA](#cla) below).
31+
9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
2232

23-
We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the `.vscode` directory of this plugin is a `launch.json` config file, which allows you to attach a debugger to the node process when running your commands.
33+
### CLA
2434

25-
To debug the `force:user:list` command:
35+
External contributors will be required to sign a Contributor's License
36+
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
2637

27-
If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch:
38+
### Build
2839

29-
```sh-session
30-
$ force:user:list -u myOrg@example.com --dev-suspend
40+
To build the plugin locally, make sure to have yarn installed and run the following commands:
41+
42+
```bash
43+
# Clone the repository
44+
git clone git@github.com:salesforcecli/plugin-user
45+
46+
# Install the dependencies and compile
47+
yarn install
48+
yarn build
3149
```
3250

33-
Alternatively, to call your command using the `bin/run` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger:
51+
To use your plugin, run using the local `./bin/run` or `./bin/run.cmd` file.
3452

35-
```sh-session
36-
$ NODE_OPTIONS=--inspect-brk bin/run force:user:list -u myOrg@example.com
53+
```bash
54+
# Run using local run file.
55+
./bin/run user
3756
```
3857

39-
2. Set some breakpoints in your command code
40-
3. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view.
41-
4. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen.
42-
5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program.
43-
6. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5).
44-
![how to debug](.images/vscodeScreenshot.png)
45-
Congrats, you are debugging!
58+
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
4659

47-
## Commands
60+
```bash
61+
# Link your plugin to the sfdx cli
62+
sfdx plugins:link .
63+
# To verify
64+
sfdx plugins
65+
```
4866

67+
## Commands
68+
<!-- commands -->
4969
A list of the available commands
5070

5171
- sfdx force:user:list [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
@@ -240,3 +260,4 @@ EXAMPLES
240260
sfdx force:user:permset:assign -n DreamHouse -u me@my.org
241261
sfdx force:user:permset:assign -n DreamHouse -o "user1@my.org,user2,user3"
242262
```
263+
<!-- commandsstop -->

0 commit comments

Comments
 (0)