Executes Sass for a particular fileset.
If the sass executable is not available, but scssphp is, then use that instead.
category |
Tasks |
---|---|
package |
phing.tasks.ext |
author |
Paul Stuart pstuart2@gmail.com |
author |
Ken Guest kguest@php.net |
license |
LGPL (see http://www.gnu.org/licenses/lgpl.html) |
version | Release: $Id: eb75e99660cf6fe49f68fe568e00aca4a193e31a $ |
link |
SassTask.php |
buildOutputFilePath() : string
access |
protected |
---|---|
string
compile(string $fullFilePath, string $outputFile, boolean $lUseScssphp) : void
string
Fully qualified filename to compile.
string
Filename for generated css.
boolean
Whether to use scssphp compiler.
createFileSet() : \FileSet
executeCommand(string $inputFile, string $outputFile) : array
access |
protected |
---|---|
throws |
string
Input file
string
Output file
array
array(return code, array with output)
getCheck() : boolean
boolean
getCompact() : boolean
see | \setCompact |
---|---|
boolean
getCompressed() : boolean
see | \setCompressed |
---|---|
boolean
getCrunched() : boolean
see | \setCrunched |
---|---|
boolean
getDescription() : string
string
The text description of the task
getEncoding() : string
string
getExecutable() : string
string
getExpand() : boolean
see | \setExpand |
---|---|
boolean
getExtfilter() : string
string
getFlags() : string
string
getForce() : boolean
boolean
getKeepsubdirectories() : boolean
boolean
getLineNumbers() : boolean
boolean
getLocation() : \Location
getNested() : boolean
see | \setNested |
---|---|
boolean
getNewCompiler() : \Leafo\ScssPhp\Compiler
\Leafo\ScssPhp\Compiler
getNewext() : string
string
getNoCache() : boolean
boolean
getOutputpath() : string
string
getOwningTarget() : \Target
getPath() : string
string
getProject() : \Project
getRegisterSlot(string $slotName) : \RegisterSlot
getRemoveoldext() : boolean
boolean
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getStyle() : string
string
getTaskName() : string
string
Name of this task
getTaskType() : string
string
The type of this task (XML Tag)
getTrace() : boolean
boolean
getUnixnewlines() : boolean
boolean
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws | |
---|---|
initialiseScssphp() : \Leafo\ScssPhp\Compiler
\Leafo\ScssPhp\Compiler
loadScssphp() : boolean
boolean
log(string $msg, integer $level = \Project::MSG_INFO) : void
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
perform()
throws | |
---|---|
processFile(boolean $useScssphp) : void
If output file is not specified, but outputpath is, place output in that directory. If neither is specified, place .css file in the directory that the input file is in.
boolean
Whether to use the scssphp compiler.
processFilesets(boolean $useScssphp) : void
boolean
Whether to use the scssphp compiler.
setCheck(string $value) : void
string
Jenkins style boolean value
setCompact(string $value) : void
string
Jenkins style boolean value
setCompressed(string $value) : void
string
Jenkins style boolean value
setCrunched(string $value) : void
string
Jenkins style boolean value
setDescription(string $desc)
string
The text describing the task
setEncoding(string $encoding) : void
string
Default encoding to use.
setExecutable(string $executable) : void
The default assumes sass is in your path. If not you can provide the full path to sass.
access |
public |
---|
string
Name/path of sass executable
setExpand(string $value) : void
string
Jenkins style boolean value
setExtfilter(string $extfilter) : void
This will filter the fileset to only process files that match this extension. This could also be done with the fileset.
access |
public |
---|
string
Extension to filter for.
setFailonerror(string $failonerror) : void
access |
public |
---|
string
Jenkins style boolean value
setFile(string $file) : void
string
Single filename to compile.
setFlags(string $flags) : void
Command will be: sass {$flags} {$inputfile} {$outputfile}
access |
public |
---|
string
List of flags accepted by sass.
setForce(string $value) : void
string
Jenkins style boolean value
setInput(string $file) : void
Synonym for @see setFile
string
Filename
setKeepsubdirectories(boolean $keepsubdirectories) : void
When set to true we will keep the directory structure. So any input files in subdirectories will have their output file in that same sub-directory. If false, all output files will be put in the path defined by outputpath or in the directory top directory of the fileset.
access |
public |
---|
boolean
Jenkins style boolean
setLineNumbers(string $lineNumbers) : void
string
Jenkins style boolean value
setLocation(\Location $location)
setNested(string $value) : void
string
Jenkins style boolean value
setNewext(string $newext) : void
This is the extension we will add on to the output file regardless of if we remove the old one or not.
access |
public |
---|
string
New extension to use, e.g. css
setNoCache(string $value) : void
string
Jenkins style boolean value
setOutput(string $file) : void
string
Filename of [css] to output.
setOutputpath(string $outputpath) : void
This will force the output path to be something other than the path of the fileset used.
access |
public |
---|
string
Path name
setOwningTarget(\Target $target)
setPath(string $path) : void
string
Import path.
setProject(\Project $project) : void
setRemoveoldext(string $removeoldext) : void
This will cause us to strip the existing extension off the output file.
access |
public |
---|
string
Jenkins style boolean value
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setStyle(mixed $style) : void
mixed
Style.
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
setTrace(string $trace) : void
IE: Whether to output a stack trace on error.
string
Jenkins style boolean value
setUnixnewlines(string $newlines) : void
string
Jenkins style boolean value
setUseSass(string $value) : void
setUseScssphp(string $value) : void
style : string
var |
---|
string
trace : boolean
var |
---|
boolean
unixnewlines : boolean
var |
---|
boolean
encoding : string
var |
---|
string
loadPath : string
var |
---|
string
check : boolean
var |
---|
boolean
useSass : boolean
var |
---|
boolean
useScssphp : boolean
var |
---|
boolean
file : string|null
var |
---|
string|null
output : string|null
var |
---|
string|null
scssCompiler : object
var |
---|
object
pathInfo : array
var |
---|
array
executable : string
var |
---|
string
extfilter : string
More than likely should be "scss" or "sass".
var |
---|
string
failonerror : boolean
var |
---|
boolean
filesets : array
var |
---|
array
flags : string
var |
---|
string
keepsubdirectories : boolean
var |
---|
boolean
removeoldext : boolean
var |
---|
boolean
newext : string
var |
---|
string
outputpath : string
If not defined they will be created in the same directory the input is from.
var |
---|
string
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project