Search in sources :

Example 1 with TSWriter

use of io.crnk.gen.typescript.writer.TSWriter in project crnk-framework by crnk-project.

the class TSWriterTest method setup.

@Before
public void setup() {
    TSCodeStyle codeStyle = new TSCodeStyle();
    writer = new TSWriter(codeStyle);
}
Also used : TSCodeStyle(io.crnk.gen.typescript.writer.TSCodeStyle) TSWriter(io.crnk.gen.typescript.writer.TSWriter) Before(org.junit.Before)

Example 2 with TSWriter

use of io.crnk.gen.typescript.writer.TSWriter in project crnk-framework by crnk-project.

the class TSGenerator method writeSources.

protected void writeSources() throws IOException {
    for (TSSource fileSource : sources) {
        TSWriter writer = new TSWriter(config.getCodeStyle());
        fileSource.accept(writer);
        File file = getFile(fileSource);
        String source = writer.toString();
        write(file, source);
    }
}
Also used : TSSource(io.crnk.gen.typescript.model.TSSource) TSWriter(io.crnk.gen.typescript.writer.TSWriter) File(java.io.File)

Aggregations

TSWriter (io.crnk.gen.typescript.writer.TSWriter)2 TSSource (io.crnk.gen.typescript.model.TSSource)1 TSCodeStyle (io.crnk.gen.typescript.writer.TSCodeStyle)1 File (java.io.File)1 Before (org.junit.Before)1