const fs = require('fs')

input = fs.readFileSync('./env.js')
functionFile = fs.readFileSync('../script.js')
searchSize = "(resolve, reject) => {".length

insertIndex = input.indexOf("(resolve, reject) => {") + searchSize

output = input.slice(0, insertIndex) + functionFile + input.slice(insertIndex)

fs.writeFileSync('./output.js', output)


