diff --git a/build/lib/compute-destination-path.js b/build/lib/compute-destination-path.js deleted file mode 100644 index d79b01198..000000000 --- a/build/lib/compute-destination-path.js +++ /dev/null @@ -1,13 +0,0 @@ -// Takes an absolute path, relativizes it based on the repository root, then -// makes it absolute again in the output app path. - -'use strict' - -const path = require('path') -const CONFIG = require('../config') - -module.exports = -function computeDestinationPath (srcPath) { - let relativePath = path.relative(CONFIG.repositoryRootPath, srcPath) - return path.join(CONFIG.electronAppPath, relativePath) -} diff --git a/build/lib/copy-assets.js b/build/lib/copy-assets.js index 79c401064..a62c52e74 100644 --- a/build/lib/copy-assets.js +++ b/build/lib/copy-assets.js @@ -5,7 +5,6 @@ const path = require('path') const fs = require('fs-extra') -const computeDestinationPath = require('./compute-destination-path') const CONFIG = require('../config') const glob = require('glob') @@ -26,3 +25,8 @@ module.exports = function () { fs.copySync(srcPath, computeDestinationPath(srcPath)) } } + +function computeDestinationPath (srcPath) { + let relativePath = path.relative(CONFIG.repositoryRootPath, srcPath) + return path.join(CONFIG.electronAppPath, relativePath) +}