UNPKG

haxe

Version:

Wrapper of Haxe, an open source toolkit based on a modern, high level, strictly typed programming language, a cross-compiler, a complete cross-platform standard library and ways to access each platform's native capabilities.

33 lines (27 loc) 1.23 kB
var haxelib = require('..').haxelib; var proc = require('child_process'); var InstallHaxelibDependenciesTask = function (deps) { this.dependencies = deps; }; InstallHaxelibDependenciesTask.prototype.run = function(executeNextStep) { console.log("Installing Haxelib Dependencies" ); var options = { cwd : process.env.INIT_CWD, stdio: [process.stdin, process.stdout, process.stderr], encoding: 'utf-8' } for(var module in this.dependencies ){ if(module != "haxe" && module != "haxelib" && module != "neko"){ var version = this.dependencies[module]; if (version !== undefined && version.indexOf("git+") == 0){ var gitRepo = version.substring(4, version.length); console.log(module + ":" + gitRepo); var r = proc.spawnSync("haxelib", ["git", module, gitRepo, "--never"], options); } else { console.log(module + ":" + version); var r = proc.spawnSync("haxelib", ["install", module, version, "--never"], options); } } } }; module.exports.InstallHaxelibDependenciesTask = InstallHaxelibDependenciesTask;