Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/config/uiBundleDiscovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ import type { UiBundleManifest } from './manifest.js';
const logger = Logger.childFromRoot('UiBundleDiscovery');

/**
* Default command to run when no ui-bundle.json manifest is found
* Default dev command when `ui-bundle.json` does not specify `dev.command`.
*
* Set to `npm run dev:design` so that design-mode clients (notably the Live
* Preview VS Code extension) get hybrid-editor support automatically. The
* bundle's `package.json` must define a `dev:design` script for this
* default to resolve. Bundles that need a different command should set
* `dev.command` in `ui-bundle.json`.
*/
export const DEFAULT_DEV_COMMAND = 'npm run dev';
export const DEFAULT_DEV_COMMAND = 'npm run dev:design';

/**
* Standard metadata path segment for uiBundles (relative to package directory).
Expand Down
4 changes: 2 additions & 2 deletions test/config/uiBundleDiscovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ describe('uiBundleDiscovery', () => {
});

describe('DEFAULT_DEV_COMMAND', () => {
it('should be npm run dev', () => {
expect(DEFAULT_DEV_COMMAND).to.equal('npm run dev');
it('should be npm run dev:design', () => {
expect(DEFAULT_DEV_COMMAND).to.equal('npm run dev:design');
});
});

Expand Down
Loading