Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102300878
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
Wed, Feb 19, 06:59
Size
671 B
Mime Type
text/x-c++
Expires
Fri, Feb 21, 06:59 (2 d)
Engine
blob
Format
Raw Data
Handle
24326975
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