Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify list of files #3

Closed
vbraun opened this issue Oct 4, 2016 · 1 comment
Closed

Specify list of files #3

vbraun opened this issue Oct 4, 2016 · 1 comment

Comments

@vbraun
Copy link

vbraun commented Oct 4, 2016

It would be nice to be able to pass a list of files instead of a file glob. Especially if some templates are autogenerated then you typically have a Makefile variable for that, and you don't want to glob over build artifacts. Right now it seems I have to do do a workaround like

nghtml2js --files "{$(shell echo $(HTML) | sed 's/ /,/g' )}" 

The commandline args would have to be slightly different to support a variable-length list of files, e.g. nghtml2s [options] file1 file2 ...

@pchudzik
Copy link
Owner

pchudzik commented Oct 22, 2016

file list can be provided after all options.
nghtml2js -m 'reporter.template' -s es2015 -p src/ -o src/template.js -- src/file1.html src/file2.htm
Please note that file list must be provided after -- (double dash)

It's possible to mix glob pattern and input file list
nghtml2js -m 'reporter.template' -f html/**/*html -s es2015 -p src/ -o src/template.js -- index.html

In case any of the input files is missing, or can not be read it's possible to ignore error by adding --ignore-missing option

New features are released in version 1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants