# workplus-cli

> A simple CLI for scaffolding workplus projects.

Latest version **0.10.2** (published 2019-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install workplus-cli
pnpm add workplus-cli
yarn add workplus-cli
bun add workplus-cli
```

Provides the commands `wp`, `workplus`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.2 |
| Published | 2019-01-05 |
| First published | 2016-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 17 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Hejx |
| Maintainers | hejx |
| Keywords | cli, workplus-cli, workplus |

## Links

- npm: https://www.npmjs.com/package/workplus-cli
- Repository: https://github.com/WorkPlusFE/WorkPlus-cli
- Homepage: https://github.com/WorkPlusFE/WorkPlus-cli#readme
- Issues: https://github.com/WorkPlusFE/WorkPlus-cli/issues
- npm.io page: https://npm.io/package/workplus-cli

## Dependencies (17)

- [ora](https://npm.io/package/ora.md) ^0.3.0
- [uid](https://npm.io/package/uid.md) 0.0.2
- [async](https://npm.io/package/async.md) ^2.0.0-rc.2
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [figlet](https://npm.io/package/figlet.md) ^1.2.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.5.0
- [request](https://npm.io/package/request.md) ^2.67.0
- [inquirer](https://npm.io/package/inquirer.md) ^0.12.0
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [metalsmith](https://npm.io/package/metalsmith.md) ^2.1.0
- [portfinder](https://npm.io/package/portfinder.md) ^1.0.7
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [consolidate](https://npm.io/package/consolidate.md) ^0.14.0
- [http-server](https://npm.io/package/http-server.md) ^0.9.0
- [read-metadata](https://npm.io/package/read-metadata.md) ^1.0.0
- [download-git-repo](https://npm.io/package/download-git-repo.md) ^0.1.1
- [validate-npm-package-name](https://npm.io/package/validate-npm-package-name.md) ^2.2.2

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.10.2 (latest) — 2019-01-05
- 0.10.0 — 2019-01-05
- 0.5.0 — 2017-01-17
- 0.4.3 — 2016-10-10
- 0.4.2 — 2016-10-10
- 0.4.1 — 2016-10-09
- 0.3.3 — 2016-10-09
- 0.2.1 — 2016-10-04

## README

# workplus cli

[![npm](https://img.shields.io/npm/v/workplus-cli.svg?maxAge=2592000?style=flat-square)]()

> A simple CLI for scaffolding starter projects.

### Installation

Prerequisites: [Node.js](https://nodejs.org/en/) (>=6.x preferred) and Git.

```bash
[sudo] npm install -g workplus-cli
```

### Usage

#### 1. Create a new project

```bash
$ workplus start <template-name> <project-name>
```

Example:

```bash
$ workplus start webpack-framework7 my-project
```

The above command pulls the template from [workplus-templates/webpack-framework7](https://github.com/workplus-templates/webpack-framework7), prompts for some information, and generates the project at ./my-project/.

#### 2. Templates list

```bash
$ workplus list
```

All official project templates are repos in the [workplus-templates organization](https://github.com/workplus-templates). When a new template is added to the organization, you will be able to run workplus start <template-name> <project-name> to use that template. You can also run workplus list to see all available official templates.

Current available templates include:

* [demo7](https://github.com/workplus-templates/demo7) A framework7 project use for creating prototype demo rapidly.
* [webpack-framework7](https://github.com/workplus-templates/webpack-framework7) A starter project for using Framework7 with Webpack via Babel!
* [webpack-vue](https://github.com/workplus-templates/webpack-vue) Webpack VueJs template.
* [gulp-angular](https://github.com/workplus-templates/gulp-angular) Angular starter project using gulp.


#### 3. Start a 'http-server' local static server

```bash
$ workplus server
```

workplus server base on 'http-server', [http-server](https://github.com/indexzero/http-server) is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.

Available Options:

* -p Port to use (defaults to 8080)
* -a Address to use (defaults to 0.0.0.0)
* -P or --proxy Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com

### Writing Custom Template

A template repo must have a `template` directory that holds the template files, and may have a metadata file for the template which can be a `template.json` file.

```json
{
    "name": "webpack-framework7",
    "description": "A starter project for using Framework7 with Webpack via Babel!",
    "bash": ["npm install", "npm run dev"],
    "readme": "https://github.com/workplus-template/webpack-framework7#readme"
}
```

* name: default value of the project name. It use for prompt process.
* description: default value of the project description. It use for prompt process.
* bash: log starter message after project generated.
* readme: log documentation link after project generated.

All files inside `template` will be rendered using `underscore`, with the prompt results as the data.

Example:

```html
<title><%= name %></title>
```
### Development

```bash
npm install
bin/workplus start <template-name> [project-name]
bin/workplus list
bin/workplus server
```

### License

MIT

---
_Source: https://npm.io/package/workplus-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
