grottopress / jentil Goto Github PK
View Code? Open in Web Editor NEWJentil is a modern framework for rapid WordPress theme development
License: MIT License
Jentil is a modern framework for rapid WordPress theme development
License: MIT License
Like I mentioned before in #1, I use Bedrock, although if I wasn't, and was using this package as a Composer dependency in another way, the issue would still be the same.
Requests for many of the resources give 404 errors. Specifically, these are the requests for resources that come from packages other than this one - dependencies of this theme, such as grottopress/wordpress-posts
. That's because, like I wrote in #3, the dependencies are no longer in the project's folder, but are children of the root project, and so there's no vendor
folder in the theme. Right now it's the request for vendor/grottopress/wordpress-posts/dist/styles/posts.min.css
that fails, but I imagine that the same will happen to any request that is made for a URL computed like this, e.g. using FileSystem#themeDir()
.
The only real solution that I know for this kind of problem is by using Puli. With this, you can have providers, such as the wordpress-posts
package, register resources, such as the posts.min.css
file, in the repository. Then consumers, such as jentil
, can enqueue that resource using a uniform URI, like wordpress-posts/css/posts.css
. Puli will resolve that URI to an actual file's URL, wherever that file is.
I might have tried to fix this in a child theme, but unfortunately your code doesn't use a DI container, so I can't just override things, especially since the constructor of Jentil
does not use IoC. In addition, the Jentil
class is final
and contains private
members, which further complicates matters. The only way would be to actually change the way that things are done - in this package and the dependencies like wordpress-posts
.
Hi,
Big advocate of doing things right. Saw that your theme complies with the coding standards and autoloading PSRs; the code is also better then all other themes that I've seen, and so I wanted to try it out.
Used Bedrock as part of my Scotch on Rocks project. To my surprize, the package type is default, instead of wordpress-theme
. This means that I cannot use the composer/installers
to install the theme into the correct directory. As a result, WordPress doesn't see the theme, and anyone using Bedrock - IMHO currently the best way to WordPress - cannot use your theme.
The docs mention that I can run composer run child
to use a child theme. However, this gives the following error:
Script "child" is not defined in this package
Which is true: nothing of this sort exists in composer.json
.
When using this package as a Composer dependency (which IMHO is the best way for any package), there is no vendor/autoload.php
relative to the theme - the autoload entry point is in the root project. This results in a fatal error, because the file is included unconditionally and with requre
. Thus, the theme is unusable as a dependency, such as with Bedrock - see #1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.