-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Should we move the assets directory? #89
Comments
I'm a fan of this. I used the boilerplate for my first public plugin, and I admit - I was confused by the location of the assets directory. It makes more sense to me for it to be above the directory of the plugins files. However, I also see your point about how moving it to the root places it with the Since not everyone uses |
That makes sense. I think I may hold off on doing that until the version after this one is released. A lot of new work has done into this particular release, and I don't want to rework everything to catch users off guard; however, I'll probably be kicking this to a |
See, I find putting js and css at the root level is weird... I use assets for all my static assets: js, css, img, etc. why not move them into assets and leave the folder structure the same? |
This would end up with the following Subversion directory structure:
Which may be okay, but I don't know if that's the most common convention. I've typically seen I'm not against eventually implementing this, but I'd also like the gather some feedback from others, as well. |
I think that structure looks great. I've seen |
Per default most frameworks name that folder |
I like the idea of standardizing a way to handle this; however, when I look at other open-source Automattic projects - like Underscores - they do not do this. So we're left to make a decision on if we want to deviate from the way things like this are typically done, or stick what's with more generally practiced. I'm on the fence about it so am all for continuing this discussion. |
I would say for _s it does not make sense to have an assets folder as there is only a js folder that would go in there. Allot of plugin do not use the assets folder normally they do have all three folders. WooCommerce, EDD and Crowedfunding are some that do use the assests folder. I like to have as little file in the root as possible. I find it cleaner but it is only a personal feeling. |
The world turns. Even without Automattic. :) I honestly don't care how they do stuff, as they're no reference to me. I thought about simply naming it like the package managers do, but npm uses What I'd suggest to avoid is divding stuff into I got no opinion on |
I was browsing the codex to see what it uses in its examples, eg. for wp_enqueue_js, given that developers new to WordPress would look there first, but to no avail :) Usually I prefer to have |
I really like @franz-josef-kaiser's thought. Though, I don't really use a lot of those frameworks, so it doesn't affect me to much. Something I'm hearing a ton is that everyone has their own way of doing things, which seems to be "the WordPress way." However, that doesn't necessarily make it the best way. Other projects like rails and such are far more opinionated than WP is and use widely accepted best practices. I think this is an opportunity to set a best practice for WP, or at the very least an opinionated best practice. Thoughts? |
I'm a fan of opinionated development - it's one of the things that drew me to Rails years ago; however, I'm not sure I'm of the same opinion that At least not yet. @franz-josef-kaiser's thought on Automattic is true, but @barryceelen brings up the point that a lot of new-ish developers are often going to use references that already exist - like Underscores, the Codex, and other plugins - many of which do not currently use an For the time being - at least for this version (which is shaping up to be |
For All other assets (such as images, JavaScript, CSS, etc.) are contained within directories for their respective areas of the site (like the Dashboard, etc.). |
At this point, I'm interested in moving the
assets
directory above the root of the plugin directory.This is the follow the new practices of the WordPress Theme repository (as @garyj) has pointed out not long ago.
The typical Subversion repository structure is:
assets
branches
tags
trunk
As far as I'm concerned,
plugin-name
is analagous to thetrunk
directory, so this means thatassets
should be moved up one level; however, this places the directory with thechangelog
and theREADME
which doesn't make sense.Instead, it feels almost like we should create a
trunk
directory of sorts, but I'm looking for some additional input on how to best handle this.The text was updated successfully, but these errors were encountered: