 path = require('path')
-exec = require('child_process').exec
+fs = require('fs')
 lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet
 folderMount = (connect, point) -> connect.static path.resolve(point)
 

	# Project configuration.
	grunt.initConfig
		resourceToken: process.env['RESOURCE_TOKEN'] or 'http://vtex.io'
		relativePath: ''
		pkg: grunt.file.readJSON('package.json')
		pacha: grunt.file.readJSON('tools/pachamama/pachamama.config')[0]

				options:
					replacements: [
						pattern: /src="(\.\.\/)?(?!http|\/|\/\/)/ig
						replacement: 'src="<%= resourceToken %>/<%= pacha.infrastructure.s3.bucket %>/<%= gitCommit %>/'
					,
						pattern: /href="(\.\.\/)?(?!http|\/|\/\/)/ig
						replacement: 'href="<%= resourceToken %>/<%= pacha.infrastructure.s3.bucket %>/<%= gitCommit %>/'
					]

		connect:
