{"id":15531303,"url":"https://github.com/xiaohuoni/oni-cli","last_synced_at":"2025-08-14T19:32:52.440Z","repository":{"id":57314713,"uuid":"122757587","full_name":"xiaohuoni/oni-cli","owner":"xiaohuoni","description":"一个关于umi with dva 的脚手架 生成器","archived":false,"fork":false,"pushed_at":"2019-01-12T04:12:01.000Z","size":406,"stargazers_count":24,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T00:01:38.471Z","etag":null,"topics":["dva","oni-cli","umi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaohuoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-24T16:27:38.000Z","updated_at":"2022-03-21T13:10:26.000Z","dependencies_parsed_at":"2022-09-18T20:51:15.251Z","dependency_job_id":null,"html_url":"https://github.com/xiaohuoni/oni-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohuoni%2Foni-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohuoni%2Foni-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohuoni%2Foni-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohuoni%2Foni-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaohuoni","download_url":"https://codeload.github.com/xiaohuoni/oni-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249772865,"owners_count":21323337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dva","oni-cli","umi"],"created_at":"2024-10-02T11:25:28.072Z","updated_at":"2025-04-23T13:16:38.611Z","avatar_url":"https://github.com/xiaohuoni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"this readme copy and edit for dva-cli\nthis code copy and edit for umi\n# oni-cli\n[![NPM version](https://img.shields.io/npm/v/oni-cli.svg?style=flat)](https://npmjs.org/package/oni-cli)\n[![NPM downloads](http://img.shields.io/npm/dm/oni-cli.svg?style=flat)](https://npmjs.org/package/oni-cli)\n\nCLI for [dva](https://github.com/dvajs/dva) [umi](https://github.com/umijs/umi).\n\n## update\n### 2018.05.08\n- 1.use ejs\n- 2.change the app-structure like umi\n- 3.crate app (or mobile app) for Git clone\n- 4.the template managed to Git [app](https://github.com/xiaohuoni/dva-umi) [mobile](https://github.com/xiaohuoni/dva-umi-mobile)\n### 2018.03.24 \n- 1.update umi1.1 \n- 2.add Nested Route\n## Getting Started\n\nInstall, create and start.\n\n```bash\n# Install\n$ npm install oni-cli -g\n\n# Create app\n$ oni new myapp\n\n# Start app\n$ cd myapp\n$ npm i \n$ npm start\n```\n\n## Commands\n\nWe have 2 commands: `new`  and `generate`(alias `g`).\n\n### oni new appName\n\nCreate app with new directory.\n\n#### Usage Examples\n\n```bash\n$ oni new myapp\n\n$ oni new myapp --mobile (or --web) ( create web app )\n```\n\n\n### oni generate \u003ctype\u003e \u003cname\u003e \u003c?pagename\u003e (short-cut alias: \"g\")\n\nGenerate page and component.\n\n#### Usage Examples\n\n```bash\n$ oni g page home\n#generate component '/src/pages/home/components/Table.js'\n$ oni g component Table home  \n#generate component '/src/components/Table.js'\n$ oni g component Table \n```\n\n## Generated File Tree\n\n```bash\n.\n├── mock                   # mock data\n    ├── user.js            # the mock data test\n├── public                 # index.html\n├── src                    # Source directory\n    ├── assets             # Store images, icons, ...\n    ├── components         # UI components\n    ├── layouts            # layouts\n    ├── models             # Dva global models    \n    ├── pages              # all pages (auto create Route)\n    ├── plugins            # umi plugins\n    ├── services           # Used for communicate with server\n    └── utils              # Utils\n        ├── request.js     # A util wrapped dva/fetch\n        └── config.js      # global config (name,api...)\n    \n    ├── global.less        # global less\n├── .editorconfig          #\n├── .eslintrc              # Eslint config\n├── .umirc.js              # umi\n├── .umirc.mock.js         # umi mock\n├── .webpackrc.js          # webpackrc extend(lick alias prexy)\n├── .gitignore             #\n└── package.json           #\n```\n\n## Configuration\n\noni-cli use [umi](https://github.com/umijs/umi) for build and server\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaohuoni%2Foni-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaohuoni%2Foni-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaohuoni%2Foni-cli/lists"}