We don't need to compile anything anymore, apparently, so just move the "source" files to lib/.
13 lines
510 B
JavaScript
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
|
|
}
|