Trying to optimize an requirejs-based project on Windows. Have put the r.js.cmd in the Scripts folder along with the following nodeBuild.js file.
({
baseUrl: \".
Based on the documentation it seems to me that the equivalent of a *nix:
r.js -o nodeBuild.js
would be on Windows:
r.js.cmd -o nodeBuild.js
That is, don't pass it to Node but let Windows run it. r.js.cmd is a Windows command file, which Node cannot interpret. When you do it like you've shown in your question, Node tries to interpret that file and fails.