I **believe** this line is optional in our
# context to use when executing the following file. # Use the 'hash-bang' to tell the command-line environment which Rather than executing Node.js from within the 'js' directory, I wrote the following 'executable' script in the project root: Rather than remembering how to run this compiler, however, I wanted to see if I could use a Bash script to simplify the execution. I ran the r.js compiler from the command line, providing it with the proper execution directory and a path to the build file. As part of the exercise, I used the RequireJS compiler - r.js - to concatenate and minify all of the JavaScript dependencies. And in the Mac OSX / *NIX world, I think this is referred to as 'Bash Scripting.' Whatever it is, it seems really cool and I want to learn how to take advantage of it.Ī couple of weeks ago, I wrote a small but non-trivial drag-n-drop JavaScript application in an effort to learn more about RequireJS, modular JavaScript application development, and MVC (Model-View-Controller) programming. I think this is what a BAT file does on Windows. What was so interesting to me about this, however, was that the file was invoked like a standard executable file. I can't remember where I saw this, but recently, I saw a fellow programmer execute a set of command-line scripts from a file.
And, as far as getting around on the command-line, I'm even more of a novice. I'm relatively new to the Mac OSX operating system.