Inline computeDestinationPath into copyAssets

...as we don't need that function to be reusable anymore. We can always extract it later if needed.
This commit is contained in:
Antonio Scandurra
2016-07-27 16:58:30 +02:00
parent 59d995b21d
commit 2232f61c97
2 changed files with 5 additions and 14 deletions

View File

@@ -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)
}

View File

@@ -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)
}