chore: misc cleanup
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ function readDirAsync (dir) {
|
||||
}).reduce((a, b) => a.concat(b), [])
|
||||
}
|
||||
|
||||
function maybeReadFileContents (file) {
|
||||
function maybeReadFileContentsAsync (file) {
|
||||
return readFileAsync(file, 'utf-8')
|
||||
.catch(e => {
|
||||
if (e.code === 'ENOENT') {
|
||||
@@ -52,7 +52,7 @@ export default async function artifacts (compiler, next) {
|
||||
return map(compiler.files, async (file) => {
|
||||
const sourceFile = join(src, file.filename)
|
||||
const tempFile = join(temp, file.filename)
|
||||
const fileContents = await maybeReadFileContents(sourceFile)
|
||||
const fileContents = await maybeReadFileContentsAsync(sourceFile)
|
||||
|
||||
await mkdirpAsync(dirname(tempFile))
|
||||
await writeFileAsync(tempFile, fileContents)
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ export default async function cli (compiler, next) {
|
||||
if (e) {
|
||||
reject(e)
|
||||
} else {
|
||||
resolve(compiler.log.info('Executable written: ' + output))
|
||||
compiler.log.info('Executable written: ' + output, resolve)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user