{"id":15731800,"url":"https://github.com/legoflow/cli","last_synced_at":"2025-06-25T03:37:20.138Z","repository":{"id":39496275,"uuid":"93124863","full_name":"legoflow/cli","owner":"legoflow","description":"命令行工具","archived":false,"fork":false,"pushed_at":"2022-12-03T15:45:45.000Z","size":5055,"stargazers_count":6,"open_issues_count":26,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T07:07:46.514Z","etag":null,"topics":["babel7","gulp4","vuejs2","webpack4"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/legoflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T03:52:13.000Z","updated_at":"2020-07-21T07:32:35.000Z","dependencies_parsed_at":"2023-01-22T20:46:21.050Z","dependency_job_id":null,"html_url":"https://github.com/legoflow/cli","commit_stats":null,"previous_names":["legoflow/legoflow-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legoflow%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legoflow%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legoflow%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legoflow%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/legoflow","download_url":"https://codeload.github.com/legoflow/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253136314,"owners_count":21859771,"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":["babel7","gulp4","vuejs2","webpack4"],"created_at":"2024-10-04T00:05:44.136Z","updated_at":"2025-05-08T19:38:10.403Z","avatar_url":"https://github.com/legoflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e legoflow-cli \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg alt=\"Licence\" src=\"https://img.shields.io/badge/license-MIT-green.svg\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"\"\u003e\n    \u003cimg alt=\"PRs Welcome\" src=\"https://img.shields.io/badge/PRs-welcome-green.svg\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e命令行工具\u003c/strong\u003e\n\u003c/p\u003e\n\n## 最近更新\n\n**[CHANGELOG](./CHANGELOG.md)**\n\n## 依赖\n\n* Node.js \u003e= **8.x**\n\n## 安装\n\n```shell\nnpm i legoflow-cli -g\n\n# or\n# 推荐使用 yarn 安装\nyarn global add legoflow-cli\n```\n\n## 使用\n\n### 查看命令\n\n```shell\nlegoflow -h\n\n# 使用简写\nlf -h\n```\n\n### 新建项目\n\n```shell\nlf init\n```\n\n### 开发\n\n```shell\n# 进入 legoflow 项目\ncd test\n\nlf dev\n\n# 可选择环境\nlf dev --env\n\n# 可指定环境\nlf dev test\n```\n\n### 构建\n\n```shell\n# 进入 legoflow 项目\ncd test\n\nlf build\n\n# 选择环境\nlf build --env\n\n# 可指定环境\nlf build preview\n```\n\n### CI 构建\n\n```sh\n# 进入 legoflow 项目\ncd test\n\nlf-ci\n\n# 也可构建指定环境 lf-ci [env] 例如：构建测试环境\nlf-ci test\n```\n\n### 构建 dll\n\n```shell\nlf build:dll\n```\n\n### 全局设置\n\n```shell\n# 设置参数\nlf set \u003cname\u003e \u003cvalue\u003e\n\n# 查看参数\nlf get \u003cname\u003e\n\n# 还原参数\nlf clean\n```\n\n具体参数参考 [这里](https://github.com/legoflow/config)\n\n### v1.x 项目迁移到 v2.x\n\n```shell\ncd test\n\nlf migrate:v2\n```\n\n**注意** 该功能只能把 v1.x 与 v2.x 都存在的功能进行迁移，若 2.x 摒弃的功能无法被迁移。例如：\n\n* v1.x 项目配置中的 `assets` 被迁移为 `workflow.build{ 'html.resourcesDomain' }`\n* v1.x 项目配置中的 `dist` / `vue@2.1` / ... 则无法被迁移\n\n具体功能对比参考 [这里](https://github.com/legoflow/legoflow/issues/12)\n\n### 关闭指定端口线程\n\n```shell\nlf kill:port 6701\n```\n\n### 调用内置 ESLint 模块\n\n通过该命令可调用内置的 [ESLint 模块](http://eslint.cn/docs/user-guide/command-line-interface)\n\n```shell\nlf:eslint\n\nlf:eslint -v\nlf:eslint -h\nlf:eslint ...\n```\n\n**注意** 2.3 版本后该命令更改为 `lf-eslint`\n\n## 许可\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegoflow%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegoflow%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegoflow%2Fcli/lists"}