Skip to content

Commit

Permalink
Merge branch 'change-build-type' of https://github.com/react-schedule…
Browse files Browse the repository at this point in the history
…r/react-big-schedule into change-build-type
  • Loading branch information
Ansul Agrawal committed Oct 28, 2024
2 parents 288c4f8 + baf0475 commit 2f6cd5d
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 2f6cd5d

Please sign in to comment.