wss-cli

wss脚手架工具

Usage no npm install needed!

<script type="module">
  import wssCli from 'https://cdn.skypack.dev/wss-cli';
</script>

README

wss-cli

Command line tools for wssio. project, write and run an application with one single command!

Install

npm i --g wss-cli

Usage

wssio offers a single command line interface for your wssio project:

$ wss

Will print an help:

wss command line interface, available commands are:

  * project      project a new project
  * plugin        project a new plugin
  * version       the current wss-cli version
  * help          help about commands

Launch 'wss help [command]' to know more about the commands.

project

wss-cli can also help with generating some project of your next wssio application. To use it:

  1. wss project <yourapp>
  2. cd yourapp
  3. npm install

The sample code offers you four npm tasks:

  • npm start - starts the application
  • npm dev - dev the application
  • npm unit - test and generate test report
  • npm test - runs the tests
  • npm build - build the application

You will find three different folders:

  • plugins: the folder where you will place all your custom plugins
  • services: the folder where you will declare all your endpoints
  • test: the folder where you will declare all your test

Finally there will be an app.ts file, which is your entry point.

plugin

Create a basic plugin.

$ wss plugin <folder>/<name>