Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WP-Gizmo components compatible with WP Rig #1

Open
jacklowrie opened this issue Aug 2, 2020 · 1 comment
Open

Make WP-Gizmo components compatible with WP Rig #1

jacklowrie opened this issue Aug 2, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@jacklowrie
Copy link
Owner

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.

@jacklowrie jacklowrie added the enhancement New feature or request label Aug 2, 2020
@jacklowrie jacklowrie added this to the v0.4 Autoloading milestone Aug 2, 2020
@jacklowrie jacklowrie assigned jacklowrie and unassigned jacklowrie Aug 2, 2020
@jacklowrie
Copy link
Owner Author

Autoloader added in 0a27a55.

After further reading, git submodules seem confusing/messy. Better not to go there in the docs yet, but making components compatible is very within reach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant