Skip to content

Commit

Permalink
fix(buildfile): fix buildFile ; imperative false check on write
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Feb 22, 2023
1 parent c4a3839 commit 9dc785c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/buildFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ function buildFile(file = {}, platform = {}, dictionary = {}) {
let fullDestination = destination
const id = `${file?.format || ''}-${Date.now()}`

if (typeof destination === 'string' && platform.write) {
// if there is a build path, prepend the full destination with it
if (platform.buildPath)
fullDestination = platform.buildPath + fullDestination
// if there is a build path, prepend the full destination with it
if (typeof destination === 'string' && platform.buildPath)
fullDestination = platform.buildPath + fullDestination

if (fullDestination && platform.write !== false) {
const dirname = path.dirname(fullDestination)
if (!fs.existsSync(dirname))
fs.mkdirSync(dirname, { recursive: true })
Expand Down

0 comments on commit 9dc785c

Please sign in to comment.