UNPKG

@compodoc/compodoc

Version:

The missing documentation tool for your Angular application

38 lines (30 loc) • 900 B
#!/usr/bin/env node const { spawn } = require('child_process'); const path = require('path'); console.log('šŸš€ Starting Template Playground...'); console.log(''); // Run the npm script const npmProcess = spawn('npm', ['run', 'start-playground'], { stdio: 'inherit', shell: true, cwd: path.join(__dirname, '..') }); npmProcess.on('error', (error) => { console.error('āŒ Failed to start Template Playground:', error.message); process.exit(1); }); npmProcess.on('close', (code) => { if (code !== 0) { console.error(`āŒ Template Playground exited with code ${code}`); process.exit(code); } }); // Handle graceful shutdown process.on('SIGINT', () => { console.log('\nšŸ›‘ Shutting down Template Playground...'); npmProcess.kill('SIGINT'); }); process.on('SIGTERM', () => { console.log('\nšŸ›‘ Shutting down Template Playground...'); npmProcess.kill('SIGTERM'); });