Skip to content

Commit ce1f9b6

Browse files
committed
feat: scaffolding for initial cmpDev command
1 parent 311d6ad commit ce1f9b6

File tree

3 files changed

+241
-233
lines changed

3 files changed

+241
-233
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@inquirer/select": "^2.4.7",
1010
"@lwc/lwc-dev-server": "~11.5.0",
1111
"@lwc/sfdc-lwc-compiler": "~11.5.0",
12-
"@lwrjs/api": "0.16.4",
12+
"@lwrjs/api": "0.16.6",
1313
"@oclif/core": "^4.1.0",
1414
"@salesforce/core": "^8.6.2",
1515
"@salesforce/kit": "^3.1.6",

src/commands/lightning/dev/component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
99
import { Messages } from '@salesforce/core';
10+
import { cmpDev } from '@lwrjs/api';
1011

1112
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
1213
const messages = Messages.loadMessages('@salesforce/plugin-lightning-dev', 'lightning.dev.component');
@@ -33,7 +34,14 @@ export default class LightningDevComponent extends SfCommand<LightningDevCompone
3334
const { flags } = await this.parse(LightningDevComponent);
3435

3536
const name = flags.name ?? 'world';
36-
this.log(`hello ${name}`);
37+
this.log(`preview component: ${name}`);
38+
39+
// TODO implement me
40+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
41+
await cmpDev({
42+
componentName: name,
43+
});
44+
3745
return {
3846
path: '',
3947
};

0 commit comments

Comments
 (0)