Monday, March 26, 2012

Fixing Twitter Bootstrap and Eclipse Javascript Errors

I've been meaning to play with Twitter Bootstrap and some of it's other associated projects like Font Awesome lately and decided to see if I could integrate into a sample application I'm building.  I'm using an SpringSource Tool Suite 2.9.1 which is based on Eclipse 3.7.2.  When using a Dynamic Web project type and bringing in the assets directory from the Bootstrap download into my WebContent directory, I kept getting JavaScript errors, lots of them.

I realized that it was simply complaining about a single prettify minimized js file that went away if I got the unminimized version.  But I'm stubborn so I refused to let Eclipse win with this work-around...

At first I thought it was related to the Validator or a Builder.  But then I noticed that there was a JavaScript reference to a runtime and I checked the Facets.  Sure enough there is a JavaScript facet that you can unlock and then uncheck.

Since I am not using that capability now, removing that Facet seemed to do the trick once I applied and executed a Project -> Clean, but at least on one occasion I actually had to rename/replace the javascript file that was causing problems to be marked as directed to in this Stack Overflow thread.  Once that was out of the way I now had a nice Bootstrap example ready to customize.  I simply copied one of the html files like starter-template.html or hero.html over from the Bootstrap examples directory and fixed the asset references with a replace-all.  If you have a better approach to get Bootstrap and Eclipse to play nicely, I'd love to hear about it.


InnomaxMediaLLP said...

Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post.
Web development Company

akhil sharma said...

great work...very nice
valentine quote for whatsapp
valentine quote for boyfriend
valentine quote for girlfriend
valentine wishes for wife

Robert Richard said...

Furniture Removalists Sydney A renowned furniture removalists in Sydney, Bondi Removals is now offering furniture removal services at the most competitive prices. The furniture removal services they offer are carried out by their team of highly skilled and talented professionals employing cutting edge technological tools.

Devi.Angularjs said...

Wow. This really made my day. Thanks a lot!

Javascript Training in Chennai | HTML5 Online Training | JQuery Online Training

JavaScript Training Courses | Javascript Online Training | Angular 2 Training in Chennai

Devi.Angularjs said...

Interesting Article

Angularjs Training in Chennai | Backbone.JS Training in Chennai | Bootstrap Training in Chennai | Node.js Training in Chennai | Typescript Training in Chennai

Devi.Angularjs said...

JavaScript Training in Chennai JavaScript Training in Chennai Angular 2 Training in Chennai Angular 2 Training in Chennai | HTML5 Training in Chennai JQuery Training in Chennai JQuery Training in Chennai

Devi.Angularjs said...

HTML5 Training in Chennai HTML5 Training in Chennai | Angular 2 Training in Chennai Node.js Training in CHennai Node.js Training in chennai Ecmascript 6 Training in Chennai Ecmascript 6 Training in Chennai ES6 Training in Chennai ES6 Training in Chennai

Srinivas Ganta said...

very nice trick...thanks bro

Haxie 100 said...

HAPPY NEW YEAR 2017 Wishes
HAPPY NEW YEAR 2017 Profile Pics
HAPPY NEW YEAR 2017 Status Happy New Year Guys

riyaz shaik said...

Free Mp3 music download sites
Free MP3 download sites
Free music download sites
Free Mp3 music download sites 2017

Peter said...

Valentine Week 2017

sendul said...

thanks for a great variety of articles . cara menggugurkan kandungan

suvathi said...

I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.
HTML Training in Chennai

Alex Kevin said...

Thanks for explaining on how to fix these errors, I tried it on the client's website and resolved there issue.

SELVIN said...

Thanks for the great Article its helpful for me .......HTML5 Training In Chennai |
HTML5 course In Chennai

The Admin said...

Good work
Amit Tandon
Sheraz Sikander
Top Pakistani Actress
Famous Pakistani Actors
Pakistani Tv Actors
Muhammad Ali Pakistani Showbiz Affairs
Pakistani Superstar
Hot Pakistani Men

yogesh kumar said...

This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
WordPress development company in Chennai

Praylin S said...

Thank you for sharing this informative post. This article is clearly explained and well executed. Looking forward for more posts from you. Keep updating. Regards.
Javascript Training in Chennai | Javascript Training Courses | Javascript Training Center in Chennai

marshmellow said...

thank u for the info on html5 training in chennai