smash-cli

smash-cli

  • Documentation
  • Examples
  • Blog
  • GitHub

›Templates

Getting Started

  • What is smash-cli?
  • Installation
  • Command Line Usage

Middlewares

  • smash-middleware-clean
  • smash-middleware-copy
  • smash-middleware-eslint
  • smash-middleware-helloworld
  • smash-middleware-jest
  • smash-middleware-shell
  • smash-middleware-webpack-v4

Templates

  • smash-template-react
  • smash-template-react-component
  • smash-template-revealjs

Programmatic APIs

  • smash-cli
  • smash-init
  • smash-dowload
  • smash-install
  • smash-run
  • smash-helper-logger
  • smash-helper-task-finder
  • smash-helper-middleware-installer
Edit

smash-template-react-component

npm

React 16 component template.

安装

# 步骤 1 下载模板
$ mkdir demo && cd demo
$ smash download smash-template-react-component

# 步骤 2 安装项目依赖
$ npm install

# 步骤 3 安装中间件
$ smash install

开发

$ smash run dev-server # Start webpack-dev-server

构建

$ smash run lib

目录结构

├── .smash            # smash-cli 工具的配置文件目录
│     └─── task.yml   # 配置文件
├── dist              # 组件的构建输出目录,文件输出规则:[name].min.js
├── lib               # 组件入口目录,入口文件规则:*.js(x)
├── src               # 本地测试开发的文件存放的目录
└── webpack.config.js
← smash-template-reactsmash-template-revealjs →
  • 安装
  • 开发
  • 构建
  • 目录结构
smash-cli
Documentation
Getting StartedMiddlewaresTemplatesProgrammatic APIs
Examples
UsageContribute
Community
HelpUser ShowcaseIssuesYuque
More
BlogStar
Facebook Open Source
Copyright © 2020 www.smash-cli.com
粤ICP备18035177号-2 | 粤公网安备 44011302002170号