Giter Site home page Giter Site logo

italystrap / theme-json-generator Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 8.0 1.95 MB

A WordPress theme.json generator from a PHP array

License: MIT License

PHP 97.72% Shell 0.15% Dockerfile 0.31% Makefile 1.83%
theme-json wordpress wordpress-theme gutenberg gutenberg-theme full-site-editing wordpress-php-library

theme-json-generator's Introduction

ItalyStrap Theme Json Generator

Tests Status Latest Stable Version Total Downloads Latest Unstable Version License PHP from Packagist

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

  1. Basic Usage
  2. Advanced Usage

πŸ†™

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.

Credits

Resources

theme-json-generator's People

Contributors

overclokk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

theme-json-generator's Issues

Search for slugs usage in template files and do something

The idea is to search in template files the preset slug usage, an example to be clear:

Let say that we start with a naming convention , for example a slug for a smaller font size "fontSize":"x-small", in this case the slug is x-small, if we want to chabge the name from x-small to xs we need a sistem to search in files and let us know where do we need to change the name, maybe doing a search and replace directly?

I have to think about this, but this will be only for development, not for production.

For db we can do this with wp-cli.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.