Force the Javascript target definition #86
Merged
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.
Problem
While trying to define the JS assets in a new theme I found out that setting the variable
DRAINPIPE_JAVASCRIPT
inTaskfile.yml
wasn't working properly: whatever I set in there it'd export it in another directory right belowdocroot
.I set:
And instead of exporting it into
docroot/themes/custom/my_theme/src/script.min.js
, it was creating the files intodocroot
, ignoring the target path.Proposed solution
@hawkeyetwolf helped me coming up with this possible solution, forcing the definition of the
outbase
value, and now the source path set is being used for the target too.But while reading the comments about the limitation to provide separate entryNames, wouldn't it be less confusing to just provide an entry value for any JS on the
Taskfile.yml
and use that to build both for the source and the value path?@justafish what do you think? Does the changes makes sense? Is it enough, or should we try to improve something else?