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`)
|
console.debug(`metrics/compute/${login} > render > success`)
|
||||||
|
|
||||||
//Optimize rendering
|
//Optimize rendering
|
||||||
if (conf.optimize) {
|
if ((conf.optimize)&&(!q.raw)) {
|
||||||
console.debug(`metrics/compute/${login} > optimize`)
|
console.debug(`metrics/compute/${login} > optimize`)
|
||||||
const svgo = new SVGO({full:true, plugins:[{cleanupAttrs:true}, {inlineStyles:false}]})
|
const svgo = new SVGO({full:true, plugins:[{cleanupAttrs:true}, {inlineStyles:false}]})
|
||||||
const {data:optimized} = await svgo.optimize(rendered)
|
const {data:optimized} = await svgo.optimize(rendered)
|
||||||
|
|||||||
@@ -3,5 +3,6 @@
|
|||||||
|
|
||||||
/** Template processor */
|
/** Template processor */
|
||||||
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
|
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
|
||||||
await common(...arguments)
|
//Common
|
||||||
|
await common(...arguments)
|
||||||
}
|
}
|
||||||
@@ -3,5 +3,8 @@
|
|||||||
|
|
||||||
/** Template processor */
|
/** Template processor */
|
||||||
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
|
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
|
||||||
await common(...arguments)
|
//Common
|
||||||
|
await common(...arguments)
|
||||||
|
//Disable optimization to keep white-spaces
|
||||||
|
q.raw = true
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user