A small Neos/Flow development helper package that ships the Live.js script to auto‑reload changed assets while developing. In the Development context, this package registers livejs.js so that CSS/JS/HTML changes in the browser are detected and applied without manual refresh.
- Stack: PHP with Neos Flow/Neos CMS package (
type: neos-package). - Purpose: Provide Live.js during development to speed up frontend iteration.
- Main asset:
Resources/Public/JavaScript/live.js/livejs.js(MIT-licensed from https://livejs.com). - Wiring: Enabled via
Configuration/Development/Settings.KayStrobach.Backend.PageRenderer.yaml, which injects the JS file into the backend page renderer in Development context.
- Neos/Flow application (this repository is a Neos distribution).
- PHP and Composer compatible with the parent project.
- TODO: State the exact supported PHP and Neos/Flow versions (check root
composer.json).
- TODO: State the exact supported PHP and Neos/Flow versions (check root
This package is already part of the distribution under DistributionPackages/fucodo.live.
If you want to install it in another Neos/Flow project:
- Add the package (as a path repo or VCS) and require it via Composer so that it appears under
DistributionPackages/and is discovered by Flow.- TODO: Provide the Composer package name and repository URL if published (current
nameisfucodo/live).
- TODO: Provide the Composer package name and repository URL if published (current
- Ensure your application runs in
Developmentcontext to activate the provided settings.
-
Start your Neos/Flow application in Development context (e.g.
FLOW_CONTEXT=Development). -
Visit the application;
livejs.jswill be included automatically via the PageRenderer as configured here:# Configuration/Development/Settings.KayStrobach.Backend.PageRenderer.yaml KayStrobach: Backend: PageRenderer: Defaults: jsFiles: liveJs: file: 'resource://fucodo.live/Public/JavaScript/live.js/livejs.js' type: text/javascript section: footer forceOnTop: false async: false integrity: null defer: null crossorigin: null
-
Optional: Control what Live.js watches by adding a hash to the script URL (css/js/html). The stock
livejs.jssupports fragments like#css,#js,#html, and#css,notify. To change behavior, adapt the configuration above and append#cssetc. to thefilevalue.- Example:
resource://fucodo.live/Public/JavaScript/live.js/livejs.js#css
- Example:
- Composer scripts: none defined in this package (
composer.json). - NPM scripts: none in this package.
- Runtime entry point: the browser loads
Resources/Public/JavaScript/live.js/livejs.jsas configured.
- Context-dependent: The inclusion is only configured for the
Developmentcontext via the file underConfiguration/Development/.... - Environment variables: None specific to this package.
- Flow/Neos context: set
FLOW_CONTEXT=Development(or use the equivalent per your setup) to enable.
- This package does not contain automated tests.
- Manual verification:
- Run the app in Development.
- Open a page that includes the backend PageRenderer assets.
- Modify a local CSS or JS file; observe Live.js applying changes/reloading.
DistributionPackages/fucodo.live/
├─ Configuration/
│ └─ Development/
│ └─ Settings.KayStrobach.Backend.PageRenderer.yaml
├─ Resources/
│ └─ Public/
│ └─ JavaScript/
│ └─ live.js/
│ ├─ livejs.js
│ └─ license.txt
├─ composer.json
├─ license.txt
└─ README.md (this file)
- Namespace is configured for a
Classes/directory via Composer autoload PSR‑4 (fucodo\\live\\→Classes/), but no PHP classes are currently present. You can add PHP code underClasses/if needed. - The
Settings.KayStrobach.Backend.PageRenderer.yamlfile uses theresource://scheme to reference the public asset.
- The package is MIT-licensed (
composer.jsonspecifiesMIT). livejs.jsis MIT-licensed by Martin Kool and Q42; seeResources/Public/JavaScript/live.js/license.txt.
- Live.js does not load: Confirm you are in
Developmentcontext and that the PageRenderer configuration is active in your setup. - Conflicts with CSP or SRI: The configuration sets
integrity: nullandcrossorigin: null. If you use CSP/SRI, adjust accordingly.
- Document exact supported PHP and Neos/Flow versions for this distribution.
- Publish Composer installation instructions if this package is distributed outside this repository.
- Add tests or a simple health check if future functionality is added beyond asset delivery.