Answer the question
In order to leave comments, you need to log in
Grunt - can I use my own loops inside grunt-critical to iterate over some values?
I am using the grunt-critical plugin in a project.
It is necessary to generate more than 4 critical css files.
For this I use:
critical: {
homepage: {
options: {
base: './',
css: [
'css/styles.css'
],
width: 1200,
height: 900
},
src: 'src/html/homepage.html',
minify: true,
dest: 'dist/homepage-critical.css'
},
category: {
options: {
base: './',
css: [
'css/styles.css'
],
width: 1200,
height: 900
},
src: 'src/html/category.html',
minify: true,
dest: 'dist/category-critical.css'
},
product: {
options: {
base: './',
css: [
'css/styles.css'
],
width: 1200,
height: 900
},
src: 'src/html/product.html',
minify: true,
dest: 'dist/product-critical.css'
},
}
grunt critical
and run the tasks one by one: critical-->homepage, critical-->category...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question