Giter Club home page Giter Club logo

haxelib's Introduction

Haxelib

For more documentation, please refer to haxe.org

TravisCI Build Status AppVeyor Build Status

Per-project setup

Currently haxelib has two ways to have project local setups.

  1. Using haxelib newrepo
  2. Using haxelib install all

Using haxelib newrepo

When using haxelib newrepo you can have a project-local haxelib repository. This feature is quite new and a little rough around the edges.

Caveats:

  • if you mistakenly run a haxelib command in a subdirectory of your project, it will be executed on the global repo (to be fixed)
  • there may be some issues with haxelib run and haxelib selfupdate (to be fixed)
  • libraries get downloaded for each project
  • it requires a recent Haxe version (after 3.1.3) to work properly with ndlls.

Using haxelib install all

Haxe allows you to define specific versions of the libraries you want to use with -lib <libname>:<version>. If you make sure to use this in all your hxmls, then haxelib install all --always (the --always avoiding you being prompted for confirmation) will be able to ensure the libraries your project needs are available in the necessary versions. If in fact you run this in a checkout hook, your get to track your dependencies in your git repo (some other VCSs should allow for a similar setup), allowing you to have a well defined and replicable setup for any state (commit/branch/etc.).

Disadvantages:

  • the approach requires you to define all dependencies with specific versions and then running haxelib install all to grab them
  • with this approach, any other project that does not have specific versions defined may be affected, as under some circumstances haxelib install all may set the global "current" version of the libraries (to be fixed)

Advantages:

  • as pointed out above, this approach allows defining a versionable and replicable state.
  • you don't have to download libraries for each project, which does make a difference for heavy weights like openfl and hxcpp

Sidestepping haxelib git issues

Because you cannot specify git versions with -lib paremeters, we suggest using git submodules instead, as again they provide an adequate way of definining a versionable and replicable state.

Combining both approaches

You can of course combine both approaches, giving you the isolation provided by the first one, and the replicability provided by the second one.

Future solutions

A solution that combines the strengths of both approaches is in the making. Stay tuned.


Running the website for development

# Initial checkout
git clone https://github.com/HaxeFoundation/haxelib

# Change to the checkout directory
cd haxelib

# Install all the libs
haxelib install newsite.hxml

# Create directories
mkdir -p www/legacy
mkdir -p www/api/3.0
mkdir -p www/files/3.0

# TODO: copy assets

# Compile the site
haxe legacysite.hxml
haxe newsite.hxml

# TODO: check the permissions, writeable directories etc.

# Start the server
nekotools server -rewrite

About this repo

Build files:

  • haxelib.hxml: Build the current haxelib tool from src/haxelib/Main
  • legacyhaxelib.hxml: Build the haxelib tool that works with Haxe 2.x
  • legacysite.hxml: Build the legacy website.
  • prepare.hxml: Build a tool to prepare the server (I think)
  • newsite.hxml: Build the new website, the new site unit tests, and the Haxe remoting API. (Also runs the unit tests).
  • test.hxml: Build the automated tests.

Folders:

  • /src/: Source code for the haxelib tool and the website, including legacy versions.
  • /bin/: The compile target for building the haxelib tool, legacy tool, and site preparation tool.
  • /www/: The compile target (and supporting files) for the haxelib website (including legacy site and API)
  • /test/: Unit test source code for running on Travis.
  • /testing/: A setup for manually testing a complete setup.
  • /package/: Files that are used for bundling the haxelib_client zip file.

haxelib's People

Contributors

jasononeil avatar back2dos avatar nadako avatar simn avatar andyli avatar thehippo avatar ncannasse avatar matttuttle avatar waneck avatar atry avatar dr-emann avatar polygonal avatar tkawachi avatar jgranick avatar jens-g avatar gama11 avatar andywhite37 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.