Skip to content

Commit 37ca1ee

Browse files
Updating Docs
1 parent 037b383 commit 37ca1ee

File tree

12 files changed

+183
-162
lines changed

12 files changed

+183
-162
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,39 @@ Make developing for Salesforce Commerce Cloud work with any IDE on MacOS, Window
1717
Developer Overview
1818
---
1919

20-
1. [Install](docs/install.md)
21-
2. [Setup](docs/setup.md)
22-
3. [Usage](docs/usage.md)
20+
#### Commands
21+
22+
* **[`sfcc setup`](docs/cmd-setup.md)** - Setup SFCC Development
23+
* **[`sfcc list`](docs/cmd-list.md)** - List Configured SFCC Clients
24+
* **[`sfcc delete`](docs/cmd-delete.md)** - Delete Config for Client
25+
* **[`sfcc watch`](docs/cmd-watch.md)** - Watch for Changes and Push Updates
26+
* **[`sfcc log`](docs/cmd-log.md)** - View Logs with Advanced Search & Filter Capabilities
27+
* **[`sfcc help`](docs/cmd-help.md)** - Get Help when you need it
2328

2429
#### Additional Information
2530

2631
* [IDE Setup](docs/ide-setup.md)
2732
* [Troubleshooting](docs/troubleshooting.md)
2833

34+
35+
Install
36+
---
37+
38+
#### Install via Clone
39+
40+
```bash
41+
cd ~
42+
git clone https://github.com/redvanworkshop/sfcc-cli.git
43+
cd sfcc-cli
44+
npm install -g
45+
sfcc setup
46+
```
47+
48+
#### Install via NPM
49+
50+
```bash
51+
npm install -g sfcc-cli
52+
sfcc setup
53+
```
54+
2955
_Inspired by [dw-cli](https://github.com/mzwallace/dw-cli). Custom Built for RVW Employees._

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const argv = yargs
4747
})
4848
.command('list', 'List Configured SFCC Clients')
4949
.command('delete <client> [instance]', 'Delete Config for Client')
50-
.command('watch [client] [instance]', 'Watch for Changes and Push Updates', {
50+
.command('watch [client] [instance]', 'Watch for Code Changes and Push Updates', {
5151
log: {
5252
describe: 'Pipe Output to Log File ~/.sffc-cli.log',
5353
type: 'boolean',

docs/cmd-delete.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
![Logo](img/logo.png "Logo")
2+
3+
**[↤ Developer Overview](../README.md#developer-overview)**
4+
5+
`sfcc delete`
6+
---
7+
8+
> Delete Config for Client
9+
10+
To delete a configuration option, you can pass in a client and instance you want to delete. Or just delete everything for that client:
11+
12+
```bash
13+
sfcc delete <client> <instance>
14+
sfcc delete <client>
15+
```

docs/cmd-help.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
![Logo](img/logo.png "Logo")
2+
3+
**[↤ Developer Overview](../README.md#developer-overview)**
4+
5+
`sfcc help`
6+
---
7+
8+
> Get Help when you need it
9+
10+
You can get help at any time by running:
11+
12+
```bash
13+
sfcc help
14+
```
15+
16+
You can get help on a specific command by just adding `help` to the end of the command:
17+
18+
```bash
19+
sfcc log help
20+
sfcc watch help
21+
```

docs/cmd-list.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
![Logo](img/logo.png "Logo")
2+
3+
**[↤ Developer Overview](../README.md#developer-overview)**
4+
5+
`sfcc list`
6+
---
7+
8+
> List Configured SFCC Clients
9+
10+
To get a list of your current clients & instances, you can run:
11+
12+
```bash
13+
sfcc list
14+
```

docs/cmd-log.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
![Logo](img/logo.png "Logo")
2+
3+
**[↤ Developer Overview](../README.md#developer-overview)**
4+
5+
`sfcc log`
6+
---
7+
8+
> Stream/Search log files from an instance
9+
10+
If you only have a single project, you can run:
11+
12+
```bash
13+
sfcc log
14+
```
15+
16+
If needed to setup multiple clients, or multiple instances for the same client, you will need to specify what to watch:
17+
18+
```bash
19+
sfcc log <client> <instance>
20+
```
21+
22+
**FLAGS:**
23+
24+
Name | Param | Default | Definition
25+
---------|------------|---------|----------------------------------------------
26+
Polling | `-p` | `2` | Polling Interval ( in Seconds )
27+
Lines | `-l` | `100` | Number of Existing Lines to Display
28+
Include | `-i` | | Log Types to Include ( use `sfcc log --list` for list )
29+
Exclude | `-e` | | Log Types to Exclude ( use `sfcc log --list` for list )
30+
Filter | `-f` | | Filter Log Messages that contain this string or RegExp
31+
Truncate | `-t` | | Length to Truncate Messages ( if they are too long )
32+
List | `--list` | | Output List of Log Types for `-i` & `-e`
33+
Search | `--search` | `false` | Search Logs with no Live Updates
34+
Latest | `--latest` | `false` | Show Latest Logs Only ( default is to use ALL logs )
35+
36+
#### ADVANCED USE:
37+
38+
Get current list of log types:
39+
40+
```bash
41+
sfcc log list
42+
```
43+
44+
Watch latest `customerror` logs that contain the text `PipelineCallServlet`:
45+
46+
```bash
47+
sfcc log -i customerror -l 5 -f PipelineCallServlet --latest
48+
```
49+
50+
View any `warn,error` logs that contain a matching `[0-9]{15}` RegExp pattern, and watch for new entries:
51+
52+
```bash
53+
sfcc log -i warn,error -f '[0-9]{15}'
54+
```
55+
56+
Search all latest existing logs except `staging,syslog` that contain either `WARN|ERROR` RegExp pattern:
57+
58+
```bash
59+
sfcc log -e staging,syslog -f 'WARN|ERROR' --search --latest
60+
```

docs/setup.md renamed to docs/cmd-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
![Logo](img/logo.png "Logo")
22

3-
**[↤ Developer Overview](../README.md)**
3+
**[↤ Developer Overview](../README.md#developer-overview)**
44

5-
Setup
5+
`sfcc setup`
66
---
77

88
> Get your SFCC Repo added to the SFCC CLI Config

docs/cmd-watch.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
![Logo](img/logo.png "Logo")
2+
3+
**[↤ Developer Overview](../README.md#developer-overview)**
4+
5+
`sfcc watch`
6+
---
7+
8+
> Watch for Code Changes and Push Updates
9+
10+
Watch for any changes to your projects source code, and automagically upload in the background, while you use whatever IDE you want.
11+
12+
If you have already run `sfcc setup`, and you only have a single project, you can run:
13+
14+
```bash
15+
sfcc watch
16+
```
17+
18+
If needed to setup multiple clients, or multiple instances for the same client, you will need to specify what to watch:
19+
20+
```bash
21+
sfcc watch <client> <instance>
22+
```
23+
24+
If you don't want to get notified of every upload, but would rather only get notified about errors, you can pass `--errors-only`:
25+
26+
```bash
27+
sfcc watch <client> <instance> --errors-only
28+
```
29+
30+
If you would like to run the watcher as a background process, but capture the log output, you can pass `--log`, and a log will be created at `~/.sfcc-cli.log` ( log is truncated to last 500 lines each time you start a new `watch` ):
31+
32+
```bash
33+
sfcc watch <client> <instance> --log &
34+
```
35+
36+
NOTE: To run the background process, you'll need to make sure to add a `&` to the end of the command. You should see output from that command that looks like `[2] 6768`. You can bring the process to the foreground by running using the number in the brackets, and running a command like `fg %2`. You can get a list of all jobs running in the background by running `jobs`.

docs/ide-setup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ IDE Setup
1313

1414
#### Sublime Text
1515

16+
[Coming Soon]
1617

1718
#### VSs Code
19+
20+
[Coming Soon]

docs/install.md

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

0 commit comments

Comments
 (0)