Package com.github.sommeri.less4j

Examples of com.github.sommeri.less4j.LessCompiler$CompilationResult


    validator.validateSourceMap(compilationResult, new File(NO_DATA_AVAILABLE_MAPDATA));
  }

  @Test
  public void stringWithSourceMap() throws Less4jException {
    LessCompiler compiler = new DefaultLessCompiler();
    Configuration options = new Configuration();
    options.getSourceMapConfiguration().setInline(true);
    CompilationResult compilationResult = compiler.compile(NO_IMPORT_LESS_INPUT, options);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertInlineSourceMap(compilationResult);
   
View Full Code Here


  @Test
  public void stringWithConfiguration() throws Less4jException {
    Configuration configuration = new Configuration();
    configuration.setCssResultLocation(FAKE_CSS_RESULT_FILE);
   
    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(NO_IMPORT_LESS_INPUT, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), FAKE_CSS_RESULT_LINKED_MAP);
View Full Code Here

  @Test
  public void stringWithURLConfiguration() throws Less4jException {
    Configuration configuration = new Configuration();
    configuration.setCssResultLocation(new LessSource.URLSource(FAKE_URL_RESULT_URL));
   
    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(NO_IMPORT_LESS_INPUT, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), FAKE_URL_RESULT_LINKED_MAP);
View Full Code Here

    validator.validateSourceMap(compilationResult, new File(FAKE_URL_DATA_AVAILABLE_MAPDATA));
  }
  @Test
  public void file() throws Less4jException {
    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), toFullMapSuffix());
   
View Full Code Here

    validator.validateSourceMap(compilationResult, new File(ONE_IMPORT_MAPDATA_GUESSED_CSS), URIUtils.changeSuffix(ONE_IMPORT_LESS_FILE, Constants.FULL_SOURCE_MAP_SUFFIX));
  }

  @Test
  public void fileWithEmptyConfiguration() throws Less4jException {
    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE, new Configuration());
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), toFullMapSuffix());
   
View Full Code Here

    validator.validateSourceMap(compilationResult, new File(ONE_IMPORT_MAPDATA_GUESSED_CSS), URIUtils.changeSuffix(ONE_IMPORT_LESS_FILE, Constants.CSS_SUFFIX));
  }

  @Test
  public void fileDoNotRelativize() throws Less4jException {
    LessCompiler compiler = new DefaultLessCompiler();
    Configuration configuration = new Configuration();
    configuration.getSourceMapConfiguration().setRelativizePaths(false);
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), toFullMapSuffix());
   
View Full Code Here

    validator.validateSourceMap(compilationResult, new File(ONE_IMPORT_MAPDATA_NO_RELATIVIZATION), URIUtils.changeSuffix(ONE_IMPORT_LESS_FILE, Constants.CSS_SUFFIX));
  }

  @Test
  public void fileIncludeLessFiles() throws Less4jException {
    LessCompiler compiler = new DefaultLessCompiler();
    Configuration configuration = new Configuration();
    configuration.getSourceMapConfiguration().setIncludeSourcesContent(true);
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), toFullMapSuffix());
   
View Full Code Here

    validator.validateSourceMap(compilationResult, new File(ONE_IMPORT_MAPDATA_WITH_LESS), URIUtils.changeSuffix(ONE_IMPORT_LESS_FILE, Constants.CSS_SUFFIX));
  }

  @Test
  public void fileSelfContained() throws Less4jException {
    LessCompiler compiler = new DefaultLessCompiler();
    Configuration configuration = new Configuration();
    configuration.getSourceMapConfiguration().setIncludeSourcesContent(true);
    configuration.getSourceMapConfiguration().setInline(true);
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertInlineSourceMap(compilationResult);
   
View Full Code Here

  @Test
  public void fileWithConfiguration() throws Less4jException {
    Configuration configuration = new Configuration();
    configuration.setCssResultLocation(new File(FAKE_CSS_RESULT_LOCATION));

    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), FAKE_CSS_RESULT_LINKED_MAP);
   
View Full Code Here

  @Test
  public void fileWithUrlConfiguration() throws Less4jException {
    Configuration configuration = new Configuration();
    configuration.setCssResultLocation(new LessSource.URLSource(FAKE_URL_RESULT_URL));

    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(ONE_IMPORT_LESS_FILE, configuration);
   
    assertNotNull(compilationResult.getCss());
    assertNotNull(compilationResult.getSourceMap());
    assertLinksSourceMap(compilationResult.getCss(), FAKE_URL_RESULT_LINKED_MAP);
   
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.LessCompiler$CompilationResult

Copyright © 2018 www.massapicom. 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.