46 $this->includeDirs =
array();
51 $this->includeDirs[] = $directory;
64 static $format = <<<
'EOF' 69 options = { :load_path => [],
70 :source_files => [%
s],
71 :expand_paths =>
false }
73 %ssecretary = Sprockets::Secretary.new(options)
74 secretary.install_assets
if options[:asset_root]
75 print secretary.concatenation
81 foreach ($this->includeDirs as $directory) {
82 $more .=
'options[:load_path] << '.var_export($directory,
true).
"\n";
85 if (null !== $this->assetRoot) {
86 $more .=
'options[:asset_root] = '.var_export($this->assetRoot,
true).
"\n";
94 file_put_contents($tmpAsset, $asset->
getContent());
97 file_put_contents($input, sprintf($format,
99 ? sprintf(
'File.join(%s, \'sprockets\')', var_export($this->sprocketsLib,
true))
102 var_export($tmpAsset,
true),
111 $proc = $pb->getProcess();
112 $code = $proc->run();
135 static $format = <<<
'EOF' 140 def pathname_for_relative_require_from(source_line)
141 Sprockets::Pathname.new(@environment, File.join(%s, location_from(source_line)))
148 if ($dir = $asset->getSourceDirectory()) {
149 return sprintf($format, var_export($dir,
true));
static createTemporaryFile($prefix)
Creates a temporary file.
static fromProcess(Process $proc)
getHack(AssetInterface $asset)
filterLoad(AssetInterface $asset)
Hack around a bit, get the job done.
createProcessBuilder(array $arguments=array())
Creates a new process builder.
getContent()
Returns the loaded content of the current asset.
filterDump(AssetInterface $asset)
Filters an asset just before it's dumped.
addIncludeDir($directory)
An asset has a mutable URL and content and can be loaded and dumped.
Create styles array
The data for the language used.
The asset factory creates asset objects.
Runs assets through Sprockets.
An external process based filter which provides a way to set a timeout on the process.
__construct($sprocketsLib=null, $rubyBin='/usr/bin/ruby')
Constructor.
getChildren(AssetFactory $factory, $content, $loadPath=null)
Returns child assets.
setContent($content)
Sets the content of the current asset.
const EOF
How fgetc() reports an End Of File.