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

Fix the NPM_FILE_PATTERNS setting to work on windows #69

Closed
spapas opened this issue Aug 2, 2020 · 2 comments
Closed

Fix the NPM_FILE_PATTERNS setting to work on windows #69

spapas opened this issue Aug 2, 2020 · 2 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@spapas
Copy link

spapas commented Aug 2, 2020

Instead of hardcoding the "/" to the entries NPM_FILE_PATTERNS you need to use os.path.join, as per: kevin1024/django-npm#15

For example:

NPM_FILE_PATTERNS = {
    "a17t": [os.path.join("dist", "a17t.css"), os.path.join("dist", "tailwind.css")],
    "apexcharts": [os.path.join("dist", "apexcharts.min.js")],
    "litepicker": [os.path.join("dist", "js", "main.js")],
    "turbolinks": [os.path.join("dist", "turbolinks.js")],
    "stimulus": [os.path.join("dist", "stimulus.umd.js")],
    "inter-ui": [os.path.join("Inter (web)", "*")],
    "@fortawesome": [os.path.join("fontawesome-free", "js", "all.min.js")],
}

TIA

@milesmcc
Copy link
Owner

milesmcc commented Aug 2, 2020

You’re right, this is definitely something we should do. If you’d like, feel free to submit a PR! Seems like you’ve already done most of the work in your comment. Or I can implement this myself if that’s not something you’re interested in.

@milesmcc milesmcc added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Aug 2, 2020
@spapas
Copy link
Author

spapas commented Aug 2, 2020

Hello @milesmcc, I can't provide a PR right now - I'm at a different computer so I recommend fixing it yourself.

Kind regards,
Serafeim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants