Generates ObjC header files to classes and categories defined in Nu.
Nu
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Nukefile
README.markdown
nug.nu

README.markdown

About

nug generates ObjC header files from Nu files. This is handy when integrating Nu and Objective-C in the same project. This is based on a request in the Nu mailing list.

Compiling

Open the Terminal and navigate to the nug directory using the command line. Then do the following:

  1. nuke
  2. nuke install
  3. nuke clobber

The above should compile nug, install it into /usr/local/bin/, and then delete the generated files. If you'd prefer to compile nug by hand, you can do the following:

  1. nubake the nu file using: nubake nug.nu -s
  2. Compile into a program using: gcc nug.m -o nug -framework Cocoa -framework Nu
  3. Install the compiled nug where you normally put executables

Usage

Navigate to a folder with a "nu" folder (but don't go into the "nu" folder) using the Terminal. Run nug in the Terminal. nug will create a "nug" folder (if one doesn't already exist) and create header files based on information found in the nu folder.

By default, nug only reads the files that are in the "nu" folder. You can change this by using the -fre flag. -fre stands for "file regular expression." Any files that match that regular expression will be converted using nug. For instance, if you want to create headers for files in a "nu" and a "src" folder, you can use `nug -fre "^(nu|src).*.nu".

Author

Grayson Hansard
From Concentrate Software