Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns nanogen.core
- (:gen-class))
- (defn -main
- "I don't do a whole lot ... yet."
- ;; Invalid call with no arguments
- ([]
- (println "No command found! Usage: nanogen <command> [args]"))
- ;; Proper call, optional arguments
- ([command & args]
- (println (resolve (symbol command)))
- ;; Check if the command is a defined function, if true execute the function
- ;; if not just display an error message
- (if (fn? (resolve (symbol command)))
- (command args)
- (println (str "Command " command " not found!")))))
- ;; Creates a site directory with the spcified name
- ;; entries/
- ;; hello-world.md
- ;; settings/
- ;; style.css
- (defn create
- [site-name]
- (println "Creating..."))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement