class JsDirectoryCompiler implements CompilerInterface
Used to copy JS files from a package directory to the assets' directory.
Without concatenating them. Primarily used for lazy loading JS modules.
Traits
Properties
| protected callable[] | $sourcesCallbacks | from HasSources |
|
Methods
No description
Remove manifest revisions for chunks under this source's destination that no longer exist (an extension was disabled, or a chunk was removed or renamed). The in-place rebuild ({[\Flarum\Frontend\RecompileFrontendAssets::recompile}) deliberately](../../../Flarum/Frontend/RecompileFrontendAssets.html) deletes nothing up front, so gone-away chunks must be pruned here, after the surviving set has been (re)established. The chunk files themselves are left on disk: a client on an older page can still lazy-load the chunk it references instead of hitting a 404.
No description
Details
in HasSources
at
line 25
void
addSources(callable $callback)
in HasSources
at
line 33
protected array
getSources()
at
line 80
protected array
allowedSourceTypes()
at
line 28
__construct(Cloud $assetsDir, string $destinationPath, VersionerInterface $versioner)
at
line 35
string|null
getFilename()
at
line 40
void
setFilename(string $filename)
at
line 45
void
commit(bool $force = false)
at
line 53
string|null
getUrl()
at
line 69
void
flush()
at
line 85
protected void
compileSource(DirectorySource $source, bool $force = false)
at
line 109
protected void
pruneStaleRevisions(DirectorySource $source, array $live)
Remove manifest revisions for chunks under this source's destination that no longer exist (an extension was disabled, or a chunk was removed or renamed). The in-place rebuild ({[\Flarum\Frontend\RecompileFrontendAssets::recompile}) deliberately](../../../Flarum/Frontend/RecompileFrontendAssets.html) deletes nothing up front, so gone-away chunks must be pruned here, after the surviving set has been (re)established. The chunk files themselves are left on disk: a client on an older page can still lazy-load the chunk it references instead of hitting a 404.