Examples of compile()


Examples of com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile()

            }
        }

        final String scriptCode = response.getContentAsString(scriptEncoding);
        final JavaScriptEngine javaScriptEngine = client.getJavaScriptEngine();
        final Script script = javaScriptEngine.compile(this, scriptCode, url.toExternalForm(), 1);
        if (script != null) {
            cache.cacheIfPossible(request, response, script);
        }

        return script;
View Full Code Here

Examples of com.github.jknack.handlebars.Handlebars.compile()

            Map<String, List<String>> context = new HashMap<String, List<String>>();
            context.put(PLUGIN_JS_RESOURCES_PARAM, app.getPluginsJsResources());
            context.put(PLUGIN_CSS_RESOURCES_PARAM, app.getPluginsCssResources());
            TemplateLoader templateLoader = new ServletContextTemplateLoader(request.getServletContext(), "/", ".hbs");
            Handlebars handlebars = new Handlebars(templateLoader);
            Template template = handlebars.compile("index");
            indexHtml = template.apply(context);
        }
        return indexHtml;
    }
}
View Full Code Here

Examples of com.github.mustachejava.DefaultMustacheFactory.compile()

    String description;
  }

  public static void main(String[] args) throws IOException {
    MustacheFactory mf = new DefaultMustacheFactory();
    Mustache mustache = mf.compile("template.mustache");
    mustache.execute(new PrintWriter(System.out), new Example()).flush();
  }
}
View Full Code Here

Examples of com.github.mustachejava.DeferringMustacheFactory.compile()

  }

  public static void main(String[] args) throws IOException {
    DeferringMustacheFactory mf = new DeferringMustacheFactory();
    mf.setExecutorService(Executors.newCachedThreadPool());
    Mustache m = mf.compile("deferring.mustache");
    PrintWriter pw = new PrintWriter(System.out);
    m.execute(pw, new DeferredExample()).close();
  }
}
View Full Code Here

Examples of com.github.mustachejava.MustacheFactory.compile()

        MustacheFactory mf = (MustacheFactory)properties.getProperty(CONFIG_PROPERTY);
       
        /*
         * the DefaultMustacheFactory caches the template once compiled
         */
        Mustache mustache = mf.compile(mustacheName);
       
        try {
           
            mustache.execute(response.getWriter(), attributes);
           
View Full Code Here

Examples of com.github.sommeri.less4j.LessCompiler.compile()

  @Override
  public InputStream open(String s, URLConnection resource) throws IOException {
    LessCompiler compiler = new ThreadUnsafeLessCompiler();
    try {
      LessCompiler.CompilationResult result = compiler.compile(resource.getURL());
      return new ByteArrayInputStream(result.getCss().getBytes());
    }
    catch (Less4jException e) {
      List<LessCompiler.Problem> errors = e.getErrors();
      ArrayList<Message> messages = new ArrayList<Message>(errors.size());
View Full Code Here

Examples of com.github.sommeri.less4j.core.DefaultLessCompiler.compile()

    File inputLessFile = createFile("src/sampleInput.less", ".class { margin: 1 1 1 1; }");

    File lessFile = new File("src/sampleInput.less").getAbsoluteFile();
   
    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(lessFile);

    System.out.println(compilationResult.getCss());
    System.out.println(compilationResult.getSourceMap());

    deleteFile(inputLessFile);
View Full Code Here

Examples of com.github.sommeri.less4j.core.ThreadUnsafeLessCompiler.compile()

            ThreadUnsafeLessCompiler compiler = new ThreadUnsafeLessCompiler();
            LessCompiler.Configuration configuration = new LessCompiler.Configuration();
            configuration.getSourceMapConfiguration().setLinkSourceMap(false);

            try {
                LessCompiler.CompilationResult result = compiler.compile(lessSource, configuration);
                List<LessCompiler.Problem> warnings = result.getWarnings();

                for (LessCompiler.Problem warning : warnings) {
                    LOG.warn("There is a warning during compilation of '{}' at line {}, character {}. Message: {}",
                             lessSource.getInputURL(), warning.getLine(), warning.getCharacter(), warning.getMessage());
View Full Code Here

Examples of com.google.errorprone.ErrorProneCompiler.compile()

    args.addAll(filesToCompile);

    ErrorProneCompiler compiler = new ErrorProneCompiler.Builder()
        .report(scanner)
        .build();
    Assert.assertThat(compiler.compile(args.toArray(new String[0])), is(Result.OK));
  }

  @Before
  public void setUp() throws IOException {
    writeFileToLocalDisk("A.java",
View Full Code Here

Examples of com.google.gwt.dev.js.ClosureJsRunner.compile()

      boolean splitBlocks, boolean sourceMapsEnabled) {

    boolean useClosureCompiler = options.isClosureCompilerEnabled();
    if (useClosureCompiler) {
      ClosureJsRunner runner = new ClosureJsRunner();
      runner.compile(jprogram, jsProgram, js, options.getOutput());
      return;
    }

    for (int i = 0; i < js.length; i++) {
      DefaultTextOutput out = new DefaultTextOutput(options.getOutput().shouldMinimize());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.