 #
 # [Network](../Network/) is used for running NoFlo graphs. The direct Network inteface is only provided
 # for backwards compatibility purposes. Use `createNetwork` instead.
+Network = require('./Network').Network
 exports.Network = require('./LegacyNetwork').Network
+{ deprecated } = require './Platform'
 
 # ### Platform detection
 #

#         console.log('Network is now running!');
#       })
#     }, true);
exports.createNetwork = (graph, callback, options) ->
  unless typeof options is 'object'
    options =
      delay: options
  unless typeof callback is 'function'
    callback = (err) ->
      throw err if err

  network = new exports.Network graph, options

  networkReady = (network) ->
    # Send IIPs

  # Ensure components are loaded before continuing
  network.loader.listComponents (err) ->
    return callback err if err

    # In case of delayed execution we don't wire it up
    if options.delay
      callback null, network
      return

    # Empty network, no need to connect it up
    return networkReady network if graph.nodes.length is 0

    # Wire the network up and start execution
    network.connect (err) ->
