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

Use aliases in NPM_FILE_PATTERNS to decrease nesting #24

Open
hwalinga opened this issue Feb 25, 2020 · 0 comments
Open

Use aliases in NPM_FILE_PATTERNS to decrease nesting #24

hwalinga opened this issue Feb 25, 2020 · 0 comments

Comments

@hwalinga
Copy link

Usually you only need one file from a package. You can expose that single file using NPM_FILE_PATTERNS, but the nesting of folders can still be annoying.

For example, if I need jszip I will include:

NPM_STATIC_FILES_PREFIX = os.path.join('js', 'vendor')
NPM_FILE_PATTERNS = {"jszip": ["dist/jszip.min.js"]}

And now I get the file at 'static/js/vendor/jszip/dist/jszip.min.js'. The dist folder here is unneeded. In addition, I actually don't bother with the jszip directory, but want to have the file directly in the folder, as I am already nesting it using NPM_STATIC_FILES_PREFIX.

So, I just want to have the file in 'static/js/vendor/jszip.min.js'.

You might be able to allow for configuration by having the NPM_FILE_PATTERNS as a tuple with ("source", "destination").

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

1 participant