mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
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:
@@ -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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user