PHPackages                             talyssonoc/php-babel-transpiler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. talyssonoc/php-babel-transpiler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

talyssonoc/php-babel-transpiler
===============================

Transform JavaScript with Babel from PHP

v0.1(10y ago)351828[1 PRs](https://github.com/talyssonoc/php-babel-transpiler/pulls)MITPHP

Since Aug 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/talyssonoc/php-babel-transpiler)[ Packagist](https://packagist.org/packages/talyssonoc/php-babel-transpiler)[ RSS](/packages/talyssonoc-php-babel-transpiler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

PHP Babel Transpiler
====================

[](#php-babel-transpiler)

[![Build Status](https://camo.githubusercontent.com/b6a88cdf986a49d2f7b92721f741178fad7d37b0458593c44c296612d6666018/68747470733a2f2f7472617669732d63692e6f72672f74616c7973736f6e6f632f7068702d626162656c2d7472616e7370696c65722e737667)](https://travis-ci.org/talyssonoc/php-babel-transpiler)

Transform JavaScript with [Babel](https://babeljs.io/) from PHP.

Installation
------------

[](#installation)

### V8Js dependency

[](#v8js-dependency)

It's important to know that `php-babel-transpiler` has a dependency of the [v8js](https://pecl.php.net/package/v8js) PHP extension.

You can see how to install it here: [how to install V8Js](https://github.com/talyssonoc/react-laravel/blob/master/install_v8js.md).

### Composer

[](#composer)

```
  php composer.phar require talyssonoc/php-babel-transpiler
```

Usage
-----

[](#usage)

```
  $transpiledCode = Babel\Transpiler::transform('class MyClass {  }');
  $otherTranspiledCode = Babel\Transpiler::transformFile('/my/Class.js', [ 'blacklist' => [ 'useStrict' ] ]);
```

API
---

[](#api)

- `Babel\Transpiler::transform($sourceCode, $babelOptions)`: Transpile the given source code, passing the given options to Babel, and return the transformed code.
- `Babel\Transpiler::transformFile($filePath, $babelOptions)`: Transpile the file with the given **absolute** path, passing the given options to Babel, and return the transformed code.

License
-------

[](#license)

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3931d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/273001c8ba47c4bbee4d7bf6c549a5ba2cfbae86e321d53f528b9e525fc175c1?d=identicon)[talyssonoc](/maintainers/talyssonoc)

---

Top Contributors

[![talyssonoc](https://avatars.githubusercontent.com/u/4325587?v=4)](https://github.com/talyssonoc "talyssonoc (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/talyssonoc-php-babel-transpiler/health.svg)

```
[![Health](https://phpackages.com/badges/talyssonoc-php-babel-transpiler/health.svg)](https://phpackages.com/packages/talyssonoc-php-babel-transpiler)
```

###  Alternatives

[talyssonoc/react-laravel

Package to use ReactJS with Laravel

8944.9k](/packages/talyssonoc-react-laravel)[stuttter/wp-user-profiles

A sophisticated way to edit users in WordPress

11219.3k1](/packages/stuttter-wp-user-profiles)[fof/analytics

Tracks analytics using Google Analytics, Google Optimize/GTM and Matomo

3543.1k](/packages/fof-analytics)[chrico/wp-fields

Package which provides some re-usable fields for WordPress.

1981.2k](/packages/chrico-wp-fields)[aertmann/history

An improved history backend module for Neos

1070.2k](/packages/aertmann-history)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
