Files
atom/build/lib/compute-destination-path.js
2016-07-22 16:34:02 -06:00

14 lines
400 B
JavaScript

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