Wordless
A command line tool to help manage your Wordless-based WordPress sites.
Premise
This is a ruby-gem, so we expect you have already installed ruby; if it isn't the case, probably you'll like to take a look to RVM.
Wordless can't recognize if you are inside a wordpress' dirtree if you won't be in the root dir; so use it from the root dir. Easy peasy.
Installation
gem install wordless
Usage
wordless help
Tasks:
wordless clean # Clean static assets
wordless compile # Compile static assets
wordless deploy # Deploy your WordPress site using the deploy_command defined in your Wordfile
wordless help [TASK] # Describe available tasks or one specific task
wordless install # Install the Wordless plugin into an existing WordPress installation
wordless new [NAME] # Download WordPress in specified directory, install the Wordless plugin and create a Wordless theme
wordless theme [NAME] # Create a new Wordless theme NAME
new
Create a new Wordless-enabled WordPress site in directory mysite. This downloads the latest stable release of WordPress (you can also specify a locale):
wordless new mysite
or
wordless new mysite --locale=fr_FR
install
If you already have WordPress installed, you can install the Wordless plugin (this currently installs from the master branch on GitHub):
wordless install
theme
Once Wordless is installed, you can create a new Wordless theme:
wordless theme mytheme
Note: don't try at home to use wordless theme .: it won't work! So call it within
the wp-content/themes dir and pass a theme name as argument.
compile
Note: if you have no idea why the need to compile assets, you should read the Wordless' README.
Compile your site's static assets:
wordless compile
clean
Clean your compiled static assets:
wordless clean
deploy
Deploy your wordless installation using the deploy_command specified in your Wordfile:
wordless deploy
You can also use the refresh option -r to compile your assets before deploying and clean your assets after:
wordless deploy -r
Configuration
You can, optionally, create a Wordfile to customize the behaviour of wordless:
wordless_repo: 'git://github.com/welaika/wordless.git'
static_css:
- 'wp-content/themes/mytheme/assets/stylesheets/screen.css'
- 'wp-content/themes/mytheme/assets/stylesheets/print.css'
static_js:
- 'wp-content/themes/mytheme/assets/javascripts/application.js'
- 'wp-content/themes/mytheme/assets/javascripts/mobile.js'
deploy_command: 'wordmove push -t'
Caveats
- If you attempt to download a WordPress localization that's outdated, the latest English version will be downloaded instead.
- Only tested on Mac OS X
Running specs
bundle install && ./setup_tests && rspec
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Add some specs
- Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request