Download the PHP package rpurinton/phpack without Composer
On this page you can find all versions of the php package rpurinton/phpack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rpurinton/phpack
More information about rpurinton/phpack
Files in rpurinton/phpack
Package phpack
Short Description A tool to modularize and compile PHP and HTML components.
License MIT
Informations about the package phpack
PHPack
PHPack is a powerful tool designed to help you modularize and compile your PHP and HTML components into a single, optimized PHP file. This enhances the organization and maintainability of your web projects.
Features
- Modular Design: Break down your web pages into reusable components for better code management.
- JSON Configuration: Define your page structure using intuitive JSON files.
- Automatic Compilation: Seamlessly compile your components into a single PHP file for easy deployment.
Installation
Via Composer (Recommended)
To install PHPack using Composer, simply run:
This will make the phpack
command available globally, allowing you to use it in any project.
Manual Installation
If you prefer to install PHPack manually, you can clone the repository and set up the executable:
Usage
- Create Your Components: Organize your PHP and HTML components in the
parts
directory. - Define Page Structure: Use JSON files in the
pages
directory to define the structure of your web pages. - Run PHPack: Execute the
phpack
script to compile your pages.
Example
Directory Structure
Here's an example of how you can structure your project:
JSON Example
home.json
The above example would result in the creation of:
You can use the public
folder as your web root for your web server. A part can be either .html
, .php
, text/html, or another .json
file that includes more parts.
License
This project is licensed under the MIT License.
Contributing
We welcome contributions from the community! Feel free to submit issues or pull requests.
Contact
For more information, please contact Russell Purinton.