Prev | Current Page 275 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

hx ), all the dependencies are resolved and the output
produced. The compiler must have an entry type because it will not blindly assemble all the files in the
current directory in the final output; it will just use what is really needed and discard everything else.
This very smart feature allows the smallest possible footprint for output. Some dependencies are
resolved automatically while others must be declared explicitly using the import statement, but first
you will see how a package is declared.
For convenience a directory named project is declared and will contain everything that is needed to
build the examples. The directory may be located anywhere on your file system. The project directory
is considered the default package (a package without a name); haXe files that reside directly in the
project directory should not declare a package. In the example, two directories are added to
the directory corresponding to two packages with the same name, and some files are created in them:
project
geom
Circle.


Pages:
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287