• Stars
    star
    218
  • Rank 181,805 (Top 4 %)
  • Language Haxe
  • License
    Creative Commons ...
  • Created over 11 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The official Haxe manual

The Haxe Manual

Build Status

Contributions / Information for authors

For contributions please edit the .md files in content/.

The manual is separated into chapters. Each chapter resides in its own .md file. The syntax is Markdown for the most part, with some special comments mixed in.

Markdown syntax

Standard syntax can be used freely (and in moderation).

Sections and labels

On https://haxe.org/manual, the manual is separated into individual pages. Each page has its own URL and represents a section. Every section has a title and a label. For backward compatibility and flexibility in titles, the label of a section is not directly based on its title.

As an example, the "Property" section has the label class-field-property (which you can see in its URL).

To give a section a label:
<!--label:here-is-the-label-->
## Here is the title

The nesting level of a section depends on the heading level (number of # characters in the title):

  • ## denotes a chapter, only one per .md file
  • ### denotes a section
  • #### denotes a subsection
  • ##### denotes a paragraph (when used without the label tag) or a subsubsection (when used with a label tag)

Links to sections

To reference another section, use the regular Markdown link syntax with the label in place of the URL.

To reference a section:
Please see the [hello world](introduction-hello-world) section.

Haxe code assets (CI-tested)

The Haxe files in the assets/ directory form the majority of the Haxe code samples that are included in the manual. All of these files are automatically tested with Travis CI for all Haxe targets. For the testing procedures and rules, see tests/RunTravis.hx.

On haxe.org, the code samples can be seen included in the sections for a comfortable reading experience. In the .md sources, however, the Haxe files are only referenced with a link to avoid code duplication.

When creating new code assets, please make sure to use haxe-formatter on the file before committing it. The configuration file hxformat.json is provided in the repository.

To include a Haxe code asset:
[code asset](assets/HelloWorld.hx)

The above needs to be on its own line. The code asset text cannot be changed (it is not displayed to the reader anyway).

To include a smaller part of a Haxe code asset:
[code asset](assets/HelloWorld.hx#L2-L4)

The above would only show lines 2 through 4 (inclusive).

Code assets (direct)

Code can also be included in the Markdown content directly. This is convenient for very short snippets, snippets in other languages, or code that is not correct. Where possible, however, please use the CI-tested variant described above.

To include a snippet of Haxe code:
```haxe
trace("Hello, world!");
```
To include a snippet of another language:
```js
console.log("Hello, world!");
```

Code (inline)

Finally, short expressions can be included directly in the text by surrounding the code with backticks.

Flowcharts

Flowcharts are included as svg images:

![](assets/figures/type-system-resolution-order-diagram.svg)

Version information

To indicate that the following information is only true starting from a given Haxe version:
##### since Haxe 4.0.0

Definition

To give a concise definition of a term:
> ##### Define: Some Term
>
> This is the definition of the term.
>
> It can span multiple lines and use other Markdown syntax, too.

Definitions can be referenced from other parts of the manual. Their label is based on the term they describe, e.g. define-some-term for the example above.

Trivia

To give additional information, not crucial to understanding Haxe:
> ##### Trivia: Some Factoid
>
> This is something that is not very important.

Metadata and defines lists

The metadata and define tables are generated automatically from JSON definitions. To update the generated files from the current development branch, simply run haxe generate.hxml in the generate directory (requires curl to be installed and in PATH).

Manual preview

When working on the manual, any Markdown preview (including GitHub renderer) should suffice to show if the text looks correct. To make sure the special Haxe Manual-specific syntax works as expected, please use a local instance of haxe.org. The workflow consists of:

  1. Clone the haxe.org and HaxeManual repositories
  2. Replace the manual directory in haxe.org with a symlink to your local copy of HaxeManual
  3. Start the haxe.org server (haxe start-server.hxml & in the haxe.org repository)
  4. Make changes to the .md files
  5. Run haxe generate.hxml in the haxe.org repository
  6. Check results on localhost:2000, repeat from step 4

You can disable all haxe.org generators except the manual generator in Main.hx to hasten the generation process. A significant speed-up can also be gained by turning off the syntax highlighting.

More Repositories

1

haxe

Haxe - The Cross-Platform Toolkit
Haxe
6,166
star
2

hashlink

A virtual machine for Haxe
C
810
star
3

neko

The Neko Virtual Machine
C
553
star
4

hxcpp

Runtime files for c++ backend for haxe
C++
297
star
5

hscript

Parser and interpreter for Haxe expressions
Haxe
262
star
6

intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
Java
220
star
7

as3hx

Convert AS3 sources to their Haxe equivalent
Haxe
174
star
8

haxelib

The Haxe library manager
Haxe
172
star
9

hxnodejs

Haxe externs for working with node.js
Haxe
171
star
10

dox

Haxe documentation generator.
Haxe
146
star
11

format

Various files formats support for Haxe
Haxe
131
star
12

code-cookbook

The Haxe Code Cookbook - A community driven resource website for learning Haxe in practise
Haxe
112
star
13

haxe-evolution

Repository for maintaining proposal for changes to the Haxe programming language
111
star
14

haxe.org

The haxe.org website
HTML
81
star
15

haxe-markdown

A Markdown parser in Haxe.
Haxe
63
star
16

hxcs

Haxe C# support library. Build scripts and support code.
Haxe
57
star
17

record-macros

Macro-based ORM (object-relational mapping)
Haxe
49
star
18

hxcpp-debugger

Cross-platform debugger for hxcpp
Haxe
49
star
19

crypto

Cross platform cryptographic functions for Haxe
Haxe
48
star
20

npm-haxe

Install Haxe using Node Package Manager aka npm
JavaScript
46
star
21

hxjava

Haxe Java support library. Build scripts and support code.
Haxe
46
star
22

tora

NekoVM Application Server
Haxe
30
star
23

docker-library-haxe

Docker official image for Haxe
Dockerfile
28
star
24

ocamllibs

Various OCaml Libraries
OCaml
24
star
25

Project-Management

Project management and communication
20
star
26

haxedevelop.org

Website content and sources
Haxe
19
star
27

try.haxe.org

run Haxe code snippets in your browser
Haxe
18
star
28

hx3compat

Haxe 3 compatibility lib for Haxe 4
Haxe
16
star
29

html-externs

HTML externs for Haxe
IDL
15
star
30

hxnodelibs

Haxe
14
star
31

ocamhaxe

OCaml distribution for Haxe compilation
Haxe
11
star
32

haxe-debian

Debianizing Haxe
Haxe
11
star
33

api.haxe.org

Haxe API documentation
Haxe
10
star
34

hxgithub

Haxe
8
star
35

haxe-terraform

Haxe Foundation infrastructure
HCL
5
star
36

nekovm.org

The website for NekoVM.
Haxe
5
star
37

neko-debian

Debianizing Neko
C
4
star
38

build.haxe.org

Snapshot build storage web UI
Haxe
3
star
39

hx4compat

Haxe 4 compatibility lib for Haxe 5, or maybe the other way aroun?
Haxe
3
star
40

haxe.org-comments

Repository to collect comments of our haxe.org websites
2
star
41

hashlink.haxe.org

HTML
2
star
42

homebrew-haxe

Haxe formulae for the Homebrew package manager
Ruby
1
star
43

summit.haxe.org

Haxe
1
star
44

haxe-deps

A luarocks spec for the dependencies required for the Haxe Lua target
Lua
1
star
45

haxe-choco

Chocolatey Haxe package
Haxe
1
star