Minor refactor to use flatiron and flatiron.plugins.cli #8

merged 3 commits into from Jan 18, 2012

2 participants


I noticed that your application was using a number of modules that are a part of flatiron, so I went ahead and refactored the application to use the flatiron CLI plugin.

Notable Changes

  • Replaced lib/dispatcher.js with the flatiron CLI router powered by director.
  • Remove lib/conf.js with app.config (powered by nconf)
  • Use optimist through app.argv options
  • Use ini through flatiron.formats
  • Use flatiron.common.requireDirLazy() instead of Redr (sorry, couldnt help myself)
  • Moved Makefile into package.json
  • Removed tests for lib/dispatcher.js since they are tests in flatiron core.
  • Updated README.md

Let me know what you think! All tests are passing using npm test


Some code stats:

  • Removed about 20% of the codebase through using flatiron components.
  • Removed five dependencies. Arguably the flatiron dependency tree is slightly larger, but most of that is just npm repeating itself.
@vesln vesln merged commit 3db63bd into vesln:master Jan 18, 2012

That looks awesome! Thank you @indexzero. I really appreciate it.


The only problem I found with the new code is the --reporter param is not respected at all, but I fixed it. Everything else is amazing.


Glad you approve :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment