Skip to content

Commit

Permalink
How long has THIS been broken?
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocelyn Badgley (Twipped) committed Jul 23, 2021
1 parent d50fd37 commit 48fc10d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const actions = {
},

async write ({ output, content, duplicate }) {
if (!content) {
throw new TypeError('Got an empty write?' + output);
}
output = resolve(output);
await fs.ensureDir(path.dirname(output));
await fs.writeFile(output, content);
Expand Down
2 changes: 1 addition & 1 deletion build/evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = exports = async function process (tasks, cache) {
}
if (taskLog && LOG[taskLog[0]]) log.info(...taskLog);

if (cache.isProd) {
if (cache.isProd && status.revPath) {
await fs.writeFile(resolve('dist', status.revPath), result);
}

Expand Down
2 changes: 1 addition & 1 deletion build/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ClientScript extends File {
let contents = await Promise.map(files, readFile);
contents = contents.join('\n\n');
if (prod) {
const { code, error } = minify(contents, { output: { comments: false } });
const { code, error } = await minify(contents, { output: { comments: false } });
if (error) throw new Error(error);
contents = code;
}
Expand Down

0 comments on commit 48fc10d

Please sign in to comment.