Closed oronoa closed 6 years ago
Hey~! May I see the rest of your task?
Sure , it's taken from the hyperapp boilerplate project
export async function release(taskr) {
await taskr
.source(`${target}/*.js`)
.uglify({
compress: {
conditionals: 1,
drop_console: 0,
comparisons: 1,
join_vars: 1,
booleans: 1,
loops: 1
},
mangle: {
reserved:['require']
},
'mangle-props' : {
keep_quoted : 1
}
})
.target(target)
await taskr
.source(`${target}/**/*`)
.rev({
ignores: ['.html', '.json', '.txt']
})
.revManifest({ dest: releaseTarget, trim: target })
.revReplace()
.target(releaseTarget)
await taskr
.source(`${releaseTarget}/*.html`)
.htmlmin()
.target(releaseTarget)
await taskr
.source(`${releaseTarget}/*.html`)
.shell(`sed -i -- 's/__TITLE__/${site_const.title}/g' $file`)
.shell(`sed -i -- 's/__CDN__/${cdn}/g' $file`)
await taskr
.source(`${releaseTarget}/**/*.{js,css,html,png,jpg,gif}`)
.precache({ stripPrefix: `${releaseTarget}/` })
.target(releaseTarget)
}
Thanks! What errors do you see?
none, but I don't see my function names / properties mangled .. so something is wrong
The @taskr/uglify
pkg is outdated as it's still using Uglify 2.x
You'll have to change the mangle
config you have to use the 2.x config.
I'd first just use mangle:true
to verify that it's working before adding in customizations.
Yep, mangle works thx! however --mangle-props i.e 'mangle-props' : true, doesn't
I've no idea 😬 I'm pretty sure mangle-props
is only meant to be an object, while mangle
can take multiple definition types.
Will close this for now, but updating (all) packages is on my TODO list.
Thanks!
This doesn't work