Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101810561
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
Thu, Feb 13, 23:03
Size
671 B
Mime Type
text/x-c++
Expires
Sat, Feb 15, 23:03 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24228220
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