Manage and deploy your Typekit kits from the comfort of your own project.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
LICENSE
README.md
Rakefile
typedeploy.gemspec

README.md

Typedeploy

Manage and deploy your Typekit kits from the comfort of your own project.

cd ~/Project

vi Gemfile
# Add gem "typedeploy"

bundle install

vi Rakefile
# Add
# require 'typedeploy'
# require 'typedeploy/rake/typedeploytask'
#
# Typedeploy::Config.api_token = 'secrettoken'
# Typedeploy::Config.directory = File.dirname(__FILE__)
# Typedeploy::TypedeployTask.new


rake typekit:init

vi kits/example.yml
# edit as desired, be sure to change the default domain list

rake typekit:create
rake typekit:update

Then to use your example kit, do something like this

require 'rubygems'
require 'sinatra'
require 'typedeploy'

Typedeploy::Config.directory = File.dirname(__FILE__)

get "/" do
  erb <<-eos
    <script type="text/javascript" src="http://use.typekit.com/<%= Typedeploy::Config.kits['example'] %>.js"></script>
    <script type="text/javascript">try{Typekit.load({});}catch(e){}</script>
    <h1 class="tk-droid-serif">Test</h1>
    <h1>Control</h1>
  eos
end

Handling new versions

Say you decide that you want to redesign your site but you don't want to break your existing site. Easy. Just make your changes to kits/*.yml and

rake typekit:create
rake typekit:update

Brand new kits have been created for you to develop with and ultimately publish, that way when you deploy you know that your kits are exactly as you expect.

Notes

Be sure to check in your kits.yml and kits/*.yml files as they are now vital to the proper functioning of your project.

Contributing

  1. Fork typedeploy
  2. Create a topic branch - git checkout -b my_branch
  3. Run tests - rake test
  4. Push to your branch - git push origin my_branch
  5. Create an issue with a link to your branch
  6. That's it!