Scion flow and folder structure
Created by: feyzo
@jbeard4 I draw how we should change folders and flow below. We started thinking about this because whether we inline script file contents or not.
I think; on compiler side, we should check and validate script file, raise errors if there is a problem. But we shouldn't inline file contents. Since file system is a platform specific area, we can make a cross platform utility library. This library can serve both compiler and runtime. We can expose some library methods to runtime like this.loadScript('/included.js');
converted from <script src="/included.js"/>
Another thing to note, if there is an included script in scxml, i think compiler should output original javascript module and included script. This way we can cut the cord between runtime and compiler being on different folder paths.
+-----------+ | SCXML | +-----+-----+ | | Helper Module +-------------v-----------+ +---------------------| COMPILER | | |-------------------------| | | *Platform independent | | | | | | Validate SCXML | | | | | | Generate SCJSON | | | | | | Generate Module | | +-------------------------+ | | | | | +---------------v--------------+ | | OUTPUT | | |------------------------------| +--------+---------+ | +-------------------------------------+ | UTILS | | Compiled Javascript Module | | |------------------| | | | | Cross platform | +------------------------------+ | | File system | +-------------v---------------+ | Console | | TEST SERVER | | HTTP | |-----------------------------| | DOM | |Does only communication | | | Compiled Javascript Module +between compiler and runtime | | | +-+--------------------------------------+ | | | | | | +--------+---------+ | +-----------------------------+ | | | | | Helper module +-------------v-------------+ +-------------------> RUNTIME | |---------------------------| | *Platform independent | | SCION-CORE | | | | | | | | | +---------------------------+