Commit 4a54c52f authored by Evan Hahn's avatar Evan Hahn

Try `allPossibleObjects`, but it doesn't improve things

parent 394d192f
......@@ -41,6 +41,25 @@ async function babelMinify () {
function regpackMinify (sourceBuffer) {
const source = sourceBuffer.toString('utf8')
const regpack = new RegPack()
/*
You can try this to try all possible options:
const packerResults = allPossibleObjects({
withMath: [true, false],
crushGainFactor: [0, 1, 2],
crushLengthFactor: [0, 1],
crushCopiesFactor: [0, 1],
crushTiebreakerFactor: [0, 1]
})
.map((options) => Object.assign({
hash2DContext: true,
contextVariableName: 'c',
reassignVars: true,
varsNotReassigned: ['a', 'b', 'c', 'd']
}, options))
.map((options) => regpack.runPacker(source, options))
.reduce((flattened, arr) => flattened.concat(arr), [])
*/
const packerResults = regpack.runPacker(source, {
withMath: true,
hash2DContext: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment