Code Monkey home page Code Monkey logo

rejigger-laravel's Introduction

Rejigger

Rest your refresh button

Description

Rejigger allows you to develop with Laravel without using the refresh button so often. All you have to do is enable it and watch your updates happen instantaneously.

Rejigger inserts a little JavaScript at the end of the Laravel response. The JavaScript uses AJAX to ask Rejigger occasionally if the response - or any of its <script>, <link>, or <img> assets - has changed.

If one has, the Rejigger script requests a page reload.

Installation

Install the bundle

php artisan bundle:install rejigger

Add something like this to application/bundles.php

return array(
	'rejigger' => array(
        'auto' => true,
        'handles' => 'rejigger',
	),
);

Configuration

Rejigger's settings are in (:bundle)/config/settings.php.

Rejigger can be configured to poll more or less frequently - e.g. every 5 seconds:

return array('update_milliseconds' => 5000);

Or to only run in the 'local' environment - as determined by the 'LARAVEL_ENV' environment variable:

return array('environments' => array('local'));

By default, Rejigger runs on all environments, so removing the 'environments' option does NOT turn it off. To disable it entirely:

return array('environments' => array());

The default settings for Rejigger allow it to update every second and run in all environments:

return array(
    'update_milliseconds' => 1000,
    'environments'        => array(
        '*',
    ),
);

License

MIT license - http://www.opensource.org/licenses/mit-license.php

rejigger-laravel's People

Contributors

joecwallace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xtwoend

rejigger-laravel's Issues

Exclude /docs/ route

With Regigger enabled it is impossible to use local documentation for Laravel because of constant refresh.

Infinit refresh loop

With this config I get infinit refresh loop. The browser makes few requests per second. Can this be related to the new version of Laravel, or am I just doing something wrong?

return array(
    'update_milliseconds' => 5000,
    'environments' => array(
        'development',
    ),
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.