File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed 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' ) ;
@@ -812,6 +813,11 @@ function handleRollupError(error) {
812813 }
813814}
814815
816+ function runShellCommand ( command ) {
817+ console . log ( chalk . dim ( 'Running: ' ) + chalk . cyan ( command ) ) ;
818+ childProcess . execSync ( command , { stdio : 'inherit' , shell : true } ) ;
819+ }
820+
815821async function buildEverything ( ) {
816822 if ( ! argv [ 'unsafe-partial' ] ) {
817823 await asyncRimRaf ( 'build' ) ;
@@ -859,6 +865,9 @@ async function buildEverything() {
859865
860866 // eslint-disable-next-line no-for-of-loops/no-for-of-loops
861867 for ( const [ bundle , bundleType ] of bundles ) {
868+ if ( bundle . prebuild ) {
869+ runShellCommand ( bundle . prebuild ) ;
870+ }
862871 await createBundle ( bundle , bundleType ) ;
863872 }
864873
You can’t perform that action at this time.
0 commit comments