Appearance
@xcons/cli - Overview
XCON Widget Management CLI Tool - Command line tool developed for creating, building and managing XCON widgets.
General Description
XCONS CLI is a command line tool designed for quick and easy development of XCON platform widgets. It automates widget project creation, build and deployment processes.
Key Features
- Quick Widget Creation: Ready-to-use widget projects with a single command
- Multi-Platform Support: Widget development for ThingsBoard and Web platforms
- TypeScript & .NET: Support for both TypeScript and .NET based widgets
- Automatic Build: Webpack-based optimized build system
- IDE Integration: Ready configurations for VS Code, Visual Studio 2022 and IntelliJ IDEA
- External Library Management: External library management support
XCONS Platform Integration
Build Workflow
- TypeScript Compilation - TypeScript compilation
- XCon Webpack Loader - Template and resource injection
- Webpack Bundling - Optimized bundle creation
- Platform Wrapper - Adding ThingsBoard or Web wrapper
- Minification - Final optimization with Terser
Platform Wrappers
ThingsBoard Wrapper:
- Widget lifecycle methods (onInit, onDataUpdated, onResize, onDestroy)
- ThingsBoard context integration
- Widget activation with XConWidgets registry
Web Wrapper:
- Standard web platform integration
- Custom type parameters
- Resource and configuration management
XCon Webpack Loader Functions
- Template Processing:
templateUrl→templateconversion and minify - Style Processing:
styleUrls→stylesconversion and minify - Resource Injection: Automatic addition of XCONS libraries
- Metadata Processing: Widget metadata processing