Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
Nukefile | ||
| |
README.markdown | ||
| |
nug.nu |
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:
nukenuke installnuke 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:
nubakethe nu file using:nubake nug.nu -s- Compile into a program using:
gcc nug.m -o nug -framework Cocoa -framework Nu - Install the compiled
nugwhere 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".








