electron-link/lib/index.js
DeeDeeG d9231033d7 Rename src/ --> lib/
We don't need to compile anything anymore, apparently,
so just move the "source" files to lib/.
2020-12-13 20:26:27 -05:00

13 lines
510 B
JavaScript

const TransformCache = require('./transform-cache')
const generateSnapshotScript = require('./generate-snapshot-script')
module.exports = async function (options) {
const cacheInvalidationKey = options.shouldExcludeModule.toString() + require('../package.json').version
const cache = new TransformCache(options.cachePath, cacheInvalidationKey)
await cache.loadOrCreate()
delete options.cachePath
const result = await generateSnapshotScript(cache, options)
await cache.dispose()
return result
}