Closed nikolaygit closed 10 years ago
Yes I would. Also brings up the question. should files that are not JSON always be read as a string, much like you propose with the HTML file.
Thoughts?
json
- as JSON object, only for *.json include files.string
- all multiple lines of the source are concatenated, with or without separator (the user may define it as Grunt option).array
- every source line corresponds to an array element.I would go for the following options:
Grunt.js
json_bake: {
your_target: {
options: {
// if no includeFiles are defined, automatically *.json is included as json object, all text files are included as string with empty separator.
// otherwise, the user can overwrite and add new result formats explicitly in the includeFiles option
includeFiles : {
// these are default values, the user can change them
html: { resultType: "string", separator: "" },
csv: { resultType: "string", separator: ";" },
json: { resultType: "json"}
}
},
files: {
"dist/final.json": "app/base.json"
}
}
}
PR #2 created.
Hi Mathias,
thank you for the great plugin! Would you be open for a pull request to support including HTML files as strings:
source.json:
contents.html
dist.json