{"id":36280994,"url":"https://github.com/nvan/php-babel-transpiler","last_synced_at":"2026-01-11T09:04:28.086Z","repository":{"id":57029425,"uuid":"326379318","full_name":"nvan/php-babel-transpiler","owner":"nvan","description":"An utility to easily transpile with Babel from PHP","archived":false,"fork":false,"pushed_at":"2021-01-03T13:45:20.000Z","size":4,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T18:51:02.001Z","etag":null,"topics":["babel","php","transpiler"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/nvan.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":"2021-01-03T10:22:29.000Z","updated_at":"2025-01-19T05:48:08.000Z","dependencies_parsed_at":"2022-08-23T17:30:15.814Z","dependency_job_id":null,"html_url":"https://github.com/nvan/php-babel-transpiler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nvan/php-babel-transpiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvan%2Fphp-babel-transpiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvan%2Fphp-babel-transpiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvan%2Fphp-babel-transpiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvan%2Fphp-babel-transpiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvan","download_url":"https://codeload.github.com/nvan/php-babel-transpiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvan%2Fphp-babel-transpiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28298878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T08:21:30.231Z","status":"ssl_error","status_checked_at":"2026-01-11T08:21:26.882Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","php","transpiler"],"created_at":"2026-01-11T09:04:27.328Z","updated_at":"2026-01-11T09:04:28.073Z","avatar_url":"https://github.com/nvan.png","language":"PHP","funding_links":["https://paypal.me/maduranma"],"categories":[],"sub_categories":[],"readme":"# NVAN PHP Babel Transpiler\n---\n## Introduction\nThis small library is made as an easy and clean way to transpile JS with Babel.\n\nThis is not a transpiler as is, it's just a way to call the CLI version of\nBabel.\n\n## How to use\nAfter installing the [dependencies](#dependencies), just use composer to include\nthe library into your project:\n```bash\n$ composer require nvan/php-babel-transpiler\n```\n\nThen, instance the class passing the folder in which the node modules are placed\nas the first argument.\n\nThen you can use the functions:\n- ```transpile``` to transpile a script passing a string\n- ```transpileFile``` to transpile a script passing the route to a file\n\nBoth functions will return the transpiled code as a string.\n\n**Full example:**\n```php\n\u003c?php\n// Autoload or include the class\n\nuse nvan\\BabelTranspiler\\Transpiler;\n\n$transpiler = new Transpiler('Path/To/Babel'); // Can be relative or absolute\n\n$transpiledString = $transpiler-\u003etranspile('class Test {}');\n$transpiledFile = $transpiler-\u003etranspileFile('Path/To/File.js');\n```\n\n## Dependencies\nIn order to use this library, you have to install:\n- Node.JS: https://nodejs.org/\n- Babel CLI (and Core) through npm: https://babeljs.io/docs/en/babel-cli\n\nBabel **should** be installed on a relative path for the project, inside or outside\nof it, but you can use an absolute path in any other place too.\n\n**OPTIONAL:** To run the tests of this repository, you have to install first the\n```package.json``` file found in ```/tests/BabelDirectory```:\n\nOn the root folder of this project do (both Windows, Linux and macOS):\n\n```bash\n$ cd tests/BabelDirectory\n$ npm install\n```\n\n## Support\nPlease consider placing an issue on this repository explaining the problem\nbefore sending me an email.\n\nIf you really need, you can do it: [mduran@nvan.es](mailto:mduran@nvan.es)\n\n## Contributions\nYou can do a Pull Request to contribute to this project.\n\nBare in mind that new features are not guatanteed to be added but error\ncorrections are probably instead.\n\n## Donate\nIf you'd like to help me improving this projects, buying new hardware or just\nbuying me a beer, you can donate via PayPal:\n[https://paypal.me/maduranma](https://paypal.me/maduranma)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvan%2Fphp-babel-transpiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvan%2Fphp-babel-transpiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvan%2Fphp-babel-transpiler/lists"}