lib/bro.js
function framework(emitter, config, logger) {

    log = logger.create('framework.browserify');

    if (!bundleFile) {
      bundleFile = new BundleFile();
    }

    bundleFile.touch();
    log.debug('created browserify bundle: %s', bundleFile.location);

    b = createBundle(config);

    // TODO(Nikku): hook into karma karmas file update facilities
    // to remove files from the bundle once karma detects the deletion

    // hook into exit for cleanup
    emitter.on('exit', function(done) {
      log.debug('cleaning up');

      if (b.close) {
        b.close();
      }

      bundleFile.remove();
      done();
    });


    // add bundle file to the list of files defined in the
    // configuration. be smart by doing so.
    addBundleFile(bundleFile, config);

    return b;
  }
function framework(emitter, config, logger) {

    log = logger.create('framework.browserify');

    if (!bundleFile) {
      bundleFile = new BundleFile();
    }

    bundleFile.touch();
    log.debug('created browserify bundle: %s', bundleFile.location);

    b = createBundle(config);

    // TODO(Nikku): hook into karma karmas file update facilities
    // to remove files from the bundle once karma detects the deletion

    // hook into exit for cleanup
    emitter.on('exit', function(done) {
      log.debug('cleaning up');

      if (b.close) {
        b.close();
      }

      bundleFile.remove();
      done();
    });


    // add bundle file to the list of files defined in the
    // configuration. be smart by doing so.
    addBundleFile(bundleFile, config);

    return b;
  }
function framework ( emitter , config , logger ) { log = logger . create ( 'framework.browserify' ) ; if ( ! bundleFile ) { bundleFile = new BundleFile ( ) ; } bundleFile . touch ( ) ; log . debug ( 'created browserify bundle: %s' , bundleFile . location ) ; b = createBundle ( config ) ; // TODO(Nikku): hook into karma karmas file update facilities // to remove files from the bundle once karma detects the deletion // hook into exit for cleanup emitter . on ( 'exit' , function ( done ) { log . debug ( 'cleaning up' ) ; if ( b . close ) { b . close ( ) ; } bundleFile . remove ( ) ; done ( ) ; } ) ; // add bundle file to the list of files defined in the // configuration. be smart by doing so. addBundleFile ( bundleFile , config ) ; return b ; }
The browserify framework that creates the initial logger and bundle file
as well as prepends the bundle file to the karma file configuration.
The browserify framework that creates the initial logger and bundle file as well as prepends the bundle file to the karma file configuration .