This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
Explain how to import local modules recursively #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First, I want to say thank you very much for writing this package. I am using this package so well.
This PR supplements how to import local modules recursively without modifying codebases.
Background
In
importmap-rails
, it support functionality to import all files in a specific folder by usingpin_all_from
.For example, If you want to import all javascript files under
app/javascript/src
you can write as below:But, this package's README does not explains how to do it. And it seems lack this feature.
What does this PR do?
I added additional explanation of how to import local modules recursively like
pin_all_from
, as I explained above.I have wondered which project I contribute between bolt-import and this package. But i have no experience with contributing django-plugin and I don't know how to contribute to bolt, too. So, I made decision to explaining trick without modifying codebase.
Implementing
import_recursive
function is not much difficult and useful trick.If there are people who want to use SPA framework without building backend/frontend separately, this trick would be very helpful.
Links
jsconfig.json
: https://github.com/kodingwarrior/memedex-backend/blob/main/jsconfig.json