MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Translate

Method Translate

src/main/java/fieldnashorn/babel/Translate.java:42–57  ·  view source on GitHub ↗
(String congifurationDirectory)

Source from the content-addressed store, hash-verified

40 boolean first = false;
41
42 public Translate(String congifurationDirectory) throws IOException, InterruptedException {
43 File error = File.createTempFile("field", ".error");
44 error.deleteOnExit();
45
46 this.congifurationDirectory = congifurationDirectory;
47 new File(congifurationDirectory).mkdirs();
48 int success = new ProcessBuilder().directory(new File(congifurationDirectory)).command("npm install --save babel-plugin-transform-regenerator".split(" "))
49 .redirectError(error)
50 .start()
51 .waitFor();
52
53 if (success != 0) {
54 throw new IOException("Failed to install babel: command 'npm install --save babel-plugin-transform-regenerator' failed with message :" + new String(Files.readAllBytes(error.toPath())));
55 }
56 first = true;
57 }
58
59 static public String preamble;
60

Callers

nothing calls this directly

Calls 2

startMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected