A prototype generator to quickly generate prototypes based on Neos nodetype definitions.

Overview

UpAssist.PrototypeGenerator

What does this package do?

This package lets you create scaffolding for prototypes for Neos using the commandline.

Why did you make this?

Working with an Atomic setup in Neos often requires creating quite some files for a single NodeType.

Fusion files, CSS files and sometimes specific JS files as well.

While working with templates like textExpander or livetemplates in PhpStorm, still creating the files takes up some time.

Not anymore! 😃

⚙️ How to install

Simply run the composer command to install the package.

composer require-dev upassist/prototypegenerator

How to setup

🚀 Quick Setup

Copy the following Settings and set your defaults:

UpAssist:
  PrototypeGenerator:
    # Set a default packageKey and you don't have to write the full `Vendor.Package` prefix every time  (but you still can) (optional)
    packageKey: ''
    # Folder structure (in array format) leading to your package
    packageParentFolder: ['DistributionPackages']
    # The rendering prototypes
    # For document, content and collection you can list the additional prototypes to render
    rendering:
      document:
        - template
      content:
        - organism
        - molecule
        - atom
      collection:
        - organism
        - molecule
        - atom
    # List of types you also want to create a CSS file
    renderCSS: [ 'template', 'organism', 'molecule', 'atom' ]
    # List of types you also want to create a JS file
    renderJS: [ 'organism' ]
    # The file extension used for rendering the CSS file (i.e. `css`, `scss`, `sass`, `less`)
    cssExtension: 'css'
    # The file extension used for rendering the JS file (i.e. `js`, `jsx`)
    jsExtension: 'js'
    # The name for your extendedRenderer (optional, but required in the default setup since the default templates use this)
    extendedRenderer: ''

👉🏻 Advanced Setup

Take a look at all the Settings where you can set defaults for how you would like to render your prototypes, change the inheritance and more.

📘 How to use

There are a couple of commands at your disposal:

Command Params Example
generator:prototype --nodeType ./flow generator:prototype Content.TextWithImage
generator:atom --prototypeName ./flow generator:atom Text
generator:molecule --prototypeName ./flow generator:molecule TextWithImage
generator:organism --prototypeName ./flow generator:organism TextWithImage
generator:template --prototypeName ./flow generator:template Article
generator:extendedrenderer --prototypeName ./flow generator:extendedrenderer Vendor.Package:ExtendedRenderer

💡 All commands support the --force parameter to overwrite files that are already created.

💡 You can use the full name of your prototype, and if you set a packageKey in the settings, you can omit it here. (I.e. Neos.NodeTypes:Content.Text becomes Content.Text)

💡 Nice to know

  • The default templates add a @Todo in the generated files (you can modify this in the Settings) allowing you to use your IDE to see what you still must implement, probably best to remove it after you are done.
  • You can modify the default templates to your liking using sprintf syntax to substitute strings; the settings show you what you can use.
  • You can modify one or multiple templates. Or none if you like the defaults.
  • This is build with atomic fusion use in mind, but should be possible to be used without that.
  • Did I mention the generator created the content prototype and all atomic parts as well if you want it to? 😎

⚠️ Warning #1

At this point determination of either Document, ContentCollection or Content types is done by the nodename, which will be changed in an upcoming version to look at the superType instead. Using this package now means you have to name your nodeType like this:

  • Vendor.Package:Document.Page
  • Vendor.Package:Content.Text
  • Vendor.Package:Collection.Section | Vendor.Package:ContentCollection.Section

🧠 Thought about but not yet implemented...

  • Generate XLIFF files for all nodeTypes and defined language dimensions #3
  • Implement more defaults for properties #2
  • ...

🤔 Afterthought...

This really was not meant to be ready and could probably be better thought through. However, it works pretty decent for the setup I work with and am very happy with the amount of time saved using this tool. I really hope it makes your Neos development life easier and welcome pull requests of course 😊

Thanks for reading this far and if you like it, let me know 🙂 .

Henjo

You might also like...
Generate dummy API endpoints from a simple PHP array.

Laravel Fake API Create placeholder API endpoints from a simple PHP array. LFA utilizes Faker for dummy data. Inspired by JSON Server. Installation To

Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes
Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes

InfyOm Laravel Generator Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes. Docum

A helper method to generate absolute asset URL's to Vite assets

Laravel vite() helper method A super simple Laravel helper to fill the void that Laravel Mix left. Mix had a helper, aptly named mix() that would retu

A @laravel based RAD platform for back-office applications, admin/user panels, and dashboards.
A @laravel based RAD platform for back-office applications, admin/user panels, and dashboards.

For the full documentation, visit orchid.software. Introduction Orchid is a free Laravel package that abstracts standard business logic and allows cod

Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS.
Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS.

Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS. It comes with nginx, Mysql, multi PHP-FPM versions, multi users, Supervisor, Composer, npm, free Let's Encrypt certificates, Git deployment, backups, ffmpeg, fail2ban, Redis, API and with a simple graphical interface useful to manage Laravel, Codeigniter, Symfony, WordPress or other PHP applications. With Cipi you don’t need to be a Sys Admin to deploy and manage websites and PHP applications powered by cloud VPS.

A PHP based membership (registration/login) code

Simple Registration/Login code in PHP Read more:PHP registration form PHP login form Installation Edit the file membersite_config.php in the includes

An account management Panel based on Laravel7 framework. Include multiple payment, account management, system caching, admin notification, products models, and more.

ProxyPanel 简体中文 Support but not limited to: Shadowsocks,ShadowsocksR,ShadowsocksRR,V2Ray,Trojan,VNET Demo Demo will always on dev/latest code, rather

Gestor de Contraseñas basado en Laravel 8 + PHP 8 + MySQL 8. Self-hosted Password Manager based on Laravel 8 + PHP 8 + MySQL 8.
Gestor de Contraseñas basado en Laravel 8 + PHP 8 + MySQL 8. Self-hosted Password Manager based on Laravel 8 + PHP 8 + MySQL 8.

English Gestor de Contraseñas Esta aplicación permite una gestión completa de contraseñas para múltiples tipos de servicios (web, ssh, teléfonos, wifi

CodeIgniter 4-based application skeleton

Bonfire 2 Just getting started. More details at Patreon What is Bonfire? Bonfire will be a robust application skeleton for CodeIgniter 4-based applica

Releases(0.2.0)
Owner
UpAssist
UpAssist
This is a skeleton to quickly set up a new Slim 4 application.

Slim 4 Skeleton This is a skeleton to quickly set up a new Slim 4 application. Requirements PHP 7.4+ or 8.0+ MySQL 5.7+ or MariaDB Recommended Apache

Daniel Opitz 376 Jan 2, 2023
Quickly build an admin interface for your Eloquent models

Website | Documentation | Add-ons | Pricing | Services | Stack Overflow | Reddit | Blog | Newsletter Quickly build an admin interface for your Eloquen

Backpack for Laravel 2.5k Jan 6, 2023
Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Slim Framework 1.5k Dec 25, 2022
Basic Crud Generator (With Code Files, like GII (YII2)) Using Laravel, Livewire and Tailwind CSS

LiveCrud Live Crud Generator. This package generates Basic Crud with Livewire. Features Generate Complete Crud With Livewire Component and Blade Files

Ritesh Singh 28 Oct 12, 2022
Laravel CRUD Generator, Make a Web Application Just In Minutes, Even With Less Code and fewer Steps !

?? CRUDBOOSTER - Laravel CRUD Generator Laravel CRUD Generator, Make a Web Application Just In Minutes, Even With Less Code and fewer Steps ! About CR

Crocodic Studio 1.7k Jan 8, 2023
Project skeleton generator for Laravel & Lumen projects

Skeletor Skeletor is a PHP based CLI tool that has been built to take away the pain of setting up a base project skeleton for Laravel & Lumen projects

Wouter 39 Oct 4, 2022
🚀 A quickstart generator for Laravel projects

?? Initializer for Laravel Initializer for Laravel takes a visual, approach to setting up a new Laravel project. Fill out the form, choose the compone

Niclas van Eyk 59 Oct 12, 2022
Laravel static site/blog generator with markdown support.

Katana static site & blog generator PHP static site & blog generator with markdown support. Using the power of laravel's Blade templating engine. Kata

Mohamed Said 380 Sep 3, 2022
This package provides an artisan command to generate a basic crud with Restful API support

NHRROB Crud Generator Package This package provides an artisan command to generate a basic crud composer install command: composer require nhrrob/crud

Nazmul Hasan Robin 22 Jun 24, 2022