This commit is contained in:
2021-05-18 12:27:39 -06:00
parent 92b56b167d
commit d32ade642f
9 changed files with 46 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
package nap;
import sys.FileSystem;
@:build(kiss.Kiss.build())
class Archive {}

View File

@@ -0,0 +1,11 @@
(defnew [archiveDir]
[:Map<String,Entry> entries
(let [entryFiles (FileSystem.readDirectory archiveDir)]
(doFor ))
:Array<System> systems []] // TODO also create systems
)
(defun loadFromDir [archiveDir]
)
(defmethod :Void handleEvent [:Event e])

View File

@@ -0,0 +1,7 @@
package nap;
/**
* All types of user input events to the NAP system. Archive handles these, acting as a backend
* for whichever front-end generates the Events.
*/
enum Event {}

View File

View File

@@ -1,4 +1,16 @@
(defun :Void main []
(let [archiveDir
// TODO pattern matching program arguments will be more complicated once --cache and other arguments are introduced
(ifLet [[dir] (Sys.args)]
dir
(Sys.getCwd))
archive
(new Archive archiveDir)]
(archive.process)))
/*
(let [e (new Entry "name")]
(dictSet e.components "f" [5])
(dictSet e.components "b" [(object c "d")])
@@ -6,3 +18,4 @@
:Entry e2 (haxe.Json.parse s)]
// can't call Entry methods on e2
(print s))))
*/

View File

@@ -0,0 +1,4 @@
package nap;
@:build(kiss.Kiss.build())
class System {}

View File

@@ -0,0 +1 @@
(defprop :List<Entry> entries [])

View File

@@ -0,0 +1,3 @@
package nap.components;
typedef Tag = String;

View File