UNPKG

@gravityforms/gulp-tasks

Version:
27 lines (21 loc) 896 B
#!/usr/bin/env node import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { execShellCommand } from './util.js'; const __dirname = path.dirname( fileURLToPath( import.meta.url ) ); const packagesDir = path.resolve( __dirname, '../../../' ); const storybooksPath = path.join( packagesDir, 'storybooks' ); async function init() { await execShellCommand( `cd "${ storybooksPath }" && npm run export:components`, true ); await execShellCommand( 'node ./src/scripts/libraries-dist.js', true ); await execShellCommand( 'node ./src/scripts/react-utils-dist.js', true ); await execShellCommand( 'node ./src/scripts/utils-dist.js', true ); await execShellCommand( 'node ./src/scripts/components-dist.js', true ); } ( async () => { try { await init(); } catch ( err ) { console.error( 'An error occurred while generating all package dist files: ', err ); } } )();