{"id":18575960,"url":"https://github.com/taskrjs/fly-babel","last_synced_at":"2025-04-10T08:31:00.018Z","repository":{"id":34388213,"uuid":"38315172","full_name":"taskrjs/fly-babel","owner":"taskrjs","description":"Fly plugin for Babel","archived":false,"fork":false,"pushed_at":"2021-05-10T03:18:49.000Z","size":127,"stargazers_count":16,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T18:52:36.902Z","etag":null,"topics":["babel","fly"],"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/taskrjs.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":"2015-06-30T14:50:16.000Z","updated_at":"2023-12-19T17:49:54.000Z","dependencies_parsed_at":"2022-09-04T14:52:45.905Z","dependency_job_id":null,"html_url":"https://github.com/taskrjs/fly-babel","commit_stats":null,"previous_names":["bucaran/fly-babel"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-babel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-babel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-babel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrjs%2Ffly-babel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskrjs","download_url":"https://codeload.github.com/taskrjs/fly-babel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247926506,"owners_count":21019501,"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","fly"],"created_at":"2024-11-06T23:23:01.659Z","updated_at":"2025-04-10T08:30:59.695Z","avatar_url":"https://github.com/taskrjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"http://github.com/flyjs/fly\"\u003e\n    \u003cimg width=200px  src=\"https://cloud.githubusercontent.com/assets/8317250/8733685/0be81080-2c40-11e5-98d2-c634f076ccd7.png\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n# fly-babel [![][travis-badge]][travis-link]\n\n\u003e [Babel](http://babeljs.io) plugin for Fly.\n\n## Install\n\n```\nnpm install --save-dev fly-babel\n```\n\n## API\n\n### .babel(options)\n\nAll Babel options can be found [here](http://babeljs.io/docs/usage/options/). \n\n\u003e **Note:** For most cases, you only to think about `presets`, `plugins`, `sourceMaps`, `minified`, `comments`, and/or `babelrc`.\n\n#### options.preload\n\nType: `boolean`\u003cbr\u003e\nDefault: `false`\n\nAutomatically loads all babel-related plugins \u0026 presets from `package.json`. Will also auto-configure Babel to use these packages. See the [example](#preloading) for more.\n\n## Usage\n\n#### Basic\n\n```js\nexports.scripts = function * (fly) {\n  yield fly.source('src/**/*.js')\n    .babel({\n      presets: ['es2015']\n    })\n    .target('dist/js')\n}\n```\n\n#### Source Maps\n\nYou can create source maps for each file. \n\nPassing `true` will create an _external_ `.map` file. You may also use `'inline'` or `'both'`. Please see the [Babel options](http://babeljs.io/docs/usage/options/) for more information.\n\n```js\nexports.scripts = function * (fly) {\n  yield fly.source('src/**/*.js')\n    .babel({\n      presets: ['es2015'],\n      sourceMaps: true //=\u003e external; also 'inline' or 'both'\n    })\n    .target('dist/js')\n}\n```\n\n#### Preloading\n\nFor the especially lazy, you may \"preload\" all babel-related presets **and** plugins defined within your `package.json`. This spares you the need to define your `presets` and `plugins` values manually.\n\n\u003e **Note:** If you require a [complex configuration](http://babeljs.io/docs/plugins/#pluginpresets-options), you need to define that manually. While other plugins \u0026 presets will continue to \"preload\", your manual definitions will not be lost.\n\n```js\nexports.scripts = function * (fly) {\n  yield fly.source('src/**/*.js')\n    .babel({\n      preload: true,\n      plugins: [\n        // complex plugin definition:\n        ['transform-async-to-module-method', {\n          'module': 'bluebird',\n          'method': 'coroutine'\n        }]\n      ]\n    })\n    .target('dist');\n  //=\u003e after preloading:\n  //=\u003e   {\n  //=\u003e     presets: ['es2015'],\n  //=\u003e     plugins: [\n  //=\u003e       'transform-class-properties',\n  //=\u003e       ['transform-async-to-module-method', {...}]\n  //=\u003e     ]\n  //=\u003e   }\n}\n```\n\n## License\n\nMIT © [FlyJS](https://www.github.com/flyjs/fly)\n\n[travis-link]:  https://travis-ci.org/flyjs/fly-babel\n[travis-badge]: http://img.shields.io/travis/flyjs/fly-babel.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskrjs%2Ffly-babel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskrjs%2Ffly-babel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskrjs%2Ffly-babel/lists"}