Skip to content

Make WP-Gizmo components compatible with WP Rig #1

Open
@jacklowrie

Description

@jacklowrie

Description

The following is from the original readme. Can be adapted for specs and documentation when the time comes

Using WP-Gizmo with WP Rig

Gizmo draws a lot of inspiration from WP Rig, and can be used in tandem with it. This is especially useful if you're building a fully custom WordPress install and want to stay organized from the get-go, or need to separate features from a Rig theme into a plugin. To do so on an individual project, you'll need to use git submodules, which are essentially nested repositories. Structuring a project this way, you can still take advantage of upstream improvements from both Rig and Gizmo, without needing to have multiple repositories for a single custom build.

Moving components from WP Rig to WP-Gizmo (and back again)

Because Gizmo's component class is modeled after Rig's component class, individual components can be moved back and forth relatively quickly -- it's as simple as updating the namespace registering the component, and (if you have any) adding any composer dependencies to your Gizmo. Adding components to Rig is largely the same, though at the time of writing Rig does not offer an easy way to include composer packages in it's bundled theme. This makes for a pretty good litmus test for where your code belongs: if you need a composer dependency for a component, chances are you're doing something that should probably go in a plugin anyway. If what you're doing doesn't require composer dependencies (and/or includes a lot of frontend assets), it may be better to put that component in a theme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions