Skip to content

fullofcaffeine/slackbothx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Haxe Slackbot in nodejs using Xene and Ava

An experiment on consuming TS and JS libraries from Haxe.

Why Haxe?

Todo

  • Better type definitions for Xene (externs) - right now I'm using a lot of Dynamic, so the typing info is weak;
  • I'm not even scratching the surface of Haxe capabilities here, so there's a lot of room for improvement!;
  • Add a linter (there are some for Haxe, looking at the options now);
  • Think about how to write tests, in Haxe, JS or TS? (Haxe classes can be consumed from plain js if needed).

Misc

  • The (haxe) source code is in the haxe_src/ directory;
  • IF needed, TS/JS can be used alongisde Haxe, although I see no real reason for that, but then TS and Babel would need to be included.

Compiling and running

  1. First, install Haxe: http://haxe.org/download/. Use vscode with https://github.com/vshaxe/vshaxe to start with. There also https://github.com/jdonaldson/vaxe for Vim.

  2. Then install the required Haxe libraries:

haxelib install build.hxml
  1. Setup your slack app and bot token as env vars (See the config/ dir);

  2. Then compile and run:

haxe build.hxml && NODE_PATH=./dest node dest/src/app.js

You can also use npm run start to run the command above or npm run watch to run it eveytime a file changes.

Be sure to set the env vars defined in config/custom-environment-variables.yml before.

About

An experiment of a Slackbot app with Haxe and Xene

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages