Skip to content

freakinruben/haxe-bootstrap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Haxe Bootstrap

This very simple library makes it easier to use Twitter Bootstrap Javascript plugins in an Haxe/JS project

Getting started

Clone this repository and Bootstrap's somewhere :

git clone git://github.com/clemos/haxe-bootstrap.git
git clone git://github.com/twitter/bootstrap.git

Include haxe-boostrap to your haXe project's classpath, with -cp haxe-bootstrap

Embedding

By default, the library will take care of embedding the appropriate javascript code from bootstrap, so you don't need to link them manually.

You may need to set the path to your local bootstrap repo, though, which you can do either in your build.hxml file:

--macro bootstrap.Lib.setPath('some-other-path')

Or in your code:

bootstrap.Lib.setPath('yet-another-path')

You can also disable embedding with the -D noEmbedBootstrap flag.

The default path is "lib/bootstrap". The setPath macro uses haxe.macro.Tools.includeFile.

Using Bootstrap

You can then access bootstrap methods in your Haxe/JS class with the using keyword :

using js.bootstrap.Button;
// ...
    new JQuery(".my-button").button();

For better type-safety, methods such as .button("toggle") are accessible with .buttonToggle().

The following plugins are currently implemented:

About

Haxe externs for Twitter Bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haxe 100.0%