{"id":18368231,"url":"https://github.com/thinkjs/think-babel","last_synced_at":"2025-11-01T12:04:56.908Z","repository":{"id":65412378,"uuid":"81819755","full_name":"thinkjs/think-babel","owner":"thinkjs","description":"Use Babel transpile ES6+ file to ES5","archived":false,"fork":false,"pushed_at":"2021-07-01T00:05:32.000Z","size":30,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-29T12:22:47.964Z","etag":null,"topics":["babel","thinkjs3","transpile"],"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/thinkjs.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}},"created_at":"2017-02-13T11:51:13.000Z","updated_at":"2021-07-01T00:05:18.000Z","dependencies_parsed_at":"2023-01-22T07:55:25.374Z","dependency_job_id":null,"html_url":"https://github.com/thinkjs/think-babel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-babel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-babel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-babel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-babel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-babel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522345,"owners_count":20952528,"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","thinkjs3","transpile"],"created_at":"2024-11-05T23:25:14.316Z","updated_at":"2025-11-01T12:04:56.879Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# think-babel\n[![Build Status](https://travis-ci.org/thinkjs/think-babel.svg?branch=master)](https://travis-ci.org/thinkjs/think-babel)\n[![Coverage Status](https://coveralls.io/repos/github/thinkjs/think-babel/badge.svg?branch=master)](https://coveralls.io/github/thinkjs/think-babel?branch=master)\n[![npm](https://img.shields.io/npm/v/think-babel.svg?style=flat-square)](https://www.npmjs.com/package/think-babel)\n\n`think-babel` transpile ES6+ file to ES5\n\n## Syntax\n\n```js\nimport thinkBabel from 'think-babel';\nthinkBabel({\n  srcPath,\n  outPath,\n  file,\n  options,\n  ext,\n});\n\n```\n\n- `srcPath`      {String} the file source path.\n- `outPath`      {String} the directory for output file.\n- `file`         {String} the file path in the 'srcPath'.\n- `[options]` {Object} the babel options,default \n  ```js\n  {\n    filename: file, \n    sourceFileName: path.join(srcPath, file), \n    presets: ['es2015'],\n    sourceMaps: true,\n    babelrc: false\n  }\n  ```\n- `[ext]`        {String} the new file extension,default `.js`.\n\n## Usage\n\nTransform ES6+ file to ES5:\n\n```js\nimport thinkBabel from 'think-babel';\n\nthinkBabel({\n  srcPath: './test/src/a',\n  outPath: './test/out',\n  file: 'b/test.es'\n});\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-babel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-babel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-babel/lists"}