code: function outputAll(generator) {
  
      var output = (opts.outputs && opts.outputs[0]);
      if (!output) return log('scripts.outputAll: no output');
  
      var omit = output.omitRoutes;
      if (omit && !u.isArray(omit)) { omit = [omit]; }
  
      // TODO: re-use similar filter in server/serve-statics and generator.output
      var filterRe = new RegExp( '^(/admin/|/server/' +
                  (opts.editor ? '' : '|/pub/') +
                         (omit ? '|' + u.map(omit, u.escapeRegExp).join('|') : '') +
                                 ')');
  
      u.each(self.scripts, function(script) {
        if (filterRe.test(script.route)) return;
  
        var out = fspath.join(output.path, script.route);
        var ws = createOutputStream(out);
        var time = u.timer();
        ws.on('finish', function() {
          log('output script: %s (%d bytes, %d ms)', out, ws.bytesWritten, time());
        });
        ws.on('error', log);
  
        // reuse browserify-middleware with current production or debug options
        var options = browserify.settings.normalize(script.opts);
        var bundler = browserify.buildBundle(script.path, options);
        bundler.bundle().pipe(ws);
      });
  
      if (opts.editor) {
        var out = fspath.join(output.path, '/pub/_opts.json');
        fs.outputJson(out, serializeOpts(generator, true, output), function(err) {
          log(err || 'output opts: %s', out);
        });
      }
    }
docs: publish browserscripts