← 返回命令列表

Linux command

ignite 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a new React Native app

npx ignite-cli new [MyApp]

Create a new app

npx ignite-cli new [MyApp] --workflow=expo

Generate a component

npx ignite-cli generate component [Header]

Generate a screen

npx ignite-cli generate screen [Login]

Generate a model

npx ignite-cli generate model [User]

Check environment

npx ignite-cli doctor

Remove the demo code

npx ignite-cli remove-demo

说明

Ignite is a CLI for React Native development created by Infinite Red. It provides an opinionated project scaffolding with industry best practices, including MobX-State-Tree for state management, TypeScript, React Navigation, and a testing setup with Jest. The generate command creates boilerplate files from templates for common patterns: components, screens, models, and navigators. Generated code follows the project's established conventions and directory structure.

参数

new _name_
Scaffold a new React Native app with the Ignite boilerplate.
generate _type_ _name_
Generate a component, screen, model, or navigator from templates.
doctor
Check the local development environment for common issues.
remove-demo
Remove the demo/example code from a project generated with Ignite.
--workflow _type_
Workflow to use when creating a new app: expo (default) or cng (Continuous Native Generation).
--yes, -y
Accept all default options when creating a new app (non-interactive).
--help
Display help information.
--version
Display the CLI version.

FAQ

What is the ignite command used for?

Ignite is a CLI for React Native development created by Infinite Red. It provides an opinionated project scaffolding with industry best practices, including MobX-State-Tree for state management, TypeScript, React Navigation, and a testing setup with Jest. The generate command creates boilerplate files from templates for common patterns: components, screens, models, and navigators. Generated code follows the project's established conventions and directory structure.

How do I run a basic ignite example?

Run `npx ignite-cli new [MyApp]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does new _name_ do in ignite?

Scaffold a new React Native app with the Ignite boilerplate.