{"id":18428159,"url":"https://github.com/futurewan/lilyrc-cli","last_synced_at":"2026-04-22T21:33:55.763Z","repository":{"id":58129291,"uuid":"428469357","full_name":"futurewan/lilyrc-cli","owner":"futurewan","description":"react 脚手架","archived":false,"fork":false,"pushed_at":"2022-12-19T15:33:12.000Z","size":394,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T09:17:42.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/futurewan.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":"2021-11-16T00:51:03.000Z","updated_at":"2022-09-15T01:35:30.000Z","dependencies_parsed_at":"2023-01-29T22:01:02.662Z","dependency_job_id":null,"html_url":"https://github.com/futurewan/lilyrc-cli","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/futurewan/lilyrc-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futurewan%2Flilyrc-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futurewan%2Flilyrc-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futurewan%2Flilyrc-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futurewan%2Flilyrc-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/futurewan","download_url":"https://codeload.github.com/futurewan/lilyrc-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futurewan%2Flilyrc-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32156603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-06T05:12:56.294Z","updated_at":"2026-04-22T21:33:55.749Z","avatar_url":"https://github.com/futurewan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 一键生成前端工程\n用于生成前端基础工程项目（react版），脚手架包含webpack相关配置，零配置即可启动和打包项目。\n\n## 安装初始化工具\n`npm i -g lilyrc-cli-create`\n\n### 初始化项目\n`lilyrc-cli-create \u003cproject-name\u003e`\n\n## 安装打包工具\n初始化的项目中会安装打包工具`lilyrc-cli`依赖\n### 启动开发环境\n```\nlilyrc-cli start\n```\n\n### 打包\n```\nlilyrc-cli build\n```\n\n## 环境变量配置\nenv目录存放不同环境所需的全局变量。\n命名规范：.env.{环境标识}（e.g.：.env.production）\n启动命令：\n```shell\nlilyrc-cli start --env test\nlilyrc-cli build --env production\n```\n**.env**文件存放一些通用固定的变量，省去在所有的环境都定义一遍。\n\n## 配置选项\n`start`和`build`命令默认会使用根目录下 lilyrc.config.js 文件作为默认配置项。   \n也可使用 `--config \u003cconfigPath\u003e`来指定路径\n有哪些可以配置的项：\n\n- 启动项目类参数\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | ------- | --- | --- |\n| port | 开发环境端口，如果当前端口被暂用，端口号+1 | number | 8001 |\n| proxy | 开发环境 proxy 代理，语法参考[http-proxy-middleware](https://webpack.js.org/configuration/dev-server/#devserverproxy)  | object | - |\n\n\n\n\n- 打包项目类参数\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | ------- | --- | --- |\n| outputPath | 打包输出目录\u003cbr/\u003e这里支持二级目录，e.g. dist/pro1 | string | - |\n| publicPath | 资源的基础路径，一般用在资源放在cdn上，需要配置其路径；同`webpack`的`output.publicPath` | string | / |\n| copy | 静态资源，拷贝至`outputPath`目录\u003cbr/\u003e 使用方法参考 [copy-webpack-plugin](https://www.npmjs.com/package/copy-webpack-plugin) 插件patterns参数，\u003cbr/\u003ee.g. ```[{from:'public',to:'assets'}]``` | object[] | `[{ from: 'favicon.ico'}]` |\n\n\n## 开启 `webpack-bundle-analyzer` 包分析\n```\nlilyrc-cli build --report true\n```\n\n## 工程介绍\n### 技术栈\n`React`、`TypeScript`、`Webpack5`\n### 编码规范\n- `ESLint`代码检查工具配合`airbnb`整套风格对`TypeScript`文件编码约束。\n- `Stylelint`样式检查工具配合`stylelint-less`对`Less`文件编码约束。\n- `Prettier`基于上面两个工具的规则，对代码进行格式化；当然最佳实践还需要配置VSCode实现自动格式化。\n- `husky`工具使用Git Hooks自动化检查代码\n  - `lint-staged`配合`husky`在提交代码前对代码检查是否符合`ESLint`和`Stylelint`配置的规则\n  - `commitlint`配合`husky`校验提交的commit信息是否符合规范\n\n### 其他工具\n- `PostCSS` CSS的转换工具\n  - `autoprefixer`：添加浏览器特定前缀\n  - `postcss-pxtorem`：px转rem单位","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturewan%2Flilyrc-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuturewan%2Flilyrc-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturewan%2Flilyrc-cli/lists"}