UNPKG

@hyext/builder-zabin

Version:

builder of hyext

31 lines (26 loc) 759 B
function makeBuildResult (endpoints = {}, baseURI) { const extEndpoints = { viewer_web: 'web_video_com', viewer_web_popup: 'web_popup', viewer_pc: 'pc_panel', streamer_pc: 'pc_anchor_panel' } let result = {} Object.keys(endpoints) .filter(name => { const {entry = '', template = ''} = (endpoints[name] || {}) if (entry && template && extEndpoints[name]) { result[ extEndpoints[name] ] = { type: 'HTML', content: { pages: [ {path: `${name}.html`} ], baseURI } } } }) return result } module.exports = makeBuildResult