3 var path = require('path');
4 var mkdirp = require('mkdirp');
6 function getSourceMapUrl() {
7 if (!process.env.BUILD_URL) return;
9 return process.env.BUILD_URL + 'artifact/output';
12 function getSourceMapOptions(mapsSubDir) {
13 var sourceMapUrl = getSourceMapUrl();
19 var suffix = mapsSubDir ? mapsSubDir + '/' : '';
21 mkdirp.sync('output/maps/' + suffix);
24 dest: path.relative('./output/assets/js/' + suffix + '/', './output/maps/' + suffix + '/'),
26 sourceRoot: path.relative('./output/maps/' + suffix, './output/assets/js/' + suffix),
27 sourceMappingURLPrefix: sourceMapUrl
32 module.exports = getSourceMapOptions;