Skip to content

Commit

Permalink
Added framework tasks to build and install Markdown.framework.
Browse files Browse the repository at this point in the history
Markdown can now be used directly from Objective-C by simply loading
the framework and sending messages to the NuMarkdown class.
  • Loading branch information
Tim Burks committed Nov 7, 2007
1 parent 758dab4 commit 539b8a3
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 136 deletions.
21 changes: 20 additions & 1 deletion Nukefile
@@ -1,4 +1,17 @@

;; source files
(set @m_files (filelist "^objc/.*.m$"))
(set @nu_files (filelist "^nu/.*nu$"))
(set @frameworks '("Cocoa" "Nu"))

;; framework description
(set @framework "Markdown")
(set @framework_identifier "nu.programming.markdown")
(set @framework_creator_code "????")
(set @framework_initializer "MarkdownInit")

(compilation-tasks)
(framework-tasks)

(task "bin/nudown" is
(SH "gcc objc/nudown.m -o bin/nudown -framework Cocoa -framework Nu"))
Expand All @@ -10,4 +23,10 @@
(SH "rm test/SimpleTests/*.html")
(SH "rm test/MarkdownTests/*.html"))

(task "default" => "bin/nudown")
(task "clobber" => "clean" is
(system "rm -rf #{@framework_dir}"))

(task "default" => "framework")

(task "install" => "framework" is
(SH "ditto #{@framework_dir} /Library/Frameworks/#{@framework_dir}"))
6 changes: 6 additions & 0 deletions bin/nudown
@@ -0,0 +1,6 @@
#!/usr/bin/env nush
(load "Markdown")

(puts (NuMarkdown convert:((NSString alloc)
initWithData:((NSFileHandle fileHandleWithStandardInput) readDataToEndOfFile)
encoding:NSUTF8StringEncoding)))

0 comments on commit 539b8a3

Please sign in to comment.