Alizarin

GitHub release (latest by date) LICENSE MIT CRYSTAL 1.0.0 webkit2gtk

Alizarin is a Crystal shard that helps you build Linux GUI applications using Web Technologies (HTML5, CSS3, JavaScript). This shard also provides ability to extend JavaScript code with native functionalities.

Examples

Markdown - A markdown editor written with Alizarin

Installation

   dependencies:
     alizarin:
       github: TheEEs/alizarin

NOTE This shard requires libwebkit2gtk-4.0 to be installed. Makes sure you have it installed into your system.

    $ sudo apt-get install -y libwebkit2gtk-4.0

Usage

require "alizarin"
  require "alizarin"
  require "colorize"

  webview = WebView.new 

  webview.on_close do |webview|
    puts "#{webview} is going to close".colorize :green
    exit 0
  end

  webview.window_size 800, 600
  webview.load_url "https://crystal-lang.org/"

  webview.run
  webview["enable-developer-extras"] = true
  webview.show_inspector

NOTE There is also test cases located in /spec folder.

To run test case, types:

$ git clone https://github.com/TheEEs/alizarin
$ cd alizarin
$ make
$ crystal spec

See Alizarin API for more.

Development

TODO Write Development instructions here.

Contributing

  1. Fork it https://github.com/TheEEs/alizarin/fork
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Author