You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Create your plugin's repo in the salesforcecli github org
17
+
4. When you're ready, replace the contents of this README with the information you want.
18
+
19
+
## Learn about `sf` plugins
20
+
21
+
Salesforce CLI plugins are based on the [oclif plugin framework](https://oclif.io/docs/introduction). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
22
+
23
+
This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](#tooling) used by Salesforce. There is also a default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb) standards.
24
+
25
+
Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is required to keep these tests active in your plugin if you plan to have it bundled.
3. Create your plugin's repo in the salesforcecli github org
62
-
4. When you're ready, replace the contents of this README with the information you want.
63
-
64
-
## Learn about `sf` plugins
65
-
66
-
Salesforce CLI plugins are based on the [oclif plugin framework](https://oclif.io/docs/introduction). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
67
-
68
-
This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](#tooling) used by Salesforce. There is also a default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb) standards.
69
-
70
-
Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is required to keep these tests active in your plugin if you plan to have it bundled.
# Everything past here is only a suggestion as to what should be in your specific plugin's description
83
-
84
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).
85
6
86
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.
@@ -91,6 +12,12 @@ We always recommend using the latest version of these commands bundled with the
91
12
sf plugins install @salesforce/plugin-lightning-dev@x.y.z
92
13
```
93
14
15
+
or
16
+
17
+
```bash
18
+
sf plugins install @salesforce/plugin-lightning-dev
19
+
```
20
+
94
21
## Issues
95
22
96
23
Please report any issues at https://github.com/forcedotcom/cli/issues
@@ -142,45 +69,181 @@ sf plugins link .
142
69
sf plugins
143
70
```
144
71
72
+
## LWR Sites Development Environment
73
+
74
+
Follow these instructions if you want to setup a dev environment for the `sf lightning dev site` command.
75
+
76
+
## Setup
77
+
78
+
1.[Enable Local Development] (https://developer.salesforce.com/docs/platform/lwc/guide/get-started-test-components.html#enable-local-dev)
79
+
80
+
2. Deploy some source files to your org from your SFDX project
81
+
82
+
```bash
83
+
sf org login web --alias dev --instance-url ${orgfarmUrl}
84
+
85
+
```
86
+
87
+
3. Add those source files to an LWR site in the Experience Builder and Publish the site (basePath: '/')
88
+
89
+
4. Follow the [Build the plugin locally](#build) instructions
90
+
91
+
5.[optional] Linking / Debugging LWR Source
92
+
93
+
```bash
94
+
# build and link lwr source
95
+
cd lwr
96
+
yarn && yarn link-lwr
97
+
98
+
# build and link plugin-lightning-dev source
99
+
cd plugin-lightning-dev
100
+
yarn && yarn build
101
+
yarn link-lwr
102
+
103
+
# SFDX Project
104
+
cd sfdx-project
105
+
106
+
# Login to your org
107
+
sf org login web --alias dev --instance-url https://login.test1.pc-rnd.salesforce.com/ (orgfarm needs instance url)
108
+
109
+
# run/debug the sf cli command (attach to the CLI from the LWR repo in VS Code)
110
+
NODE_OPTIONS="--inspect-brk" sf lightning dev site --target-org dev
111
+
```
112
+
113
+
Now you can Remote Attach to the CLI from the vscode debugger:
114
+
115
+
- Use the "Attach" launch configuration
116
+
- Run launch config from LWR repo if you want to debug LWR source
117
+
- Run launch config from plugin-lightning-dev source if you want to debug the SFDX plugin source specifically
118
+
119
+
If this doesn't work for whatever reason, you can always alias the build output directly like so:
120
+
121
+
```bash
122
+
alias sfdev="/{pathToGitDir}/plugin-lightning-dev/bin/run.js"
123
+
# SFDX Project
124
+
NODE_OPTIONS="--inspect-brk" sfdev lightning dev site --target-org dev
125
+
```
126
+
127
+
6. Make changes to your c-namespace components and you should see the browser refresh with those changes!
0 commit comments