nl_tokens: PrivateFunction : prepareBrowserify Adds the Browserify middleware the the given express . js app .
pl_tokens: function prepareBrowserify ( app , options ) { if ( ! _ . has ( options , 'mainFile' ) || ! _ . has ( options , 'url' ) ) { throw new Error ( 'Missing "mainFile" and "url" property.' ) ; } var mainFile = options . mainFile , url = options . url , exclude = options . exclude || [ ] , browserifyOptions ; exclude = exclude . concat ( getServerOnlyFiles ( ) ) ; browserifyOptions = { ignore : exclude } ; _ . extend ( browserifyOptions , _ . omit ( options , [ 'mainFile' , 'exclude' ] ) ) ; _ . defaults ( browserifyOptions , { debug : <mask> , gzip : true , minify : true } ) ; app . get ( url , browserify ( mainFile , browserifyOptions ) ) ; }