mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: move mkdirp to beforeBuild so it doesnt get called twice
This commit is contained in:
@@ -4,6 +4,8 @@ const os = require('os');
|
||||
const winston = require('winston');
|
||||
const nconf = require('nconf');
|
||||
const _ = require('lodash');
|
||||
const path = require('path');
|
||||
const mkdirp = require('mkdirp');
|
||||
|
||||
const cacheBuster = require('./cacheBuster');
|
||||
let meta;
|
||||
@@ -83,6 +85,7 @@ async function beforeBuild(targets) {
|
||||
await meta.themes.setupPaths();
|
||||
const plugins = require('../plugins');
|
||||
await plugins.prepareForBuild(targets);
|
||||
await mkdirp(path.join(__dirname, '../../build/public'));
|
||||
} catch (err) {
|
||||
winston.error('[build] Encountered error preparing for build\n' + err.stack);
|
||||
throw err;
|
||||
|
||||
@@ -336,7 +336,6 @@ JS.buildBundle = async function (target, fork) {
|
||||
client: 'nodebb.min.js',
|
||||
admin: 'acp.min.js',
|
||||
};
|
||||
await mkdirp(path.join(__dirname, '../../build/public'));
|
||||
await requirejsOptimize(target);
|
||||
const files = await getBundleScriptList(target);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user