           project: project.id
           code: file.content
           tests: ''
+        project.components.push graph
         out.component.send component
         continue
       out.project.send project

    project =
      id: data.payload.graph
      gist: data.payload.graph

    request = api.get "/gists/#{data.payload.graph}"
    request.on 'success', (res) ->

        basename = path.basename name, path.extname name
        if path.extname(name) is '.json'
          # JSON graph
          noflo.graph.loadJSON file.content, (err, graph) ->
            graph.setProperties
              project: project.id
              id: "#{project.id}_#{basename}"
            project.main = graph.properties.id unless project.main
            project.name = graph.properties.name unless project.name
            project.graphs.push graph
            if graph.properties?.environment?.type
              project.type = graph.properties.environment.type unless project.type
            out.graph.send graph
          continue
        # Component
        component =
