@salesforce/plugin-lightning-dev 1.0.26-alpha.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -43
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,47 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@salesforce/plugin-lightning-dev) [](https://npmjs.org/package/@salesforce/plugin-lightning-dev) [](https://raw.githubusercontent.com/salesforcecli/plugin-lightning-dev/main/LICENSE.txt)
|
|
4
4
|
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
Prereqs:
|
|
8
|
-
|
|
9
|
-
1. Setup an Experience Site and publish it
|
|
10
|
-
|
|
11
|
-
2. Run the following:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
yarn && yarn build
|
|
15
|
-
yarn link-lwr
|
|
16
|
-
sf org login web --instance-url ${orgfarmUrl}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Run the command
|
|
20
|
-
|
|
21
|
-
Then run the following for your environment:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
./bin/dev.js lightning dev site
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
or for debugging:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
NODE_OPTIONS='--inspect-brk' ./bin/dev.js lightning dev site
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
No need to recompile or watch typescript files as this happens automagically.
|
|
34
|
-
|
|
35
|
-
## Fix Snapshots
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
node --loader ts-node/esm --no-warnings=ExperimentalWarning ./bin/dev.js snapshot:compare
|
|
39
|
-
node --loader ts-node/esm --no-warnings=ExperimentalWarning ./bin/dev.js schema:compare
|
|
40
|
-
yarn && yarn build
|
|
41
|
-
yarn update-snapshots
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## TODO Update
|
|
45
|
-
|
|
46
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).
|
|
47
6
|
|
|
48
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.
|
|
@@ -53,6 +12,12 @@ We always recommend using the latest version of these commands bundled with the
|
|
|
53
12
|
sf plugins install @salesforce/plugin-lightning-dev@x.y.z
|
|
54
13
|
```
|
|
55
14
|
|
|
15
|
+
or
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
sf plugins install @salesforce/plugin-lightning-dev
|
|
19
|
+
```
|
|
20
|
+
|
|
56
21
|
## Issues
|
|
57
22
|
|
|
58
23
|
Please report any issues at https://github.com/forcedotcom/cli/issues
|
|
@@ -104,6 +69,72 @@ sf plugins link .
|
|
|
104
69
|
sf plugins
|
|
105
70
|
```
|
|
106
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!
|
|
128
|
+
|
|
129
|
+
## Fixing Snapshots
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
node --loader ts-node/esm --no-warnings=ExperimentalWarning ./bin/dev.js snapshot:compare
|
|
133
|
+
node --loader ts-node/esm --no-warnings=ExperimentalWarning ./bin/dev.js schema:compare
|
|
134
|
+
yarn && yarn build
|
|
135
|
+
yarn update-snapshots
|
|
136
|
+
```
|
|
137
|
+
|
|
107
138
|
## Commands
|
|
108
139
|
|
|
109
140
|
<!-- commands -->
|
|
@@ -169,7 +200,7 @@ EXAMPLES
|
|
|
169
200
|
$ sf lightning dev app --target-org myOrg --device-type ios --device-id "iPhone 15 Pro Max"
|
|
170
201
|
```
|
|
171
202
|
|
|
172
|
-
_See code: [src/commands/lightning/dev/app.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/1.0
|
|
203
|
+
_See code: [src/commands/lightning/dev/app.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/0.1.0/src/commands/lightning/dev/app.ts)_
|
|
173
204
|
|
|
174
205
|
## `sf lightning dev site`
|
|
175
206
|
|
|
@@ -213,6 +244,6 @@ EXAMPLES
|
|
|
213
244
|
$ sf lightning dev site --name "Partner Central" --target-org myOrg
|
|
214
245
|
```
|
|
215
246
|
|
|
216
|
-
_See code: [src/commands/lightning/dev/site.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/1.0
|
|
247
|
+
_See code: [src/commands/lightning/dev/site.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/0.1.0/src/commands/lightning/dev/site.ts)_
|
|
217
248
|
|
|
218
249
|
<!-- commandsstop -->
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-lightning-dev",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-lightning-dev",
|
|
9
|
-
"version": "1.0
|
|
9
|
+
"version": "1.1.0",
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@inquirer/prompts": "^5.3.8",
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-lightning-dev",
|
|
3
3
|
"description": "Lightning development tools for LEX, Mobile, and Experience Sites",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"exports": "./lib/index.js",
|
|
221
221
|
"type": "module",
|
|
222
222
|
"sfdx": {
|
|
223
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/1.0.
|
|
224
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/1.0.
|
|
223
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/1.1.0.crt",
|
|
224
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/1.1.0.sig"
|
|
225
225
|
}
|
|
226
226
|
}
|