Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120462660
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
Fri, Jul 4, 13:59
Size
671 B
Mime Type
text/x-c++
Expires
Sun, Jul 6, 13:59 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27192714
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