Browse Source

Add and document basic rakefile

dev
Andy Meneely 11 years ago
parent
commit
04783ef8de
  1. 1
      CHANGELOG.md
  2. 13
      README.md
  3. 3
      Rakefile
  4. 7
      lib/squib/project_template/Rakefile

1
CHANGELOG.md

@ -1,6 +1,7 @@
# Squib CHANGELOG
* Added `showcase` feature to create a fancy-looking 3D reflection to showcase your cards. Documented, tested, and added a sample for it.
* Added a basic Rakefile, documented in README.
## v0.1.0
* Added `save_sheet` command that saves a range into PNG sheets, complete with trim, gap, margin, columns, and sometimes automagically computed rows. See samples/saves.rb.

13
README.md

@ -76,6 +76,7 @@ About the other files:
* `_output` is the directory where your built files will go. Can easily be changed, of course.
* `.gitignore` and `gitkeep.txt` are for if you are using Git. See {file:README.md#Source_control Source control}. (Feel free to remove these if you are not using Git.)
* `ABOUT.md` and `PHP NOTES.md` are Markdown files for posting. Not used by Squib, but there by convention.
* `Rakefile` is a basic build file. Not required but handy - see {file:README.md#Rakefile Rakefile}
# Learning Squib
@ -309,6 +310,18 @@ If you want to make a deck that has some portrait and some landscape cards, I re
{include:file:samples/portrait-landscape.rb}
## Rakefile
New Squib projects come with a basic Rakefile. At this stage, it's basically just a shortcut for `ruby deck.rb` or whatever. But, even so this Rakefile has some advantages:
* If you're in a subdirectory at the time, `rake` will simply traverse up an `cd` to the proper directory so you don't get rogue `_output` directories
* If you find yourself building multiple decks, you can make your own tasks for each one individually, or all (e.g. `rake marketing`)
* Don't need the `require squib` at the top of your code (although that breaks `ruby deck.rb`, so it's probably a bad idea)
Here's what's included in a `squib new` command:
{include:file:lib/squib/project_template/Rakefile}
# Development
Squib is currently in pre-release alpha, so the API is still maturing. I do change my mind about the names and meaning of things at this stage. If you are using Squib, however, I'd love to hear about it! Feel free to [file a bug or feature request](https://github.com/andymeneely/squib/issues).

3
Rakefile

@ -2,9 +2,10 @@ require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yard'
RSpec::Core::RakeTask.new(:spec)
task default: [:install, :spec]
RSpec::Core::RakeTask.new(:spec)
YARD::Rake::YardocTask.new(:doc) do |t|
t.files = ['lib/**/*.rb', 'samples/**/*.rb'] # optional
#t.options = ['--any', '--extra', '--opts'] # optional

7
lib/squib/project_template/Rakefile

@ -0,0 +1,7 @@
require 'squib'
task default: [:deck]
task :deck do
load 'deck.rb'
end
Loading…
Cancel
Save