Closed etienne closed 12 years ago
This is an excellent idea, and a nice time saver when starting new WordPress projects. Another nice feature would be the ability to specify plugins to use in the project. Maybe something like:
wordless new mysite -p plugin-one,plugin-two,plugin-three
where plugin-[one|two|three]
are the slug names of plugins on the WordPress plugins repository, such as simple-fields
or options-framework
. These plugins would then be downloaded, unzipped and placed in the plugins directory inside wp-content.
Don't you think that making it a gem can send away some wordpress theme writers? Personally that will make my life easier , but I'm used to gems beacuse I'm also a rails developer I don't know if wordpress developer would like a gem... That do you think about?
The gem would be a separate project and entirely optional. You could still download the plugin on its own and use it the usual way. It would just be a useful timesaver for those who are comfortable with it.
I agree with @emzo's suggestion re: plugin installation.
For existing WordPress installations, there could also be a command like wordless install mysite
which would install the plugin, create a Wordless theme called mysite
, and configure config/initializers/wordless_preferences.php
.
This is definitely a great idea, anyone wants to start writing this? :)
I've never written a gem, but I'm willing to try. Maybe somebody can create a welaika/wordless_gem repo and I'll fork that?
Well, since you're writing the code, feel free to open a repo with your account, I'll watch it!
OK, sure. Here goes (empty repo for now): https://github.com/etienne/wordless_gem
super cool, keep it up @etienne! if you need help, don't esitate to contact me :)
this is an awesome idea. i'd love this.
Development of the gem is underway (see https://github.com/etienne/wordless_gem, or type gem install wordless
). The next feature I plan to implement, though, is wordless compile
to compile static assets, and I'm unsure about how to implement it. I'd like some input from the Wordless developers on the best way to implement this.
Should I write a small PHP script that calls the plugin's preprocessors, or should I just directly compile the assets through Compass and Sprockets, and bypass the preprocessors in the Wordless plugin? Ideas and tips would be appreciated.
Just tried it, freaking cool @etienne ! I'll discuss this problem with the others in @welaika, and let you know ASAP. Thanks for your great work!
Nice work @etienne - this is excellent!
Please see https://github.com/welaika/wordless/blob/master/wordless/wordless.php#L110 We've added this method that should be what you're looking for :)
It basically searches for any asset (not starting with an underscore) inside the theme/assets
directory, and compiles them into the assets
directory with the extension changed to the correct one.
Great! Looks exactly like what I need, thanks. I'll let you know how that works out.
Ok, today I discussed with @stefanoverna about the deploy process and how to automate it, and we reach this conclusion: is not the wordless gem which have to handle deploy..
In your first post you state:
wordless deploy production: Compile assets and deploy using Wordmove (or some other mechanism)
Deploying via this method would oblige developers to use a limited number of deploy mechanisms ( wordmove, capistrano, bash or everything you can think about that must be integrated in the gem in some way ). We have tought that the best way would be to call simply wordless compile
from other deploy sistems instead of calling deploy sistems from the gem. In this way wordless gem would not handle the deploy, and every mechanism could implements it's way to deploy a wordless theme/wordpress installation.
Personally I think that make other sistems handle deploy can make life easier to developers, making wordless gem more usable and making deploy more manageable.
Do you agree on this?
( Meanwhile, is it clear? I hope that the english I used to explain this was clear enough... :) )
Deployment is one feature I wasn't too sure about, I was just throwing the idea around. Maybe it's indeed something best left to the individual developers, your argument makes sense.
Closing this as the gem now exists. Further discussion should happen in the gem's repo: https://github.com/etienne/wordless_gem
I think a Wordless gem would simplify many operations and bring a healthy dose of Rails culture to WordPress development.
Some example tasks I would propose:
wordless new mysite
config/initializers/wordless_preferences.php
wp-content/themes/mysite/theme/tmp/*
)Some other possible stuff:
wordless new mysite -c less
: Preconfigure the theme with the LESS preprocessor, see #58wordless new mysite -v php
: Use PHP views instead of Haml views in the generated themewordless new mysite --edge
: Use master branch of Wordless instead of latest stablewordless compile
: Compile static assets (see #59)wordless deploy production
: Compile assets and deploy using Wordmove (or some other mechanism)Any thoughts?