1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 18:17:13 +00:00
Lidarr/frontend/gulp/helpers/html-annotate-loader.js

16 lines
372 B
JavaScript
Raw Normal View History

2017-09-04 02:20:56 +00:00
const path = require('path');
const rootPath = path.resolve(__dirname + '/../../src/');
module.exports = function(source) {
if (this.cacheable) {
this.cacheable();
}
const resourcePath = this.resourcePath.replace(rootPath, '');
const wrappedSource =`
<!-- begin ${resourcePath} -->
${source}
<!-- end ${resourcePath} -->`;
return wrappedSource;
};