 			compiled = grunt.template.process template
 			dest = path.resolve cwd, req
 
+			removeFromFiles req
 			grunt.file.write dest, compiled
 
 		createRequire()

				req: if req then "require ['#{trimmedRequire}']" else ''

			compiled = grunt.template.process template, data: config: config
			dest = path.resolve cwd, fileName

			grunt.file.write dest, compiled


		loads = trimFiles([loads])[0]

		processShim = ->
			template = getTemplate mainFileName
			trimmedRequire = getFileNameWithoutExtension req

			config =
