gulp-file-include icon indicating copy to clipboard operation
gulp-file-include copied to clipboard

Does loop support inline statement?

Open easyfrog opened this issue 7 years ago • 2 comments

now is

@@loop('./xx.html', [...]):

inline mode:

@@loop("<div>@@text</div>", [{text: "1"}, {text: "2"}])

so could support this inline loop mode? is quite useful!

easyfrog avatar Jun 07 '18 06:06 easyfrog

another loop issue, seems with parameter is also not support.

like this:

@@loop('./xxx.html', @@itms)

and give me an error:

SyntaxError: Unexpected token @ in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.loopHandler [as handler] (/Users/easyfrog/work/ooomapWebsite/node_modules/gulp-file-include/lib/index.js:185:24)
...

easyfrog avatar Jun 07 '18 06:06 easyfrog

@haoxins I need inline mode and loop with parameter too! Please help.

@@loop('./xxx.html', @@itms)
@@loop("<div>@@text</div>", [{text: "1"}, {text: "2"}])
@@loop("<div>@@text</div>", @@itms)

Now all these options doesn't work.

lossen avatar Jun 23 '20 05:06 lossen