Skip to content

Add config option to copy certain files instead of compiling them#442

Open
chkal wants to merge 2 commits intosintaxi:masterfrom
chkal:copy
Open

Add config option to copy certain files instead of compiling them#442
chkal wants to merge 2 commits intosintaxi:masterfrom
chkal:copy

Conversation

@chkal
Copy link
Contributor

@chkal chkal commented Apr 30, 2015

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 )

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

Successfully merging this pull request may close these issues.

1 participant