create-sps-project
v1.0.9
Published
CLI tool to create SPS Digital Tech template projects
Maintainers
Readme
SPS Digital CLI
A CLI tool to create SPS Digital Tech template projects or add components to existing projects.
Installation
npm install -g create-sps-projectUsage
Creating a new project:
create-sps-project my-project --token sps_your_tokenAdding a component to an existing project:
create-sps-project singleComponent --token sps_c_your_component_tokenor simply:
create-sps-project --token sps_c_your_component_tokenOptions
--token,-t- Purchase token (required)--dev,-d- Development mode, uses localhost:3000 instead of production URL
Project Structure
The CLI has been refactored to follow SOLID principles with a clear separation of concerns:
src/
├── cli/
│ ├── arg-parser.js # Command line argument parsing
│ └── project-creator.js # Orchestrates the project creation process
├── services/
│ ├── downloader.js # Handles HTTP requests and file downloads
│ └── template-installer.js # Handles template/component installation
├── utils/
│ ├── file-system.js # File system operations
│ └── logger.js # Logging utilities
└── index.js # Main entry pointDevelopment
- Clone the repository
- Install dependencies with
npm install - Make changes
- Test locally with
node src/index.js my-project --token your_token
License
MIT
