{"id":19537099,"url":"https://github.com/vale1534/node-babel-jest-startkit","last_synced_at":"2026-05-06T02:33:54.398Z","repository":{"id":204348978,"uuid":"158764672","full_name":"vale1534/node-babel-jest-startkit","owner":"vale1534","description":"搭建 Node + Babel7 + Jest 的脚手架，用于开发试验 Node 应用。","archived":false,"fork":false,"pushed_at":"2018-11-27T06:34:49.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T14:57:22.771Z","etag":null,"topics":["babel","jest","node"],"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/vale1534.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-23T01:10:53.000Z","updated_at":"2018-12-02T01:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb6a2124-f4d5-4da1-ba38-efe1f6e7f959","html_url":"https://github.com/vale1534/node-babel-jest-startkit","commit_stats":null,"previous_names":["vale1534/node-babel-jest-startkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vale1534/node-babel-jest-startkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vale1534%2Fnode-babel-jest-startkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vale1534%2Fnode-babel-jest-startkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vale1534%2Fnode-babel-jest-startkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vale1534%2Fnode-babel-jest-startkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vale1534","download_url":"https://codeload.github.com/vale1534/node-babel-jest-startkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vale1534%2Fnode-babel-jest-startkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278328168,"owners_count":25968900,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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":["babel","jest","node"],"created_at":"2024-11-11T02:26:11.892Z","updated_at":"2025-10-04T14:57:23.747Z","avatar_url":"https://github.com/vale1534.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-Babel-Jest-Startkit\n\n搭建 Node + Babel7 + Jest 的脚手架，用于开发试验 Node 应用。使用 airbnb/babel-preset-airbnb 做 Babel 配置，不去拼凑各种 Babel 插件和配置文件。\n\n## 起步方法\n\n克隆项目：\n\n```\ngit clone https://github.com/wenris/node-babel-jest-startkit.git new-app\n```\n\n依赖安装：\n\n```\nyarn install --registry=http://registry.npm.taobao.org\n```\n\n## 项目操作命令\n\n将 src/ 目录下的 js 文件转译到 lib/ 目录：\n\n```sh\nyarn build\n### 等效于\nnode ./node_modules/.bin/babel ./src --out-dir ./lib\n```\n\n运行主程序（即`lib/main.js`）：\n\n```sh\nyarn start\n### 等效于\nnode ./lib/main.js\n```\n\n测试命令\n\n```sh\nyarn test\n### 等效于\nnode ./node_modules/.bin/jest ./src\n```\n\n另外，可执行 `yarn build:watch` 在文件改动时实时编译，执行 `yarn test:watch` 用于实时测试。\n\n有时需要运行一些工具脚本，需要用到 babel 转译，方法如下：\n\n```sh\nyarn esrun tool.js\n### 等效于\nnode -r @babel/register tool.js\n```\n\n## 库包依赖\n\n| 包名 | 版本 | 描述 |\n|--------|:--------:|--------|\n| @babel/cli | ^7.1.5 | Babel 命令工具 |\n| @babel/core | ^7.1.6 | Babel 核心包 |\n| babel-core | 7.0.0-bridge.0 | Babel7 与 Babel6 兼容包 |\n| babel-jest | ^23.6.0 | Babel 与 Jest 联姻包 |\n| babel-preset-airbnb | ^3.0.1 | 来自 airbnb 的 Babel 预设包 |\n| jest | ^23.6.0 | Jest 测试套件 |\n| regenerator-runtime | ^0.13.1 | 用于 generator、 async 函数的运行时支持包 |\n\n## 预设 Babel 插件\n\n* ES2015 所有特性，比如 arrow-function 、for-of 、spread 等\n\n* @babel/plugin-proposal-object-rest-spread\n\n* @babel/plugin-transform-exponentiation-operator\n\n* @babel/plugin-transform-jscript\n\n* @babel/plugin-transform-member-expression-literals\n\n* @babel/plugin-transform-property-literals\n\n* @babel/plugin-transform-property-mutators\n\n* @babel/plugin-transform-template-literals\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvale1534%2Fnode-babel-jest-startkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvale1534%2Fnode-babel-jest-startkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvale1534%2Fnode-babel-jest-startkit/lists"}