1.2.1 • Published 6 months ago
@codingcat2202/walter_white_cli v1.2.1
Web Project CLI Tool
This CLI tool simplifies the setup and management of web projects by automating the creation of project structures, files, and configurations. The tool is globally installable and provides commands similar to Angular's CLI.
Features
- Project Initialization: Quickly create a new project with a pre-configured structure.
- Component Generation: Add new components with a single command.
- Routing Support: Optional routing setup based on Lit-HTML.
- Webpack Integration: Development server and build configuration included.
- Customizable: Adjust the generated files to suit your needs.
Installation
To use this tool globally, install it via npm:
npm install -g @codingcat2202/walter_white_cliCommands
Create a New Project
ww new {projectnam}- Creates a new project with the specified name.
- Generates the following folder structure:
projectname/ |-- src/ | |-- app/ | |-- components/ | |-- model/ | |-- service/ | |-- index.ts |-- package.json |-- webpack.config.js |-- tsconfig.json |-- index.html |-- .gitignore |-- README.md
Add Routing
During project creation, you will be prompted:
Do you want to add routing? (y/n):- Selecting
ywill add routing support with predefined files, includingrouter-outlet.tsandglobal.d.ts.
Generate a Component
npm run generate {componentName}- Creates a new component in the
src/app/componentsfolder. - Example:
This generates:npm run generate my-componentmy-component-component/ |-- index.ts |-- style.css |-- my-component-component.ts
Development
The generated project comes with:
- Development Server: Start the server with:
npm start - Build Script: Bundle the project with:
npm run build - TypeScript Configuration: A
tsconfig.jsonfile tailored for the project. - Testing Support: Includes Mocha, Chai, and related dependencies.
File Overview
Key Files
- webpack.config.js: Configures Webpack for development and production.
- tsconfig.json: TypeScript compiler settings.
- generate-component.js: Script for generating new components.
- index.html: Base HTML file.
.gitignore
Predefined to exclude:
node_modules/- Build files (
dist/,build/) - IDE-specific files (e.g.,
.vscode/,.idea/)
Dependencies
Development Dependencies
- Webpack and Webpack Dev Server
- TypeScript and ts-loader
- Mocha and Chai for testing
Runtime Dependencies
litandlit-htmlfor UI componentsrxjsfor reactive programming
License
This project is licensed under ISC.
1.2.1
6 months ago
1.2.0
12 months ago
1.1.10
12 months ago
1.1.9
12 months ago
1.1.8
12 months ago
1.1.7
12 months ago
1.1.6
12 months ago
1.1.5
12 months ago
1.1.4
12 months ago
1.1.3
12 months ago
1.1.2
12 months ago
1.1.1
12 months ago
1.1.0
12 months ago
1.0.9
12 months ago
1.0.8
12 months ago
1.0.7
12 months ago
1.0.6
12 months ago
1.0.5
12 months ago
1.0.4
12 months ago
1.0.3
12 months ago
1.0.2
12 months ago
1.0.0
12 months ago