{"id":28416671,"url":"https://github.com/hellflame/es6-template","last_synced_at":"2026-04-18T04:02:10.088Z","repository":{"id":93108034,"uuid":"151926464","full_name":"hellflame/es6-template","owner":"hellflame","description":"ES6 开发环境搭建模版","archived":false,"fork":false,"pushed_at":"2018-11-03T03:23:43.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T20:05:23.600Z","etag":null,"topics":["es6","nodejs","template-project"],"latest_commit_sha":null,"homepage":null,"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/hellflame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-10-07T09:42:02.000Z","updated_at":"2018-11-03T03:23:44.000Z","dependencies_parsed_at":"2023-06-04T22:30:38.201Z","dependency_job_id":null,"html_url":"https://github.com/hellflame/es6-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hellflame/es6-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellflame%2Fes6-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellflame%2Fes6-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellflame%2Fes6-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellflame%2Fes6-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellflame","download_url":"https://codeload.github.com/hellflame/es6-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellflame%2Fes6-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31955919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["es6","nodejs","template-project"],"created_at":"2025-06-03T23:14:11.286Z","updated_at":"2026-04-18T04:02:10.083Z","avatar_url":"https://github.com/hellflame.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ES6 开发环境搭建模版\n\n可用于开发 `node 服务` 以及 `node 脚本`\n\n基于 `babel` 进行 `es6` 语法的转译，在开发时使用 `es6` 语法，发布时转译为 `node` 可直接解释的 `es5` 代码\n\n模版计划：\n\n- [x] es6 开发环境 (babel)\n  - [x] 模块路由映射 (babel-plugin-module-resolver)\n- [x] 自动重载 (nodemon)\n- [x] 单元测试 (jest)\n- [x] 命令行解析 (argparse)\n- [x] 文档生成 (docsify)\n- [ ] 服务日志\n\n### 目录结构\n\n```\n├── docs\t\t\t\t\t\t# 文档\n│   ├── .nojekyll\n│   ├── README.md\n│   └── index.html\n├── project\t\t\t\t\t\t# 开发目录\n│   ├── utils\n│   │   ├── arg_parse.js\n│   │   └── meta.js\n│   └── index.js\n├── release\t\t\t\t\t\t# 发布目录\n│   ├── utils\n│   │   ├── arg_parse.js\n│   │   ├── arg_parse.js.map\n│   │   ├── meta.js\n│   │   └── meta.js.map\n│   ├── index.js\n│   └── index.js.map\n├── test\t\t\t\t\t\t# 测试目录\n│   └── start.test.js\n├── .babelrc\t\t\t\t\t# babel 配置文件\n├── .editorconfig\t\t\t\t# editorconfig 配置文件\n├── .gitignore\n├── README.md\n├── jest.json\t\t\t\t\t# jest 测试配置文件\n└── package.json\n```\n\n#### 目录说明\n\n1. 所有的项目开发都在 `project` 目录中进行\n2. `release` 目录用于转译 `es6` 语法，结构上与 `project` 保持一致，并且额外生成 `source map` ，方便运行调试\n3. `project/utils/arg_parse.js` 用于命令行解析配置，版本信息来源于 `package.json`\n4. `project/utils/meta.js` 用于预处理项目元信息，包含 `版本号`、`描述`、`兼容版本号` 等\n5. `test` 目录下包含所有测试用例，只需要测试文件以 `.test.js` 作为文件后缀即可，测试同时会输出覆盖率报告，保存在目录下的 `coverage` 目录下\n6. `.babelrc` 文件主要用于转译配置，包含路由映射配置，暂时将 `@` 映射为 `project` 目录，可根据需要添加\n7. `.editorconfig` 文件为 editorconfig 配置文件，需要编辑器支持\n8. `jest.json` 包含测试配置项，其中包含测试用例中的模块映射，这里的模块映射与 `project` 下的模块映射不同，不能混在一起\n\n#### 命令说明\n\n- `npm run dev` 将使用 `nodemon` 一直监听文件变动，将对入口文件进行自动重载\n- `npm run build` 将 `project` 目录转译到 `release` 目录，并附带 `source map` 方便查错\n- `npm run serve` 针对 `node 服务` 使用\n- `npm run test` 将开始测试，并输出覆盖率报告到 `coverage` 目录\n- `npm run init-docs` 将初始化文档服务，主要会覆盖 `docs` 目录下的 `README.md` 文件，即文档服务的首页内容来自整个项目的 `README.md`\n- `npm run serve-docs` 将启动文档服务，可进行查看\n\n#### 其他\n\n\u003e you are free to make any change\n\n##### 测试用例\n\n测试用例并非完全局限于 `test` 目录，现在的配置只要满足 `*.test.js` 通配的文件都会进行测试\n\n##### 文档服务\n\n这里只给出了文档服务最基本的配置，更多配置以及插件可以到官网查看 [docsify](https://docsify.js.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellflame%2Fes6-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellflame%2Fes6-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellflame%2Fes6-template/lists"}