use of io.crnk.gen.typescript.internal.TSGenerator in project crnk-framework by crnk-project.
the class GeneratorExecutor method run.
public void run(File outputDir) {
TSGeneratorConfig config = new TSGeneratorConfig();
config.setGenerateExpressions(true);
config.getNpm().setPackagingEnabled(false);
config.getNpm().setPackageName("@crnk/angular-ngrx");
config.getNpm().getPackageMapping().put(MetaElement.class.getPackage().getName(), "@crnk/angular-ngrx/meta");
MetaModule metaModule = MetaModule.create();
metaModule.addMetaProvider(new ResourceMetaProvider());
CrnkBoot boot = new CrnkBoot();
boot.setServiceDiscovery(new EmptyServiceDiscovery());
boot.addModule(metaModule);
boot.boot();
TSGenerator generator = new TSGenerator(outputDir, metaModule.getLookup(), config);
try {
generator.run();
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
Aggregations