mirror of
https://github.com/atxp-dev/cli.git
synced 2026-09-14 20:46:39 +08:00
57d88541ba
Core Features Updated template repository from atxp-express-example to atxp-express-starter Added Framework type for type safety and extensibility Changed createProject to require app name as first parameter (eliminates interactive prompt) Added command line argument support for framework selection (--framework) Added smart git initialization with --git and --no-git flags Fixed help flag handling to show help instead of running commands Wrapper Package Updates Updated create-atxp wrapper to support new API Fixed argument passing from npm create atxp to underlying atxp create command
24 lines
585 B
JavaScript
Executable File
24 lines
585 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
import { spawn } from 'child_process';
|
|
|
|
// Get arguments passed to create-atxp (excluding node and script name)
|
|
const args = process.argv.slice(2);
|
|
|
|
// Build the command: npx atxp create <args>
|
|
const atxpArgs = ['atxp', 'create', ...args];
|
|
|
|
// Call the atxp package with create command and pass through all arguments
|
|
const atxp = spawn('npx', atxpArgs, {
|
|
stdio: 'inherit',
|
|
cwd: process.cwd()
|
|
});
|
|
|
|
atxp.on('close', (code) => {
|
|
process.exit(code);
|
|
});
|
|
|
|
atxp.on('error', (error) => {
|
|
console.error('Failed to run atxp:', error.message);
|
|
process.exit(1);
|
|
}); |