smash-cli

smash-cli

  • Documentation
  • Examples
  • Blog
  • GitHub

›Getting Started

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

Command Line Usage

1 How to create a configuration file?

The command below create a file named task.yml in directory demo/.smash:

$ mkdir demo && cd demo
$ smash init

Here is what task.yml looks like :

helloworld:
  - name: 'smash-middleware-helloworld' # 中间件名称
    paramA: 'param a' # 传递给这个中间件的参数 paramA
    paramB: 'param b' # 传递给这个中间件的参数 paramB

2 How to install middlewares?

Just run this.

$ smash install

It will find out all the middlewares used in the tasks.
And then it checks if the middlewares have been installed. If not, it will install them.

3 How to run a task?

Just run this.

$ smash run helloworld

4 How to download a template package?

$ smash download smash-template-react

Browse examples to get more.

← Installationsmash-middleware-clean →
  • 1 How to create a configuration file?
  • 2 How to install middlewares?
  • 3 How to run a task?
  • 4 How to download a template package?
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号