Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clemos/haxe-bootstrap
Haxe externs for Twitter Bootstrap
https://github.com/clemos/haxe-bootstrap
Last synced: 7 days ago
JSON representation
Haxe externs for Twitter Bootstrap
- Host: GitHub
- URL: https://github.com/clemos/haxe-bootstrap
- Owner: clemos
- Created: 2012-04-17T17:17:41.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-06-18T19:35:16.000Z (over 8 years ago)
- Last Synced: 2024-11-09T02:18:11.875Z (2 months ago)
- Language: Haxe
- Homepage:
- Size: 62.5 KB
- Stars: 17
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
## Haxe Bootstrap
This very simple library makes it easier to use
**[Twitter Bootstrap Javascript plugins](http://twitter.github.com/bootstrap/javascript.html)**
in an **[Haxe/JS](http://www.haxejs.org/)** project### Getting started
Clone this repository and [Bootstrap](http://twitter.github.com/bootstrap/)'s somewhere :
git clone git://github.com/clemos/haxe-bootstrap.git
git clone git://github.com/twitter/bootstrap.gitInclude 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:
- **[Buttons](http://twitter.github.com/bootstrap/javascript.html#buttons)** `using js.bootstrap.Button;`
- **[Dropdowns](http://twitter.github.com/bootstrap/javascript.html#dropdowns)** `using js.bootstrap.Dropdown;`
- **[Modals](http://twitter.github.com/bootstrap/javascript.html#modals)** `using js.bootstrap.Dropdown;`
- **[Popovers](http://twitter.github.com/bootstrap/javascript.html#popovers)** `using js.bootstrap.Popover;`
- **[Tooltips](http://twitter.github.com/bootstrap/javascript.html#tooltips)** `js.bootstrap.Tooltip;`
- **[Alerts](http://twitter.github.com/bootstrap/javascript.html#alerts)** `js.bootstrap.Alert;`
- **[Tabs](http://twitter.github.com/bootstrap/javascript.html#tabs)** `js.bootstrap.Tab;`