You need a require.register function in the scope where you add the wrapped files. It's recommended to use commonjs-require for this purpose.
gulpfile.js
var commonjsWrapper = ; gulp
its compile from:
src/sub/Cat.js
module{ ;};
src/Main.coffee
Cat = require 'sub/Cat' = -> Cat
to:
build/sub/Cat.js
require;
build/Main.coffee
requireregister 'Main' Cat = require 'sub/Cat' = -> Cat