Browserify lets you require(‘modules’) in the browser by bundling up all of your dependencies. Therefore, it is easy to resolve a library using browserify by simply call
require('library'). However, browserify bundles up all files, debug and edit files may meet up some problems. You should watch files and build up bundle file whenever code files changes, moreover when build errored, the error message should show up in the browser to make developer know what happened. For better debugger, developers should know how to use source-map.
With bearcat, browserify will simply be a role of
This example shows how to use browserify with bearcat.
requireUtil for example as a bridge between bearcat and browserify.
This file will be bundled into browserify, and it can see
require to resolve library. Then when some other files need to use a library from browserify, just inject
requireUtil into it, that’s it.
requireUtil with magic attribute
then add your code logic
markDownController file is asynchronously loaded, you can edit and debug as you like, just enjoy coding…