italystrap / theme-json-generator
WordPress theme.json generator from a PHP array
Requires
- php: >=7.4
- composer-plugin-api: ^2.0
- ext-json: *
- brick/varexporter: ^0.3.8
- composer/composer: ^2.1
- italystrap/config: ^2.4
- italystrap/empress: ^2.0
- italystrap/finder: dev-master
- justinrainbow/json-schema: ^5.2
- mexitek/phpcolors: ^1.0
- phenx/php-font-lib: ^0.5.4
- sabberworm/php-css-parser: ^8.5
- scssphp/scssphp: ^1.12.1
- spatie/color: ~1.5.0
- symfony/event-dispatcher: ^5.4
- symfony/polyfill-php80: ^1.22
- webimpress/safe-writer: ^2.2
- webmozart/assert: ^1.11
Requires (Dev)
- codeception/module-asserts: ^1.0
- codeception/module-cli: ^1.0
- codeception/module-db: ^1.0
- codeception/module-filesystem: ^1.0
- codeception/module-phpbrowser: ^1.0
- codeception/util-universalframework: ^1.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- infection/codeception-adapter: ^0.4.1
- infection/infection: ^0.26.6
- italystrap/debug: dev-master
- lucatume/wp-browser: ^3.1
- phpbench/phpbench: ^1.2
- phpcompatibility/php-compatibility: *
- phpmetrics/phpmetrics: ^2.8
- phpspec/prophecy-phpunit: ^2.0
- rector/rector: ^0.19.0
- squizlabs/php_codesniffer: *
- symplify/easy-coding-standard: ^12.0
- vimeo/psalm: ^5.6
- wp-cli/wp-cli: ^2.7
This package is auto-updated.
Last update: 2024-10-05 13:42:23 UTC
README
WordPress Theme Json Generator: The OOP Way
Work in Progress: This project is experimental and currently in development. As we navigate through the 0.x.x versions, please note that API changes may occur. For understanding versioning, refer to the SemVer specification.
Project Vision: The aim is to revolutionize the way theme.json
files (and other *.json
files within the styles
folder) are generated because json sucks π (just kidding).
PHP offers the flexibility to divide configurations into multiple files, include comments, and generate dynamic content, overcoming the limitations of JSON.
Who is This For?
- Ideal for those seeking a more maintainable and predictable method to generate JSON files for WordPress themes.
- Perfect if you prefer writing your configurations once and reusing them efficiently.
Not Suited For:
- Users content with direct JSON file manipulation without the need for PHP generation.
- Those who believe this approach complicates the JSON generation process.
- Individuals comfortable managing extensive JSON configurations manually.
Explore With Us: Join us in exploring this CLI and WP_CLI tool for generating and validating JSON files for Block Themes, and see how it can streamline your development process.
Important Considerations for Developers:
This package is designed with the development phase in mind and should only be used for development purposes. For performance reasons, it is not recommended to use this tool in production environments. JSON files should be generated in advance during the development process and considered as a form of cache in your project. Generating these files on the fly in a production environment is strongly discouraged. Therefore, this package should not be used in production.
Extending Functionality with CLI Commands:
To enhance your development workflow, this package includes CLI commands that simplify the initialization, generation, and validation of JSON files. These tools are crafted to streamline the creation and management of your themeβs configuration, ensuring a smooth and efficient development process.
Table Of Contents
Installation
The best way to use this package is through Composer:
composer require italystrap/theme-json-generator --dev
This package adheres to the SemVer specification and will be fully backward compatible between minor versions.
Documentation
Changelog
Until the first stable version is released BC breaks may occur.
Contributing
All feedback / bug reports / pull requests are welcome.
License
Copyright (c) 2021 Enea Overclokk, ItalyStrap
This code is licensed under the MIT.