chunksnbits / grunt-markup-markdown

A grunt wrapper for the node-markup-markdown task
MIT License
0 stars 0 forks source link

How do I do multiple files? #1

Open DusanMilko opened 8 years ago

DusanMilko commented 8 years ago

This works:

files: { src: 'src/data/file.json', dest: 'src/data/file.json' }

This does not: files: [{ src: 'src/data/file.json', dest: 'src/data/file.json' }] I get this error: Warning: pattern.indexOf is not a function Use --force to continue.

How would I do multiple files like ...?

files: [{ src: 'src/data/file.json', dest: 'src/data/file.json' },{ src: 'src/data/file2.json', dest: 'src/data/file2.json' }]

same error: Warning: pattern.indexOf is not a function Use --force to continue.

chunksnbits commented 8 years ago

You can use a wildcard selector to concat multiple files into a single output. You should also provide an expand option to your file definition.

I am successfully using this definition for a project of mine:

i18n: {
  options: { ... },
  files: [{
    src: 'tmp/dev/i18n/locale-*.markdown.json',
    dest: 'tmp/dev/i18n/locale-%{locale}.json',
    expand: true
  }]
}

Hope this helps. Otherwise let me know and I will look further into the issue.