PHPackages                             rocket/script - 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. rocket/script

AbandonedArchivedLibrary

rocket/script
=============

Enqueue scripts, take control of your Javascript

0174JavaScript

Since Nov 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/RocketPropelledTortoise/Script)[ Packagist](https://packagist.org/packages/rocket/script)[ RSS](/packages/rocket-script/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Script queueing
===============

[](#script-queueing)

[![Latest Version](https://camo.githubusercontent.com/d4f88a5373fd4da7d8fa38c93f9532882e074a54bb801858a7c09c436eef4af1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f526f636b657450726f70656c6c6564546f72746f6973652f75692e7376673f7374796c653d666c61742d737175617265)](https://github.com/RocketPropelledTortoise/ui/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/rocket/ui/blob/master/LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c25656d7f3fa70ada147df56604d84fa939fa226be9745693d8cc41c7b26dbde/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f526f636b657450726f70656c6c6564546f72746f6973652f55492f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/RocketPropelledTortoise/UI)[![Coverage Status](https://camo.githubusercontent.com/165441e893908c62eaa652eb7b282ab17c678fcbdfc34857b98c59427d10cf4c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f526f636b657450726f70656c6c6564546f72746f6973652f55492e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rocket/ui/code-structure)[![Quality Score](https://camo.githubusercontent.com/30e01ae0bff15a484721b5a49c3b4927db27032e2c34bd1438a55c68b1ebcc64/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f526f636b657450726f70656c6c6564546f72746f6973652f55492e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rocket/ui)[![Total Downloads](https://camo.githubusercontent.com/f21285fd9291e6289fdd1ec062f7c20fa4d596ead1be81fefce3ecde3b718165/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f636b65742f75692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rocket/ui)

In modern web applications, script execution should be done at the end of a page's loading. This class is a very simple wrapper for this: queue scripts and render them when needed

Install
-------

[](#install)

Via Composer

```
$ composer require rocket/script
```

### Service Provider

[](#service-provider)

`\Rocket\UI\Script\Support\Laravel5\ServiceProvider`

### Middleware

[](#middleware)

(App\\Http\\Kernel.php)

`\Rocket\UI\Script\Support\Middleware\ScriptMiddleware`

Usage
-----

[](#usage)

```
JS::ready(' console.log("you\'re a wizard, Harry!"); ');
JS::ready(' console.log("Dobby is freeeee!"); ');
```

Will produce

```

$(function() {
    console.log("you're a wizard, Harry!");

    //---

    console.log("Dobby is freeeee!");
});

```

Testing
-------

[](#testing)

All the tests live in the [main project](https://github.com/rocket/ui).

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/rocket/ui/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Stéphane Goetz](https://github.com/onigoetz)
- [All Contributors](https://github.com/RocketPropelledTortoise/:package_name/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/rocket/ui/blob/master/LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7766264b40bb3a40b9b2ac847b67135c59e774807a6d1e313758efcd8203603f?d=identicon)[onigoetz](/maintainers/onigoetz)

---

Top Contributors

[![onigoetz](https://avatars.githubusercontent.com/u/309594?v=4)](https://github.com/onigoetz "onigoetz (16 commits)")

### Embed Badge

![Health badge](/badges/rocket-script/health.svg)

```
[![Health](https://phpackages.com/badges/rocket-script/health.svg)](https://phpackages.com/packages/rocket-script)
```

PHPackages © 2026

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