NPM Scripts Assistant
Help me with NPM scripts: $ARGUMENTS
Task
I'll help you work with package.json scripts by:
- •Analyzing existing npm scripts in your project
- •Creating new scripts or modifying existing ones
- •Explaining what specific scripts do
- •Suggesting improvements or optimizations
- •Troubleshooting script execution issues
Process
I'll follow these steps:
- •Examine your package.json file to understand current scripts
- •Analyze dependencies and devDependencies for available tools
- •Identify common patterns and conventions in your scripts
- •Implement requested changes or create new scripts
- •Provide explanations of how the scripts work
- •Test scripts when possible to verify functionality
Common Script Types I Can Help With
- •Build processes (webpack, rollup, esbuild, etc.)
- •Development servers and hot reloading
- •Testing (unit, integration, e2e)
- •Linting and code formatting
- •Type checking
- •Deployment and CI/CD
- •Database migrations
- •Code generation
- •Environment setup
- •Pre/post hooks for git operations
Script Optimization Techniques
- •Parallelizing tasks for faster execution
- •Adding cross-platform compatibility
- •Improving error reporting and logging
- •Implementing watch modes for development
- •Creating composite scripts for common workflows
- •Adding appropriate exit codes for CI/CD pipelines
I'll adapt my approach based on your project's specific needs, dependencies, and build tools.