Created
March 26, 2014 02:42
-
-
Save cjlyth/9776001 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# **** | |
# Needs to be before the optional dependency | |
# **** | |
optional = (name) -> | |
try | |
require name | |
catch err | |
console.log " * optional dependency not found: #{name}" | |
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !!! include optional.coffee somehow !!!! | |
path = require 'path' | |
open = optional 'open' | |
lodash = optional 'lodash' | |
url = 'http://localhost:3000/' | |
open url if open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment