File tree Expand file tree Collapse file tree 7 files changed +23
-9
lines changed
packages/eslint-plugin-react-hooks Expand file tree Collapse file tree 7 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- import { exec } from 'node:child_process' ;
3+ import { execSync } from 'node:child_process' ;
44import { dirname , resolve } from 'node:path' ;
55import { fileURLToPath } from 'node:url' ;
66
77const __filename = fileURLToPath ( import . meta. url ) ;
88const __dirname = dirname ( __filename ) ;
99
10- exec ( 'yarn build -r stable eslint-plugin-react-hooks' , {
10+ execSync ( 'yarn build -r stable eslint-plugin-react-hooks' , {
1111 cwd : resolve ( __dirname , '..' , '..' ) ,
12+ stdio : 'inherit' ,
1213} ) ;
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- import { exec } from 'node:child_process' ;
3+ import { execSync } from 'node:child_process' ;
44import { dirname , resolve } from 'node:path' ;
55import { fileURLToPath } from 'node:url' ;
66
77const __filename = fileURLToPath ( import . meta. url ) ;
88const __dirname = dirname ( __filename ) ;
99
10- exec ( 'yarn build -r stable eslint-plugin-react-hooks' , {
10+ execSync ( 'yarn build -r stable eslint-plugin-react-hooks' , {
1111 cwd : resolve ( __dirname , '..' , '..' ) ,
12+ stdio : 'inherit' ,
1213} ) ;
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- import { exec } from 'node:child_process' ;
3+ import { execSync } from 'node:child_process' ;
44import { dirname , resolve } from 'node:path' ;
55import { fileURLToPath } from 'node:url' ;
66
77const __filename = fileURLToPath ( import . meta. url ) ;
88const __dirname = dirname ( __filename ) ;
99
10- exec ( 'yarn build -r stable eslint-plugin-react-hooks' , {
10+ execSync ( 'yarn build -r stable eslint-plugin-react-hooks' , {
1111 cwd : resolve ( __dirname , '..' , '..' ) ,
12+ stdio : 'inherit' ,
1213} ) ;
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- import { exec } from 'node:child_process' ;
3+ import { execSync } from 'node:child_process' ;
44import { dirname , resolve } from 'node:path' ;
55import { fileURLToPath } from 'node:url' ;
66
77const __filename = fileURLToPath ( import . meta. url ) ;
88const __dirname = dirname ( __filename ) ;
99
10- exec ( 'yarn build -r stable eslint-plugin-react-hooks' , {
10+ execSync ( 'yarn build -r stable eslint-plugin-react-hooks' , {
1111 cwd : resolve ( __dirname , '..' , '..' ) ,
12+ stdio : 'inherit' ,
1213} ) ;
Original file line number Diff line number Diff line change 2121 " react"
2222 ],
2323 "scripts" : {
24- "dependencies" : " cd ../../compiler/packages/babel-plugin-react-compiler && yarn && yarn tsc -b" ,
2524 "test" : " jest" ,
2625 "typecheck" : " tsc --noEmit"
2726 },
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const stripBanner = require('rollup-plugin-strip-banner');
1212const chalk = require ( 'chalk' ) ;
1313const resolve = require ( '@rollup/plugin-node-resolve' ) . nodeResolve ;
1414const fs = require ( 'fs' ) ;
15+ const childProcess = require ( 'child_process' ) ;
1516const argv = require ( 'minimist' ) ( process . argv . slice ( 2 ) ) ;
1617const Modules = require ( './modules' ) ;
1718const Bundles = require ( './bundles' ) ;
@@ -829,6 +830,11 @@ function handleRollupError(error) {
829830 }
830831}
831832
833+ function runShellCommand ( command ) {
834+ console . log ( chalk . dim ( 'Running: ' ) + chalk . cyan ( command ) ) ;
835+ childProcess . execSync ( command , { stdio : 'inherit' , shell : true } ) ;
836+ }
837+
832838async function buildEverything ( ) {
833839 if ( ! argv [ 'unsafe-partial' ] ) {
834840 await asyncRimRaf ( 'build' ) ;
@@ -876,6 +882,9 @@ async function buildEverything() {
876882
877883 // eslint-disable-next-line no-for-of-loops/no-for-of-loops
878884 for ( const [ bundle , bundleType ] of bundles ) {
885+ if ( bundle . prebuild ) {
886+ runShellCommand ( bundle . prebuild ) ;
887+ }
879888 await createBundle ( bundle , bundleType ) ;
880889 }
881890
Original file line number Diff line number Diff line change @@ -1197,6 +1197,8 @@ const bundles = [
11971197 wrapWithModuleBoundaries : false ,
11981198 externals : [ ] ,
11991199 tsconfig : './packages/eslint-plugin-react-hooks/tsconfig.json' ,
1200+ prebuild :
1201+ 'cd compiler/packages/babel-plugin-react-compiler && yarn && yarn tsc -b' ,
12001202 } ,
12011203
12021204 /******* React Fresh *******/
You can’t perform that action at this time.
0 commit comments