 		writeBootstrap bootstrapPath, cwd
 
 		shim = {}
-
 		shim[angular] = deps: []
 
 		mods.forEach (modulePath) ->

		paths[0]

	getSourcePaths = (cwd, src) ->
		grunt.file.expand("#{cwd}#{src}").map (filePath) ->
			filePath.substr cwd.length

	writeApp = (file, cwd, modules) ->
		mods = []

		shim[app] = deps: [angular].concat(mods)

		source.forEach (sourcePath) ->
			return if sourcePath is angular

			isModule = mods.indexOf(sourcePath) > -1
			ms = []

			mods.forEach (mod) ->
				return if sourcePath is mod
				return if isModule

				ms.push mod

			return if isModule
				shim[sourcePath] = deps: [angular].concat(ms)

			shim[sourcePath] = deps: [angular].concat(ms, app)

		template = grunt.file.read "#{__dirname}/templates/main.coffee"
		compiled = grunt.template.process template, data: config: shim: JSON.stringify(shim), loads: JSON.stringify(loads)
