cron-eu/neos-monoclepreviewsite

Last activity 27 Jul 2020 308
composer require cron-eu/neos-monoclepreviewsite

1.0.4

Version
1.0.4
Type
neos-site
Release Date
Jul 27, 2020 10:32
Source
git
Distribution
zip
Requires
MIT 417217a15a6fb8eb438d5159d85fc91b7e23fe7a

Monocle Preview Site

This is simply an empty neos-site to be able to preview monocle styleguides provided in neos-packages.

Just require this package and you get:

  • Monocle dependency installed
  • Styleguides from your neos-packages rendered (else you get an exception about a missing site)
  • A routing from "/" to the monocle preview backend

Some pieces of this might be obsoleted in later versions of Monocle. See:

Usage in CI

You have a frontend neos-package and want to use Monocle in CI, this might help to get you started (instead of creating a dummy "base distribution").

Your package doesn't even need to require Monocle (as you won't need it in production anyway):

{
  "name": "vendor/your-frontend-package",
  "type": "neos-package",
  "require": {
    "neos/neos": "^4.3",
    "neos/fusion-afx": "^1.4",
    "packagefactory/atomicfusion-proptypes": "^1.3"
  },
  ...
  "scripts": {
    "post-cmds": [
      "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
      "rm -rf Packages/Application/CRON.DavPtaheute.Frontend && mkdir -p Packages/Application/ && ln -s ../../ Packages/Application/CRON.DavPtaheute.Frontend"
    ],
    "post-update-cmd": "@post-cmds",
    "post-install-cmd": "@post-cmds",
    "post-package-update": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
    "post-package-install": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
  }
}

Now you can do this in CI:

composer require "cron/neos-monoclepreviewsite"

And you will get a fully working Monocle installation ready to use.

The content of the readme is provided by Github
The same vendor provides 2 package(s).