Disable optimization for terminal template
This commit is contained in:
2
action/dist/index.js
vendored
2
action/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -49,7 +49,7 @@
|
||||
console.debug(`metrics/compute/${login} > render > success`)
|
||||
|
||||
//Optimize rendering
|
||||
if (conf.optimize) {
|
||||
if ((conf.optimize)&&(!q.raw)) {
|
||||
console.debug(`metrics/compute/${login} > optimize`)
|
||||
const svgo = new SVGO({full:true, plugins:[{cleanupAttrs:true}, {inlineStyles:false}]})
|
||||
const {data:optimized} = await svgo.optimize(rendered)
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
|
||||
/** Template processor */
|
||||
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
|
||||
//Common
|
||||
await common(...arguments)
|
||||
}
|
||||
@@ -3,5 +3,8 @@
|
||||
|
||||
/** Template processor */
|
||||
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
|
||||
//Common
|
||||
await common(...arguments)
|
||||
//Disable optimization to keep white-spaces
|
||||
q.raw = true
|
||||
}
|
||||
Reference in New Issue
Block a user