Skip to content

Instantly share code, notes, and snippets.

@ahawkins
Created July 20, 2012 16:21
Show Gist options
  • Save ahawkins/3151658 to your computer and use it in GitHub Desktop.
Save ahawkins/3151658 to your computer and use it in GitHub Desktop.

Iridium: The Next Step Forward

Proposed changes/goals/musings

  • Make an iridium command
  • Enable: iridium app your_app_name so it generates a complete application structure
  • Enable: iridium server # starts a stupid development server serving /site or whatever the application config is
  • Enable: iridium generate model|view|template|controller|template|state
  • Make testing work with casperjs for integration tests and unit tests
  • Tests written in Coffescript by default (casper automatically compiles cs so no extra work needed)
  • Ensure server is started in test mode. Casper points to the running rack app
  • Split Iridium::Rack module in to different parts.
    • Create a simple server used for development (see #2) -- Iridium::Server
    • Create a production level rack app which includes HTTP caching, gzipping etc. -- This is Iridium::Application
      • Generate a Procfile
      • Generate a config.ru that's exactly the same as it now
  • Support external asset loading per env: so you can use sinon in test but not development
  • Abstract parts of index.html

Examples:

$ iridium new todos
$ iridium new todos --deployable # generates the procfile and config.ru. On by default
$ iridium generate model
$ iridium test (integration|test|foo) # default is to test everything with casperjs

Experimental/pipe dreams: Whiskey

Whiskey is the brew for JS. Why Whiskey? Because Javascript is much harder to dev with than beer. I loved that. The naming and reason is perfect. Whiskey downloads JS for you. Whiskey is written in ruby. Each file is a recipe.

Examples:

load :jquery
load :jquery_ui, :via => :google

load :underscore
load :ember, '0.9.8'

Other examples:

$ cd /your/iridium_app/app/vendor/javascripts/
$ whiskey date
$ whiskey underscore
$ whiskey name_of_common_js_library
# now individual files can be made available as minispade modules or
# inserted explicitly with script tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment