 
     doCompilation = ->
         stamp('Compiling all the things')
+        settings = loadSettings(sources.settings)
         output = compositePage
-            style   : compileStyleFile(sources.style)
-            script  : compileScriptFile(sources.script)
-            markup  : compileMarkupFile(sources.markup)
+            style               : compileStyleFile(sources.style)
+            script              : compileScriptFile(sources.script)
+            markup              : compileMarkupFile(sources.markup)
+            script_libraries    : compileScriptLibraries(settings)
+            style_libraries     : compileStyleLibraries(settings)
         return output
 
     serveContent = ->
         stamp('Creating server')
-        app = express.createServer()
+        app = express()
 
         app.get '/', (req, res) ->
             res.send(doCompilation())

Jade            = require 'jade'
Stylus          = require 'stylus'

CWD = process.cwd()



        'script.coffee' : 'console.log "loaded"\n\n\n'
        'markup.jade'   : 'h1 Hello, world!\n\n\n'
        'style.styl'    : 'h1\n    font-weight 300\n    font-family Helvetica\n\n\n'
        'notes.md'      : "# #{ project_name }\n\n\n"
        'settings.json' : """{
            "version": "#{ proto_version }",
            "script_libraries": [
                "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.1/underscore-min.js",
                "https://cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.0/underscore.string.min.js",
                "https://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.3.3/coffee-script.min.js",
                "https://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.2/backbone-min.js",
                "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js",
                "https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.0/jquery-ui.min.js",
                "https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js",
                "https://raw.github.com/Marak/Faker.js/master/Faker.js"
            ],
            "style_libraries": [
                "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css"
            ]
        }"""


    project_path = "#{ CWD }/#{ project_name }"

