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 returns error when using bootstrap #181

Closed
gibbsonn opened this issue Dec 28, 2013 · 6 comments
Closed

compile returns error when using bootstrap #181

gibbsonn opened this issue Dec 28, 2013 · 6 comments
Labels

Comments

@gibbsonn
Copy link

steps to reproduce

  • harp init test_app
  • cd test_app
  • bower install bootstrap
  • harp compile

the compile outputs the error "variable @alert-padding is undefined"

@krrishd
Copy link

krrishd commented Dec 28, 2013

I've experienced the same issue. It's because bootstrap has its own LESS files, and Harp is trying to compile them as well. What I did is deleted all the LESS files from the Bootstrap folder, and everything was fine. Hope that helps!

@silentrob
Copy link
Collaborator

@krrishd your right, harp tries to compile everything. This fix is to rename the bootstrap folder to _bootstrap and included the main entry point bootstrap.less in your styles doc.

@sintaxi demos this in the getting started video, it is 14 min long but the key bit about bootstrap comes in a the 6min mark.

Hope that helps.

@kennethormandy
Copy link
Collaborator

We’re also experimenting with making this easier through Component. If you want to try it out, you could also:

npm install -g component
harp init test_app
cd test_app
component install harp/bootstrap

Now, in main.less, you can import the Bootstrap less files:

@import "components/harp-bootstrap/less/_bootstrap";

Or even just a portion of them:

@import "components/harp-bootstrap/less/_variables.less";
@import "components/harp-bootstrap/less/_mixins.less";
@import "components/harp-bootstrap/less/_grid.less";

And then you can run harp compile without errors and still get the benefits of using the uncompiled LESS files.

@kennethormandy
Copy link
Collaborator

Feel free to open a new issue if you’re still having problems with this.

@GeoffreyPlitt
Copy link

I'm using bower and hitting the same issue. I can't modify the bower_components because they are .gitignore'd. Please advise?

@kennethormandy
Copy link
Collaborator

@GeoffreyPlitt Looks like you’ve already pieced this together, but ideally it will be #312 or something like it.

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

No branches or pull requests

5 participants