Add config option to copy certain files instead of compiling them#442
Open
chkal wants to merge 2 commits intosintaxi:masterfrom
Open
Add config option to copy certain files instead of compiling them#442chkal wants to merge 2 commits intosintaxi:masterfrom
chkal wants to merge 2 commits intosintaxi:masterfrom
Conversation
… be copied instead of compiled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I use bower to include dependencies for my site in the public directory. Bootstrap includes the LESS source files which is good, because a common pattern is to not use the compiled Bootstrap CSS but to use the LESS files to created customized versions of Bootstrap.
If I include Bootstrap in the public directory, the compile fails because harp tries to compile each LESS file separately. This doesn't work, as all variables are declared in a separate file, so you get "variable @brand-info is undefined" and similar errors all over the place.
The first commit is a test reproducing this issue.
The second commit defines a new configuration property which allows you to specify glob patterns for files that should be copied instead of compiled. That is basically something that also came up in #275 (see my last comment there).
{ "copy": [ "vendor/**", "*.less" ] }I think this concepts could be extended to also offer an "ignore" config property for ignoring files which would provide a feature that has often be requested (see #275, #325, #312 )