var path = require('path');
var url = require('url');

var closure = require('closure-util');
var nomnom = require('nomnom');

var log = closure.log;

var options = nomnom.options({
  port: {
    abbr: 'p',
    'default': 3000,
    help: 'Port for incoming connections',
    metavar: 'PORT'
  },
  loglevel: {
    abbr: 'l',
    choices: ['silly', 'verbose', 'info', 'warn', 'error'],
    'default': 'info',
    help: 'Log level',
    metavar: 'LEVEL'
  }
}).parse();


/** @type {string} */
log.level = options.loglevel;

log.info('ol3-cesium', 'Parsing dependencies ...');
var manager = new closure.Manager({
  closure: true, // use the bundled Closure Library
  lib: [
    'src/**/*.js'
  ]
});
manager.on('error', function(e) {
  log.error('ol3-cesium', e.message);
});
manager.on('ready', function() {
  var server = new closure.Server({
    manager: manager,
    loader: '/@loader'
  });
  server.listen(options.port, function() {
    log.info('ol3-cesium', 'Listening on http://localhost:' +
        options.port + '/ (Ctrl+C to stop)');
  });
  server.on('error', function(err) {
    log.error('ol3-cesium', 'Server failed to start: ' + err.message);
    process.exit(1);
  });
});

var path = require('path');
var url = require('url');

var closure = require('closure-util');
var nomnom = require('nomnom');

var log = closure.log;

var options = nomnom.options({
  port: {
    abbr: 'p',
    'default': 3000,
    help: 'Port for incoming connections',
    metavar: 'PORT'
  },
  loglevel: {
    abbr: 'l',
    choices: ['silly', 'verbose', 'info', 'warn', 'error'],
    'default': 'info',
    help: 'Log level',
    metavar: 'LEVEL'
  }
}).parse();


/** @type {string} */
log.level = options.loglevel;

log.info('ol3-cesium', 'Parsing dependencies ...');
var manager = new closure.Manager({
  closure: true, // use the bundled Closure Library
  lib: [
    'src/**/*.js'
  ],
  ignoreRequires: '^ol\\.'
});
manager.on('error', function(e) {
  log.error('ol3-cesium', e.message);
});
manager.on('ready', function() {
  var server = new closure.Server({
    manager: manager,
    loader: '/@loader'
  });
  server.listen(options.port, function() {
    log.info('ol3-cesium', 'Listening on http://localhost:' +
        options.port + '/ (Ctrl+C to stop)');
  });
  server.on('error', function(err) {
    log.error('ol3-cesium', 'Server failed to start: ' + err.message);
    process.exit(1);
  });
});

Use closure-util's ignoreRequires for the examples
Use closure-util's ignoreRequires for the examples
