68 static $format = <<<
'EOF' 69 var stylus = require(
'stylus');
70 var sys = require(process.binding(
'natives').util ?
'util' :
'sys');
72 stylus(%
s, %
s)%
s.render(
function(
e, css){
84 $parserOptions =
array();
86 $parserOptions[
'paths'] =
array($dir);
87 $parserOptions[
'filename'] = basename($asset->
getSourcePath());
90 if (null !== $this->compress) {
97 file_put_contents($input, sprintf($format,
99 json_encode($parserOptions),
100 $this->useNib ?
'.use(require(\'nib\')())' :
'' 103 $proc = $pb->getProcess();
104 $code = $proc->run();
static createTemporaryFile($prefix)
Creates a temporary file.
static fromProcess(Process $proc)
setCompress($compress)
Enable output compression.
getSourcePath()
Returns the relative path for the source asset.
filterLoad(AssetInterface $asset)
{Filters an asset after it has been loaded.An asset}
setNodePaths(array $nodePaths)
filterDump(AssetInterface $asset)
{Filters an asset just before it's dumped.An asset}
createProcessBuilder(array $arguments=array())
setUseNib($useNib)
Enable the use of Nib.
getContent()
Returns the loaded content of the current asset.
getChildren(AssetFactory $factory, $content, $loadPath=null)
Returns child assets.
getSourceDirectory()
Returns the asset's source directory.
An asset has a mutable URL and content and can be loaded and dumped.
Create styles array
The data for the language used.
__construct($nodeBin='/usr/bin/node', array $nodePaths=array())
Constructs filter.
The asset factory creates asset objects.
setContent($content)
Sets the content of the current asset.
const EOF
How fgetc() reports an End Of File.