# omi-cli-test

> Create website, app with no build configuration. be friendly to [Omi](https://github.com/Tencent/omi) framework.

Latest version **3.1.11** (published 2019-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install omi-cli-test
pnpm add omi-cli-test
yarn add omi-cli-test
bun add omi-cli-test
```

Provides the command `omi-cli-test`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.11 |
| Published | 2019-01-09 |
| First published | 2018-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 18 |
| Unpacked size | 2.5 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | pasturn,LeeHyungGeun,daizhan,xcatliu,vorshen,dntzhang |
| Maintainers | leehyunggeun |
| Keywords | omi, cli, omi-cli, webpack |

## Links

- npm: https://www.npmjs.com/package/omi-cli-test
- Repository: https://github.com/Tencent/omi
- Homepage: https://github.com/Tencent/omi/tree/master/packages/omi-cli
- Issues: https://github.com/Tencent/omi/issues
- npm.io page: https://npm.io/package/omi-cli-test

## Dependencies (18)

- [ora](https://npm.io/package/ora.md) ^1.1.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [jsdom](https://npm.io/package/jsdom.md) ^9.12.0
- [which](https://npm.io/package/which.md) ^1.2.14
- [webpack](https://npm.io/package/webpack.md) ^2.3.3
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^2.4.4
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [empty-dir](https://npm.io/package/empty-dir.md) ^0.2.1
- [babel-core](https://npm.io/package/babel-core.md) ^6.24.1
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^5.0.1
- [babel-loader](https://npm.io/package/babel-loader.md) ^6.4.1
- [fs-exists-sync](https://npm.io/package/fs-exists-sync.md) ^0.1.0
- [cross-npm-spawn](https://npm.io/package/cross-npm-spawn.md) ^1.1.1
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.24.1
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1
- [validate-npm-package-name](https://npm.io/package/validate-npm-package-name.md) ^3.0.0
- [babel-plugin-transform-es3-property-literals](https://npm.io/package/babel-plugin-transform-es3-property-literals.md) ^6.22.0
- [babel-plugin-transform-es3-member-expression-literals](https://npm.io/package/babel-plugin-transform-es3-member-expression-literals.md) ^6.22.0

## 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

- 3.1.11 (latest) — 2019-01-09
- 3.1.10 — 2019-01-09
- 3.1.9 — 2019-01-09
- 3.1.8 — 2019-01-09
- 3.1.7 — 2019-01-09
- 3.1.6 — 2019-01-09
- 3.1.5 — 2018-12-22
- 3.1.4 — 2018-12-20
- 3.1.3 — 2018-12-18
- 3.0.22 — 2018-11-21
- 0.0.1 — 2018-11-21
- 3.0.21 — 2018-11-21
- 3.0.20 — 2018-11-21
- 3.0.19 — 2018-11-21
- 3.0.18 — 2018-11-20
- … 2 more at https://npm.io/package/omi-cli-test/versions

## README

## omi-cli

```bash
$ npm i omi-cli -g     # install cli
$ omi init my-app      # init project, you can also exec 'omi init' in an empty folder
$ cd my-app            # please ignore this command if you executed 'omi init' in an empty folder
$ npm start            # develop
$ npm run build        # release
```

> `npx omi-cli init my-app` is also supported(npm v5.2.0+).

Directory description:

```
├─ config
├─ public
├─ scripts
├─ src
│  ├─ assets
│  ├─ elements    //Store all custom elements
│  ├─ store       //Store all this store of pages
│  ├─ admin.js    //Entry js of compiler，will build to admin.html
│  └─ index.js    //Entry js of compiler，will build to index.html
```

## Project Template

| **Template Type**|  **Command**|  **Describe**|
| ------------ |  -----------|  ----------------- |
|Base Template(v3.3.0+)|`omi init my-app`| Basic omi or omio(IE8+) project template.|
|TypeScript Template(omi-cli v3.3.0+)|`omi init-ts my-app`|Basic template with typescript.|
|Mobile Template|`omi init-weui my-app`| Mobile web app template with weui and omi-router.|
|[SPA Template](https://tencent.github.io/omi/packages/omi-router/examples/spa/build/)(omi-cli v3.0.10+)|`omi init-spa my-app`|Single page application template with omi-router.|
|omi-mp Template(omi-cli v3.0.13+)|`omi init-mp my-app`  |Developing web with mini program template.|
|MVVM Template(omi-cli v3.0.22+)|`omi init-mvvm my-app`  |MVVM template.|

CLI's auto-created project scaffolding is based on a single-page create-react-app to be converted into a multi-page one, with configuration issues to see [create-react-app user guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md)


About compiled website URL：

* [build env doc](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#referencing-environment-variables-in-the-html)
* [build problem](https://stackoverflow.com/questions/42686149/create-react-app-build-with-public-url)

Such as in windows:

```json
"scripts": {
  "start": "node scripts/start.js",
  "_build": "node scripts/build.js",
  "build":"set PUBLIC_URL=https://fe.wxpay.oa.com/dv&& npm run _build"
}
```

In mac os:

```json
"scripts": {
    "start": "node scripts/start.js",
    "_build": "node scripts/build.js",
    "build":"PUBLIC_URL=https://fe.wxpay.oa.com/dv npm run _build",
    "fix": "eslint src --fix"
  },
```

# License

This content is released under the [MIT](http://opensource.org/licenses/MIT) License.

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