Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121740683
PublicPathRuntimeModule.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 13, 12:34
Size
671 B
Mime Type
text/x-c++
Expires
Tue, Jul 15, 12:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27360224
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
PublicPathRuntimeModule.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict"
;
const
RuntimeGlobals
=
require
(
"../RuntimeGlobals"
);
const
RuntimeModule
=
require
(
"../RuntimeModule"
);
class
PublicPathRuntimeModule
extends
RuntimeModule
{
constructor
()
{
super
(
"publicPath"
,
RuntimeModule
.
STAGE_BASIC
);
}
/**
* @returns {string} runtime code
*/
generate
()
{
const
{
compilation
}
=
this
;
const
{
publicPath
}
=
compilation
.
outputOptions
;
return
`
$
{
RuntimeGlobals
.
publicPath
}
=
$
{
JSON
.
stringify
(
this
.
compilation
.
getPath
(
publicPath
||
""
,
{
hash
:
this
.
compilation
.
hash
||
"XXXX"
})
)};
`
;
}
}
module
.
exports
=
PublicPathRuntimeModule
;
Event Timeline
Log In to Comment