Download the PHP package bnomei/kirby3-plopfile without Composer

On this page you can find all versions of the php package bnomei/kirby3-plopfile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby3-plopfile

Kirby3 Plopfile

Release Downloads Twitter

Plopfile to generate and append to various files for Kirby3 CMS using Plop.js

What others (might have) said about this plugin

🤩
- K-nerd

Using generators is faster than grabbing and adjusting code from the official docs? Really? Awesome!
- Lasi Toiper

Finally a Kirby CLI on ploperoids with a gazzilion of appending generators.
- p10pa

I don't care how it works but it does! Unittests FTW.
- NewToThis

Commercial Usage


Support open source!

This plugin is free but if you use it in a commercial project please consider to sponsor me or make a donation.
If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?

Be kind. Share a little. Thanks.

‐ Bruno
 

M O N E Y
Github sponsor Patreon Buy Me a Coffee Paypal dontation Hire me

Installation

Plop.js (version 2)

Install Plop.js globally. Plop.js is simplified just glue code between inquirer prompts and handlebar templates.

or

NOTE: plop.js version 3 is not supported yet since all js files would need to be converted to ESM syntax.

Kirby Plugin

Plopfile for your project

Copy example.plopfile.js from the plugin directory to your project root.

Node dependencies

No node_module dependencies are included. To use this plugin run npm i or yarn in the plugin folder.

Usage

Use Plop to generate or append to files

Plop provides an interactive terminal UI. It let's you choose a generator and fill each prompt step by step.

But you can also trigger a generator and bypass some prompts. You can provide all prompts or choose to be prompted for some using _ as an value. Generators that create files need a target folder. The plugin tries its best to guess your setup using glob. When bypassing the folder-prompt you can use $ to default to your kirby root for that specific generator (like site/templates for plop template $).

Kirby Plugins index.php and Config files created using plop config/plop plugin can be appended with lots of Kirbys extensions. These generators have the prefix conf-/ext-. Some of them might require you to add a file to the plugin folder first before appending a reference to that file.

Usage of config- and ext- with existing files or when missing markers

When creating files with plop config or plop plugin the generator will add markers to identify the location to append extensions. To make config- and ext- generators work with files not created by plop you have to manually add these strings to the respective files. Do not be afraid. It's very simple. The markers adhere to the following pattern:

example for PHP files

example site/config/config.php

Autoloading of extensions

Some extensions can be autoloaded using the autoloader-for-kirby composer package. Once required with composer you add the autoloader for each extension type you want once and it will register all files in subfolders correctly. This might save you calling the most frequently used ext- plop generators again and again.

/site/plugins/example/index.php

Extending the plopfile

You can add custom code to your ./plopfile.js as inline code or using files with plop.load(). This allows you to add your own generators.

plopfile.js

Generators (60)

Roadmap (1)

Please create a new issue if you want to suggest an idea or discuss existing generators.

Bypassing prompts

⚠️ If you use plop to generate files but set generator extensions to none or cherry pick them manually you might be missing some markers. I'd recommend to stick to default or all as values for these when bypassing or just press enter (aka default) when using the interactive dialog. You can always add the markers manually later.

Examples

start interactive generator

start blueprint generator directly

blueprint with bypassed prompts (values forwarded from command line)

content with known parent and template but prompt for title

blueprint cloning

config with options from escaped json string

content with fields from json/yml file

file with template and sorting number

language with translations from json/yml file

plugin to add project specific extensions

create blueprint in plugin and "extend" the plugin index.php

snippet at /site/snippets with isset check for each key with fallback

create snippet in plugin folder and then register it as an extension to that plugin

template for laravel blade rendering

hook in plugin with todo comment

.env File

You can add variables to your .env file to customize the plugins behaviour.

clipboard

Kirby Roots

If you renamed a root the generator will not find it unless you set it in your .env file.

Scaffolding: Generating new projects with composer and plop

Kirby offers various installation methods from basic zip download to gitsubmodule and composer. Here is a new one using composer and plop.

generator-based composer project for public-storage setup

Run the following commands in your project root. Create composer.json file, alter it with jq, install Kirby and this plugin plus copying the plopfile to your project root folder.

Since I will be using tailwind and laravel mix in most of my projects I am calling yarn init as well. The setup generator will then automatically exclude the node_modules folder via the created .gitignore file based on the existence of the package.json file. But you could always add stuff like this later manually.

Then create the basic folder structure and core website files using generators.

Optionally you could add php libraries with default config files for Test Driven Development (TDD) or use a customizable docker-compose.yml to serve your project locally.

Major dependencies

No node_module dependencies are included. To use this plugin run npm i or yarn in the plugin folder.

Disclaimer

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.


All versions of kirby3-plopfile with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
getkirby/composer-installer Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bnomei/kirby3-plopfile contains the following files

Loading the files please wait ....