Answer the question
In order to leave comments, you need to log in
Using json in conjunction with pug with Grunt builder?
Everywhere I find information on this issue, but with answers: how to configure gulp so that pug eats data files. But I need Grunt settings, and I can't even find such articles. Grant is dead? Okay, this is a rhetorical question.
1) People, does anyone know if it is possible to set up a bunch of json to pug in Grant? If so, how?
2) I tried to register in the config
data: {
jobs: grunt.file.readJSON('src/etvm/facts.json')
}
Unexpected token c in JSON at position 2
- var facts = [
{
"question": "текст",
"answer": "вот такой вот текст",
"answer_two": "большой текст"
},
{...}
]
each fact in facts
h3.facts__title !{fact.question}
>> 1| - var facts = [
>> > 2| {
>> ---------^
unexpected text "{
Answer the question
In order to leave comments, you need to log in
Grant is dead?
'./src/etvm/facts.json'
.- var
must go in one line.Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question