{"id":21937618,"url":"https://github.com/cap32/babel-plugin-shebang","last_synced_at":"2025-04-22T12:12:19.355Z","repository":{"id":46933693,"uuid":"93819136","full_name":"Cap32/babel-plugin-shebang","owner":"Cap32","description":"Replace or prepend shebang","archived":false,"fork":false,"pushed_at":"2022-12-09T08:16:34.000Z","size":226,"stargazers_count":4,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T12:12:13.354Z","etag":null,"topics":["babel","babel-plugin","bin","cli","comment","env","hashbang","node","replace","replace-comment","shebang","string","unix"],"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/Cap32.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-06-09T04:33:55.000Z","updated_at":"2023-11-10T12:52:08.000Z","dependencies_parsed_at":"2023-01-25T19:31:56.611Z","dependency_job_id":null,"html_url":"https://github.com/Cap32/babel-plugin-shebang","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Fbabel-plugin-shebang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Fbabel-plugin-shebang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Fbabel-plugin-shebang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Fbabel-plugin-shebang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap32","download_url":"https://codeload.github.com/Cap32/babel-plugin-shebang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237832,"owners_count":21397401,"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","babel-plugin","bin","cli","comment","env","hashbang","node","replace","replace-comment","shebang","string","unix"],"created_at":"2024-11-29T01:20:48.024Z","updated_at":"2025-04-22T12:12:19.315Z","avatar_url":"https://github.com/Cap32.png","language":"JavaScript","readme":"# babel-plugin-shebang\n\n[![Build Status](https://travis-ci.org/Cap32/babel-plugin-shebang.svg?branch=master)](https://travis-ci.org/Cap32/babel-plugin-shebang) [![CircleCI](https://circleci.com/gh/Cap32/babel-plugin-shebang.svg?style=shield)](https://circleci.com/gh/Cap32/babel-plugin-shebang)\n[![Coverage Status](https://coveralls.io/repos/github/Cap32/babel-plugin-shebang/badge.svg?branch=master)](https://coveralls.io/github/Cap32/babel-plugin-shebang?branch=master)\n[![License](https://img.shields.io/badge/license-MIT_License-brightgreen.svg?style=flat)](https://github.com/Cap32/babel-plugin-shebang/blob/master/LICENSE.md)\n\nReplace or prepend [shebang](\u003chttps://en.wikipedia.org/wiki/Shebang_(Unix)\u003e).\n\nUseful to write `#!/usr/bin/env ./node_modules/.bin/babel-node` modules in development env, and compile to `#!/usr/bin/env node` in production env.\n\n## Installation\n\n```sh\n$ npm install babel-plugin-shebang\n```\n\n## Example\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"shebang\"]\n}\n```\n\n**input**\n\n```js\n#!/usr/bin/env ./node_modules/.bin/babel-node\nconsole.log(\"awesome\");\n```\n\n**output**\n\n```js\n#!/usr/bin/env node\nconsole.log(\"awesome\");\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\n    [\n      \"shebang\",\n      {\n        \"replacement\": \"#!/usr/bin/env node\",\n        \"force\": false\n      }\n    ]\n  ]\n}\n```\n\n### Options\n\n- `replacement` (String): Defaults to `#!/usr/bin/env node`\n- `force` (Boolean): Force prepend shebang. Defaults to `false`\n\n### Via CLI\n\n```sh\n$ babel --plugins shebang script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"shebang\"]\n});\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap32%2Fbabel-plugin-shebang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap32%2Fbabel-plugin-shebang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap32%2Fbabel-plugin-shebang/lists"}