Fix nat-archive-tool for tink_syntaxhub
This commit is contained in:
@@ -21,8 +21,6 @@ enum CompileLang {
|
||||
typedef CompilationArgs = {
|
||||
// path to a folder where the script will be compiled
|
||||
?outputFolder:String,
|
||||
// path to a file with haxe import statements in it
|
||||
?importHxFile:String,
|
||||
// path to a file with hxml args in it (SHOULD NOT specify target or main class)
|
||||
?hxmlFile:String,
|
||||
// whether to skip haxelib install all --always
|
||||
@@ -107,7 +105,7 @@ class CompilerTools {
|
||||
if (args.extraFiles == null) {
|
||||
args.extraFiles = [];
|
||||
}
|
||||
for (file in [args.importHxFile, args.hxmlFile, args.langProjectFile].concat(args.extraFiles)) {
|
||||
for (file in [args.hxmlFile, args.langProjectFile].concat(args.extraFiles)) {
|
||||
if (file != null) {
|
||||
copyToFolder(file);
|
||||
}
|
||||
|
@@ -1,14 +1,7 @@
|
||||
package nat;
|
||||
|
||||
import kiss.Prelude;
|
||||
import kiss.List;
|
||||
import sys.FileSystem;
|
||||
import nat.ArchiveController;
|
||||
import nat.systems.PlaygroundSystem;
|
||||
import nat.components.*;
|
||||
import haxe.ds.Option;
|
||||
|
||||
using StringTools;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class CLI implements ArchiveUI {}
|
||||
class CLI {
|
||||
static function main() {
|
||||
CLI_.main();
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,11 @@
|
||||
(import sys.FileSystem)
|
||||
(import nat.ArchiveController)
|
||||
(import nat.systems.PlaygroundSystem)
|
||||
(importAll nat.components)
|
||||
(import haxe.ds.Option)
|
||||
|
||||
(implements nat.ArchiveUI)
|
||||
|
||||
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||
(load "Lib.kiss")
|
||||
|
||||
@@ -6,7 +14,7 @@
|
||||
(let [controller
|
||||
(new ArchiveController
|
||||
(new Archive archiveDir)
|
||||
(new CLI))]
|
||||
(new CLI_))]
|
||||
(loop
|
||||
(Sys.print ">> ")
|
||||
(let [command
|
@@ -20,10 +20,10 @@
|
||||
(#extern String python
|
||||
(object
|
||||
hxmlFile "extern-files/python/args.hxml"
|
||||
importHxFile "extern-files/python/import.hx"
|
||||
langProjectFile "extern-files/python/requirements.txt")
|
||||
[:Map<String,Array<String>> params _ :String mediaWikiUrl _ :String maxLag (if maxLag (Std.string maxLag) "1") :Map<String,String> headers _]
|
||||
|
||||
(import requests_externs.Requests)
|
||||
(print "extern query call $params")
|
||||
(let [response
|
||||
(Requests.get mediaWikiUrl
|
||||
|
@@ -10,7 +10,6 @@
|
||||
(object
|
||||
hxmlFile "extern-files/js/args.hxml"
|
||||
skipHaxelibInstall true
|
||||
importHxFile "extern-files/js/import.hx"
|
||||
langProjectFile "extern-files/js/package.json")
|
||||
[]
|
||||
(print "extern hello world!")))
|
||||
|
@@ -1,14 +1,7 @@
|
||||
package test;
|
||||
|
||||
import kiss.Kiss;
|
||||
import kiss.Prelude;
|
||||
import nat.BoolExpInterp;
|
||||
import nat.Archive;
|
||||
import nat.ArchiveController;
|
||||
import nat.Lib;
|
||||
import nat.components.*;
|
||||
import nat.systems.*;
|
||||
import uuid.Uuid;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class TestMain {}
|
||||
class TestMain {
|
||||
static function main() {
|
||||
TestMain_.main();
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,11 @@
|
||||
(import nat.BoolExpInterp)
|
||||
(import nat.Archive)
|
||||
(import nat.ArchiveController)
|
||||
(import nat.Lib)
|
||||
(importAll nat.components)
|
||||
(importAll nat.systems)
|
||||
(import uuid.Uuid)
|
||||
|
||||
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||
(load "../nat/Lib.kiss")
|
||||
|
Reference in New Issue
Block a user