Skip to content

Commit

Permalink
[CodeFactor] Apply fixes to commit 486f29f
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
code-factor committed Oct 28, 2024
1 parent 486f29f commit baf0475
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';

import path from 'path';
import { fileURLToPath } from 'url';
import { exec } from 'child_process';
import fs from 'fs-extra';
import { promisify } from 'util';

process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';

const execPromise = promisify(exec);
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -25,7 +25,7 @@ async function build() {
// Validate source and target directories
await fs.ensureDir(sourceDir);
await fs.ensureDir(targetDir);

// Clean previous build
console.log('Cleaning...');
await execPromise('npm run clean');
Expand Down

0 comments on commit baf0475

Please sign in to comment.