https://github.com/afaur/haxe-node
https://github.com/afaur/haxe-node
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/afaur/haxe-node
- Owner: afaur
- Created: 2016-01-01T23:38:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-01T23:47:36.000Z (over 10 years ago)
- Last Synced: 2025-04-06T08:24:29.017Z (over 1 year ago)
- Language: Haxe
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this project
This is a very basic example project for building a `Node JS` program with `Haxe`.
# Background
Haxe allows you to target multiple operating systems and languages.
# Compile To..
Haxe can compile into:
- Actionscript3 (as3)
- Javascript (js)
- Java (java)
- C# (cs)
- Python (py)
- C++ (cpp)
- PHP (php)
- Neko (n)
# Getting started
Download Haxe here: http://haxe.org/download/
Then run the `haxelib setup` command.
Here is an example:
```
// The `haxelib setup` command does not understand ~ so
// you must specify the dir absolutely.
// Also using .haxelib doesn't seem to work properly as of now.
// Replace `username` below with your system user
haxelib setup /Users/username/haxelib
```
# Download dependencies
This is so we can run our tests, and use node js bindings.
```
haxelib install munit
haxelib install hamcrest
haxelib install hxnodejs
```
After that you should be able to `git clone` this project and then run: `./bin/compile`
---
> `compile` is just a bash script that runs `haxe build.hxml`
> For more information on `build.hxml` look here:
> - http://old.haxe.org/doc/compiler
The `build.hxml` file tells the compiler to:
- Find the source files inside `src`
- Create a `Main.js` file in the `build` directory.
The `./bin/clean` bash script will clean out the build directory.
Try changing the build target by using the other options found at:
- http://haxe.org/documentation/introduction/compiler-usage.html
# Running tests
Right now there is only one test but it can be run using: `./bin/check`