mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Use path.join instead of manually creating paths
This commit is contained in:
@@ -19,7 +19,7 @@ module.exports = function () {
|
||||
path.join(CONFIG.repositoryRootPath, 'src'),
|
||||
path.join(CONFIG.repositoryRootPath, 'vendor')
|
||||
]
|
||||
srcPaths.concat(glob.sync(path.join(CONFIG.repositoryRootPath, 'spec', '*.*'), {ignore: '**/*-spec.*'}))
|
||||
srcPaths.concat(glob.sync(path.join(CONFIG.repositoryRootPath, 'spec', '*.*'), {ignore: path.join('**', '*-spec.*')}))
|
||||
for (let srcPath of srcPaths) {
|
||||
fs.copySync(srcPath, computeDestinationPath(srcPath))
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ function transpileBabelPaths () {
|
||||
|
||||
function getPathsToTranspile () {
|
||||
let paths = []
|
||||
paths = paths.concat(glob.sync(`${CONFIG.electronAppPath}/src/**/*.js`))
|
||||
paths = paths.concat(glob.sync(path.join(CONFIG.electronAppPath, 'src', '**', '*.js')))
|
||||
for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) {
|
||||
paths = paths.concat(glob.sync(`${CONFIG.electronAppPath}/node_modules/${packageName}/**/*.js`))
|
||||
paths = paths.concat(glob.sync(path.join(CONFIG.electronAppPath, 'node_modules', packageName, '**', '*.js')))
|
||||
}
|
||||
return paths
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
const coffee = require('coffee-script')
|
||||
const fs = require('fs')
|
||||
const glob = require('glob')
|
||||
const mkdirp = require('mkdirp')
|
||||
const path = require('path')
|
||||
|
||||
const CONFIG = require('../config')
|
||||
@@ -21,11 +20,11 @@ function transpileCoffeeScriptPaths () {
|
||||
|
||||
function getPathsToTranspile () {
|
||||
let paths = []
|
||||
paths = paths.concat(glob.sync(`${CONFIG.electronAppPath}/src/**/*.coffee`))
|
||||
paths = paths.concat(glob.sync(`${CONFIG.electronAppPath}/spec/*.coffee`, {ignore: '**/*-spec.coffee'}))
|
||||
paths = paths.concat(glob.sync(`${CONFIG.electronAppPath}/exports/**/*.coffee`))
|
||||
paths = paths.concat(glob.sync(path.join(CONFIG.electronAppPath, 'src', '**', '*.coffee')))
|
||||
paths = paths.concat(glob.sync(path.join(CONFIG.electronAppPath, 'spec', '*.coffee')))
|
||||
paths = paths.concat(glob.sync(path.join(CONFIG.electronAppPath, 'exports', '**', '*.coffee')))
|
||||
for (let packageName of Object.keys(CONFIG.appMetadata.packageDependencies)) {
|
||||
paths = paths.concat(glob.sync(`${CONFIG.electronAppPath}/node_modules/${packageName}/**/*.coffee`))
|
||||
paths = paths.concat(glob.sync(path.join(CONFIG.electronAppPath, 'node_modules', packageName, '**', '*.coffee')))
|
||||
}
|
||||
return paths
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user