If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in Node.js. If you're looking for the CLI documentation you can find that here.
If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in Node.js. If you're looking for the CLI documentation you can find that here.
Context
Most operations require that a context be already established. The context says a lot about your application and since the compiler is stateless, you will have to establish a context before starting. The context-service provides you with 3 methods: startContext, getContext and endContext.
Usage
import { startContext } from '@webruntime/api';
await contextService.startContext(options);
try {
// do something
} finally {
contextService.endContext();
}
If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in Node.js. If you're looking for the CLI documentation you can find that here.