# wpbase-cli

> A front end project seed for whatever

Latest version **0.0.7** (published 2019-08-01) · MIT license · 0 weekly downloads

## Install

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

Provides the command `wpbase-cli`.

## 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.0.7 |
| Published | 2019-08-01 |
| First published | 2019-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 714.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | 大柱子 白天雪 |
| Maintainers | pillarboy |

## Links

- npm: https://www.npmjs.com/package/wpbase-cli
- Repository: https://github.com/pillarBoy/what-seed
- Issues: https://github.com/pillarBoy/what-seed/issues
- npm.io page: https://npm.io/package/wpbase-cli

## Dependencies (10)

- [async](https://npm.io/package/async.md) ^3.1.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [which](https://npm.io/package/which.md) ^1.3.1
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.3
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [inquirer](https://npm.io/package/inquirer.md) ^6.5.0
- [through2](https://npm.io/package/through2.md) ^3.0.1
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^3.0.3
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [git-down-repo](https://npm.io/package/git-down-repo.md) ^2.4.3

## Recent versions

- 0.0.7 (latest) — 2019-08-01
- 0.0.6 — 2019-08-01
- 0.0.5 — 2019-08-01
- 0.0.4 — 2019-08-01
- 0.0.2 — 2019-08-01

## README

# what-seed 

A front end project seed for whatever 

## Functionality

这是一个前端webpack种子项目，可以用来生成前端的起始项目。通过问答完成移动端适配、sass编译等环境配置，类似vue-init.

详见[已实现功能](https://github.com/pillarBoy/what-seed/blob/master/%E5%B7%B2%E5%AE%9E%E7%8E%B0%E5%8A%9F%E8%83%BD%E5%88%97%E8%A1%A8.md)

## Usage

``` bash
$ wpbase-cli create <project-name>
```

## Installation

### git clone

``` bash
$ git clone https://github.com/pillarBoy/what-seed
$ cd what-seed
$ npm link  # make wpbase-cli a global command, might have accession issues.
            # alternatively, set path-to-webcli-dir as env variable

$ wpbase-cli create myproject  
$ cd myproject
```

start to work

## Customize this seed

当前可以通过修改 `src/config.template.js` 来修改默认配置，这个文件将会复制到生成项目的 `webpack/config.js` 由webpack引用

问答可以定制一些不同场景下的不同配置，在 `src/questions.js` 中可以定制问答项目。

引入单元测试，编写测试文件 `test/test.js` 后 `npm test` 运行测试，`npm run coverage` 运行istanbul覆盖率测试

istanbul 依赖的 esprima 暂不支持async，因此控制台会有一些无关的报错

## Details

移动端适配方案: 依照750px设计图写尺寸(后续将增设配置)，单位用px， 编译时，由px2rem转为rem，根据ClientWidth设定根字体，完成响应式适配。

在webpack中引入了px2rem，基准宽度是750px，因此750px宽度设计图的尺寸可以直接用到css文件中，单位是px

代码在生成项目中的 `src/utils/htmlFontSize.js`  中

不想转换的，如1px 线，写作 `border: 1px solid #ddd; /*no*/`，想转换，但需要保留px单位的，如字体，写作 ` font-size: 28px; /*px*/ `

详见[px2rem文档](https://github.com/songsiqi/px2rem)

## 支持版本
async await 需要node > 7.6支持

## 项目包管理，使用yarn

##### 项目初始化

`yarn`
或 `npm install`

##### dev

`yarn start`

##### build

`yarn build`


## Regards

[vue-cli](https://github.com/vuejs/vue-cli)

[px2rem](https://github.com/songsiqi/px2rem)

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