Description for incremental-compiler. Hello world!
npm install incremental-compilerts
import { BaseClientCompiler, BaseClientCompilerOptions } from 'incremental-compiler/src';
export abstract class BaseCompilerForProject<
ADDITIONAL_DATA = any,
PROJECT extends BaseProject = BaseProject,
> extends BaseClientCompiler {
constructor(
public project: PROJECT,
options: BaseClientCompilerOptions,
) {
super();
this.initOptions(options);
}
}
`
2. Incremental watcher object "incrementalWatcher"
`ts
import { incrementalWatcher } from 'incremental-compiler/src';
const watcher = await incrementalWatcher(
[
this.project.pathFor(environments/*/.ts),
this.project.pathFor(env.ts),
],
{
name: 'Environment Config Watcher',
ignoreInitial: true,
followSymlinks: false,
},
);
watcher.on('all', async (event, filePath) => {
onChange();
});
``