Skip to content

Commit 5c4b6f4

Browse files
committed
fix: address comments
1 parent 6db7c5d commit 5c4b6f4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

command-snapshot.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"alias": [],
1212
"command": "lightning:dev:component",
1313
"flagAliases": [],
14-
"flagChars": ["n"],
15-
"flags": ["flags-dir", "json", "name"],
14+
"flagChars": ["n", "o"],
15+
"flags": ["flags-dir", "json", "name", "target-org"],
1616
"plugin": "@salesforce/plugin-lightning-dev"
1717
},
1818
{

src/commands/lightning/dev/component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import { PromptUtils } from '../../../shared/promptUtils.js';
1515
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
1616
const messages = Messages.loadMessages('@salesforce/plugin-lightning-dev', 'lightning.dev.component');
1717

18-
const MODULES_DIR = './force-app/main/default/lwc';
18+
// TODO support other module directories
19+
const MODULES_DIR = path.resolve(path.join('force-app', 'main', 'default', 'lwc'));
1920

2021
function getDirectories(filePath: string): string[] {
2122
try {
@@ -40,6 +41,9 @@ export default class LightningDevComponent extends SfCommand<void> {
4041
char: 'n',
4142
requiredOrDefaulted: false,
4243
}),
44+
// TODO should this be required or optional?
45+
// We don't technically need this if your components are simple / don't need any data from your org
46+
'target-org': Flags.requiredOrg(),
4347
};
4448

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

0 commit comments

Comments
 (0)