{"id":20275365,"url":"https://github.com/theme-particlex/hexo-babel","last_synced_at":"2025-07-18T10:33:12.262Z","repository":{"id":64708952,"uuid":"577635534","full_name":"theme-particlex/hexo-babel","owner":"theme-particlex","description":"A plugin to compile JS for Hexo, using Babel.","archived":false,"fork":false,"pushed_at":"2024-10-28T06:42:49.000Z","size":145,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T05:51:40.072Z","etag":null,"topics":["babel","hexo","hexo-plugin","renderer"],"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/theme-particlex.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":"2022-12-13T07:20:03.000Z","updated_at":"2025-02-09T07:58:43.000Z","dependencies_parsed_at":"2023-02-18T06:01:11.116Z","dependency_job_id":"311a38ac-c58e-4fdf-9669-5a99e0fc75c6","html_url":"https://github.com/theme-particlex/hexo-babel","commit_stats":null,"previous_names":["argvchs/hexo-renderer-babeljs","argvchs/hexo-babel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theme-particlex/hexo-babel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-babel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-babel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-babel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-babel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theme-particlex","download_url":"https://codeload.github.com/theme-particlex/hexo-babel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-babel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265742654,"owners_count":23820877,"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":["babel","hexo","hexo-plugin","renderer"],"created_at":"2024-11-14T13:09:09.442Z","updated_at":"2025-07-18T10:33:12.234Z","avatar_url":"https://github.com/theme-particlex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexo-Babel\r\n\r\n[Hexo-Babel](https://github.com/theme-particlex/hexo-babel) 插件，使用 Babel 编译转换 JS 文件。\r\n\r\n# 1. 安装\r\n\r\n```bash\r\npnpm add hexo-babel\r\n```\r\n\r\n# 2. 配置\r\n\r\n```yaml\r\nbabel:\r\n    options:\r\n    exclude:\r\n        - \"*.min.js\"\r\n```\r\n\r\n`options` 详见 [Options · Babel](https://babel.dev/docs/en/options) 和 [@babel/preset-env · Babel](https://babel.dev/docs/en/babel-preset-env#options)。\r\n\r\n例如这是一种配置（要先安装 `@babel/preset-env`）：\r\n\r\n```bash\r\npnpm add @babel/core @babel/preset-env -D\r\n```\r\n\r\n```yaml\r\nbabel:\r\n    options:\r\n        presets:\r\n            - - \"@babel/preset-env\"\r\n              - targets: last 5 versions, not dead, \u003e 0.3%\r\n        sourceType: script\r\n    exclude:\r\n        - \"*.min.js\"\r\n```\r\n\r\n或者不填 `options` 参数，使用 `babel.config.json`。\r\n\r\n```json\r\n{\r\n    \"presets\": [[\"@babel/preset-env\", { \"targets\": \"last 5 versions, not dead, \u003e 0.3%\" }]],\r\n    \"sourceType\": \"script\"\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-particlex%2Fhexo-babel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheme-particlex%2Fhexo-babel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-particlex%2Fhexo-babel/lists"}