Skip to content

Commit adb20f6

Browse files
committed
chore: remove --json flag
1 parent 28cd9a8 commit adb20f6

File tree

7 files changed

+8
-23
lines changed

7 files changed

+8
-23
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Preview a Lightning Experience app locally and in real-time, without deploying i
117117

118118
```
119119
USAGE
120-
$ sf lightning dev app -o <value> [--json] [--flags-dir <value>] [-n <value>] [-t desktop|ios|android] [-i <value>]
120+
$ sf lightning dev app -o <value> [--flags-dir <value>] [-n <value>] [-t desktop|ios|android] [-i <value>]
121121
122122
FLAGS
123123
-i, --device-id=<value> ID of the mobile device to display the preview if device type is set to `ios` or
@@ -130,7 +130,6 @@ FLAGS
130130
131131
GLOBAL FLAGS
132132
--flags-dir=<value> Import flag values from a directory.
133-
--json Format output as json.
134133
135134
DESCRIPTION
136135
Preview a Lightning Experience app locally and in real-time, without deploying it.
@@ -178,7 +177,7 @@ Preview an Experience Builder site locally and in real-time, without deploying i
178177

179178
```
180179
USAGE
181-
$ sf lightning dev site [--json] [--flags-dir <value>] [-n <value>] [--debug] [-o <value>]
180+
$ sf lightning dev site [--flags-dir <value>] [-n <value>] [--debug] [-o <value>]
182181
183182
FLAGS
184183
-n, --name=<value> Name of the Experience Builder site to preview. It has to match a site name from the current
@@ -189,7 +188,6 @@ FLAGS
189188
190189
GLOBAL FLAGS
191190
--flags-dir=<value> Import flag values from a directory.
192-
--json Format output as json.
193191
194192
DESCRIPTION
195193
Preview an Experience Builder site locally and in real-time, without deploying it.

command-snapshot.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"command": "lightning:dev:app",
55
"flagAliases": [],
66
"flagChars": ["i", "n", "o", "t"],
7-
"flags": ["device-id", "device-type", "flags-dir", "json", "name", "target-org"],
7+
"flags": ["device-id", "device-type", "flags-dir", "name", "target-org"],
88
"plugin": "@salesforce/plugin-lightning-dev"
99
},
1010
{
1111
"alias": [],
1212
"command": "lightning:dev:site",
1313
"flagAliases": [],
1414
"flagChars": ["n", "o"],
15-
"flags": ["flags-dir", "json", "name", "target-org"],
15+
"flags": ["flags-dir", "name", "target-org"],
1616
"plugin": "@salesforce/plugin-lightning-dev"
1717
}
1818
]

messages/lightning.dev.app.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ To learn more about Local Dev enablement, considerations, and limitations, see t
2323

2424
Name of the Lightning Experience app to preview.
2525

26-
# flags.target-org.summary
27-
28-
Username or alias of the target org. Not required if the `target-org` configuration variable is already set.
29-
3026
# flags.device-type.summary
3127

3228
Type of device to display the app preview.

messages/lightning.dev.site.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ For more considerations and limitations, see the Lightning Web Components Develo
2121

2222
Name of the Experience Builder site to preview. It has to match a site name from the current org.
2323

24-
# flags.target-org.summary
25-
26-
Username or alias of the target org. Not required if the `target-org` configuration variable is already set.
27-
2824
# examples
2925

3026
- Preview the site "Partner Central" from the org "myOrg":

src/commands/lightning/dev/app.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,14 @@ export default class LightningDevApp extends SfCommand<void> {
5959
public static readonly summary = messages.getMessage('summary');
6060
public static readonly description = messages.getMessage('description');
6161
public static readonly examples = messages.getMessages('examples');
62+
public static readonly enableJsonFlag = false; // Disable json flag since we don't return anything
6263

6364
public static readonly flags = {
6465
name: Flags.string({
6566
summary: messages.getMessage('flags.name.summary'),
6667
char: 'n',
6768
}),
68-
'target-org': Flags.requiredOrg({
69-
summary: messages.getMessage('flags.target-org.summary'),
70-
}),
69+
'target-org': Flags.requiredOrg(),
7170
'device-type': Flags.option({
7271
summary: messages.getMessage('flags.device-type.summary'),
7372
char: 't',

src/commands/lightning/dev/site.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ export default class LightningDevSite extends SfCommand<void> {
1818
public static readonly summary = messages.getMessage('summary');
1919
public static readonly description = messages.getMessage('description');
2020
public static readonly examples = messages.getMessages('examples');
21+
public static readonly enableJsonFlag = false; // Disable json flag since we don't return anything
2122

2223
public static readonly flags = {
2324
name: Flags.string({
2425
summary: messages.getMessage('flags.name.summary'),
2526
char: 'n',
2627
}),
27-
'target-org': Flags.optionalOrg({ summary: messages.getMessage('flags.target-org.summary') }),
28+
'target-org': Flags.requiredOrg(),
2829
};
2930

3031
public async run(): Promise<void> {

test/commands/lightning/dev/site.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ describe('lightning dev site', () => {
3131
// expect(output).to.include('hello world');
3232
});
3333

34-
it('runs hello with --json and no provided name', async () => {
35-
// const result = await LightningDevSite.run([]);
36-
// expect(result.path).to.equal('/Users/nkruk/git/plugin-lightning-dev/src/commands/lightning/dev/site.ts');
37-
});
38-
3934
it('runs hello world --name Astro', async () => {
4035
// await LightningDevSite.run(['--name', 'Astro']);
4136
// const output = sfCommandStubs.log

0 commit comments

Comments
 (0)