public Future<Map<String, List<File>>> sync() { return executor.submit(() -> compiler.build("dev", workdir.toFile())); }
private void onChange(final Kind<?> kind, final Path path) { File outputdir = workdir.toFile(); String filename = Route .normalize(Try.apply(() -> path.subpath(1, path.getNameCount()).toString()) .orElse(path.toString())); try { if (kind == StandardWatchEventKinds.ENTRY_DELETE) { errors.remove(filename); } else { if (Files.isDirectory(path)) { errors.clear(); compiler.build("dev", outputdir); } else { compiler.buildOne(filename, outputdir); errors.remove(filename); } } } catch (AssetException ex) { String localname = ex.getProblems().stream() .findFirst() .map(AssetProblem::getFilename) .orElse(filename); errors.put(localname, rewrite(ex)); } catch (Exception ex) { AssetException assetEx = rewrite(new AssetException("compiler", new AssetProblem(filename, -1, -1, ex.getMessage(), null), ex)); errors.put(filename, assetEx); } }
Map<String, List<File>> fileset = compiler.build(env, output); pb.get().stop();
private void onChange(final Kind<?> kind, final Path path) { File outputdir = workdir.toFile(); String filename = Route .normalize(Try.apply(() -> path.subpath(1, path.getNameCount()).toString()) .orElse(path.toString())); try { if (kind == StandardWatchEventKinds.ENTRY_DELETE) { errors.remove(filename); } else { if (Files.isDirectory(path)) { errors.clear(); compiler.build("dev", outputdir); } else { compiler.buildOne(filename, outputdir); errors.remove(filename); } } } catch (AssetException ex) { String localname = ex.getProblems().stream() .findFirst() .map(AssetProblem::getFilename) .orElse(filename); errors.put(localname, rewrite(ex)); } catch (Exception ex) { AssetException assetEx = rewrite(new AssetException("compiler", new AssetProblem(filename, -1, -1, ex.getMessage(), null), ex)); errors.put(filename, assetEx); } }
Map<String, List<File>> fileset = compiler.build(env, output); pb.get().stop(); StringBuilder dist = new StringBuilder();
public Future<Map<String, List<File>>> sync() { return executor.submit(() -> compiler.build("dev", workdir.toFile())); }