0.4.0 • Published 5 months ago

@lcui/cli v0.4.0

Weekly downloads
7
License
MIT
Repository
github
Last release
5 months ago

lcui-cli

GitHub Actions codecov

Introduction

(English/中文)

LCUI CLI is command line interface for rapid LCUI development. providing:

  • Project scaffolding.
  • A compiler similar to Webpack that can load specific types of files and compile them into C code using a loader. The following loaders exist:
    • ts-loader: Load JavaScript and TypeScript files, supporting JSX syntax. You can write LCUI widgets like you would write React components.
    • css-loader: Load CSS files, supporting the CSS Modules.
    • sass-loader: Load the Sass/SCSS file and compile it into CSS.
    • json-loader: Load JSON files, allowing you to describe the interface in JSON format.
    • xml-loader: Load an XML file, allowing you to describe the interface in XML format.
    • yaml-loader: Load YAML files, allowing you to describe the interface in YAML format.

Installation

Before installing this tool, you need to install these dependencies on your computer:

Afterwards, run:

npm install -g @lcui/cli
# Or
yarn global add @lcui/cli

Usage

Create an LCUI application project:

lcui create my-project

Compile all files in the src directory:

lcui compile src

Compile a single file:

lcui compile src/pages/home/index.tsx

License

MIT