(pluginName: string, pluginOutputRoot: string)
| 19 | const aliases: {[src: string]: [string, string]} = {} |
| 20 | |
| 21 | const addPlugin = (pluginName: string, pluginOutputRoot: string) => { |
| 22 | const knownPaths = [ |
| 23 | ['scripts.js', 'text/javascript'], |
| 24 | ['styles.css', 'text/css'] |
| 25 | ]; |
| 26 | |
| 27 | for (const [filename, mimeType] of knownPaths) { |
| 28 | const pluginOutputFile = path.join(pluginOutputRoot, filename); |
| 29 | if (fs.existsSync(pluginOutputFile)) { |
| 30 | aliases[`/plugins/${pluginName}/${filename}`] = [pluginOutputFile, mimeType]; |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | addPlugin('grid_view', path.join(root, `grid_view/buildbot_grid_view/static/`)) |
| 36 | addPlugin('console_view', path.join(root, `console_view/buildbot_console_view/static/`)) |
no test coverage detected