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

compile to only copy specified folders, not parse/compile them? #305

Closed
jevets opened this issue Jul 1, 2014 · 4 comments
Closed

compile to only copy specified folders, not parse/compile them? #305

jevets opened this issue Jul 1, 2014 · 4 comments

Comments

@jevets
Copy link

jevets commented Jul 1, 2014

Use case example:

I want to use bower for package management, and I want the bower_components directory under public. Upon harp compile, I want the entire bower_components directory to be copied over to www but not be compiled/parsed. For example, Twitter Bootstrap's bower component includes a bunch of .less files, and upon harp compile, harp attempts to compile those files.

Some ideas on usage:

  • Allow for a special flag in _data.json or _harp.json to tell harp compile (and harp server, while we're at it) to avoid compiling a set of files. Maybe something like this
// public/_data.json
{ 
    "index": {
        "title": "Home Page"
    },
    "bower_components": {
        "_compile": false
    }
}
  • Allow harp compile to accept a list of files/directories that will only be copied to destination, not parsed/compiled. Maybe something like harp compile --copy-only="public/bower_components" or something.
@kennethormandy
Copy link
Collaborator

Yeah I am on board with this outcome, but I think it should just read the .gitignore file or something like that. I’m having the same problem with node_modules/, I can’t use some modules because Harp chokes on compiling them. It also slows everything down a lot when 90% of you app’s filesize is in a components directory, but you don’t actually need the output.

Thanks for opening an issue!

@jevets
Copy link
Author

jevets commented Jul 8, 2014

I keep /node_modules outside of the harp public/ folder.

I think using .gitignore is a good step in the right direction, but I do commit bower components to the repo on lots of harp sites, though not on all sites. I'd like to be able to commit to the repo and separately instruct harp on whether to compile a given folder or path or glob. Thoughts?

@kennethormandy
Copy link
Collaborator

If you have an example repo where you’ve committed the Bower components, that would probably be helpful for us. Eventually we’d like to support node_modules properly, so it could be outside public/ but still be available as you’d expect. I’d like to factor Bower and Component in when we do that, but it probably won’t happen right away.

@kennethormandy
Copy link
Collaborator

Ah, I’m going to close this in favour of #275 but feel free to post or reponse anything there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants