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

How can I include all js files in folder and subfolders? #24

Closed
paveliko opened this issue Feb 11, 2015 · 2 comments
Closed

How can I include all js files in folder and subfolders? #24

paveliko opened this issue Feb 11, 2015 · 2 comments

Comments

@paveliko
Copy link

Hey,

I tring to include all js files in folder and subfolders.
htmlreplace({
js: {
src: '/dir/*/.js',
tpl: '<script src="%s"></script>'
}
})

What the way to do that?

Thanks,
Pavel

@VFK
Copy link
Owner

VFK commented Feb 11, 2015

Hi Pavel. This module doesn't perform any filesystem operations, so for now you need to use other modules which returns a list of files. Try to look at my response at similar question here. You may probably need to play with options of glob module depending on what you want to see as src path. There is also resolvePaths option which may help you to resolve paths relative to your html file.

@paveliko
Copy link
Author

Geat! It's good enough for me :) Thanks Vladimir.

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