All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fgiannesini.libsass.gradle.plugin.tasks.CompileLibSassTaskDelegate Maven / Gradle / Ivy

There is a newer version: 1.4
Show newest version
package com.github.fgiannesini.libsass.gradle.plugin.tasks;

import org.gradle.api.Project;
import org.gradle.api.logging.Logger;

import com.github.fgiannesini.libsass.gradle.plugin.compiler.LibSassCompiler;
import com.github.fgiannesini.libsass.gradle.plugin.extension.PluginMode;
import com.github.fgiannesini.libsass.gradle.plugin.extension.PluginParametersProvider;

import io.bit3.jsass.CompilationException;

/**
 * Delegate to initialisation and call to libsass library
 *
 */
public class CompileLibSassTaskDelegate {

    /**
     * Lib sass compiler
     */
    private final LibSassCompiler libSassCompiler;

    public CompileLibSassTaskDelegate(final Project project,
            final Logger logger, final PluginMode pluginMode) {
        final PluginParametersProvider parametersProvider = new PluginParametersProvider(
                project, pluginMode);

        this.libSassCompiler = new LibSassCompiler(logger, parametersProvider);
    }

    /**
     * Launche libsass compilation
     *
     * @throws CompilationException
     */
    public void compile() throws CompilationException {
        this.libSassCompiler.compileFile();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy