Skip to content

Commit

Permalink
Refactor expo-setup script to use promisified exec for adding Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ProchaLu committed Jan 24, 2025
1 parent f9a3a41 commit f8cdd74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/expo-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
// - https://archive.ph/MG03E
//
// TODO: Remove when Expo enables New Architecture and new Metro resolver by default
import { execSync } from 'node:child_process';
import { exec } from 'node:child_process';
import { readFile, unlink, writeFile } from 'node:fs/promises';
import { promisify } from 'node:util';
import isPlainObject from 'is-plain-obj';

execSync('pnpm add --save-dev prettier', { stdio: 'inherit' });
await promisify(exec)('pnpm add --save-dev prettier');

const { format } = await import('prettier');

Expand Down Expand Up @@ -75,7 +76,6 @@ easJson.build.development.extends = 'base';
easJson.build.development.env = {
NODE_ENV: 'development',
};

easJson.build.preview.extends = 'base';
easJson.build.production.extends = 'base';

Expand Down

0 comments on commit f8cdd74

Please sign in to comment.