How to install

1. Install LUA

To install LUA, please visit: https://www.lua.org/download.html

2. Install Node.js

To install Node.js, please visit: https://nodejs.org/en/download

3. Install Git and create Github account.

To install Git, please visit: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
and to create a Github account, go to: https://github.com/join

3. Install Git and create Github account.

To install Git, please visit: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
and to create a Github account, go to: https://github.com/join

4. Git clone the LuaSparks! template.

The following is the link to the repository: Type the following command into your terminal on the desired directory in which you'd like to install LuaSparks! :

https://github.com/KonstantinVVictoria/LuaSparksTemplate
Make sure to install the necessary npm packages :

5. Run your project!

To run your project, simply run this command on your terminal:

Folder structure

Introduction to Folder Structure

Let's take a deep dive into LuaSpark's folder structure. Please follow the conventions laid out below.

/api

The /api subfolder contains the javascript functions that will be called whenever /api/<javascript file name> is called from the client-side. The convention is to have a folder structure that indicate its request method type: /api/<request>/<javascript file name> or, for example: /api/get/helloWorld.js

/components

The /components subfolder contains all of the HTMLLUA components. HTMLLUA is essentially LuaSparks' alternative of JSX components. The convention is to have a subfolder for each component: /components/<component name>

/javascript

The /javascript subfolder contains all of the javascript functions that will be excuted by your app. Through this convention, you are forced to create javascript functions that are reusable and extensible, ensuring efficient that you write efficient code.

/meta

The /meta subfolder contains a singular global variable that can be accessed from an lua file. This is a convenient place to store themes and information that is required in multiple webpages.

/modules

The /modules subfolder contains all the core files of the LuaSparks framework. We recommend that you do not touch these files unless you know what you are doing or are instructed by the developer.

/node_modules

The /node_modules subfolder contains all the required libraries for epxress.js and the development kit: nodemon and refresh.

/pages

The /pages subfolder contains all the pages of your website. There should be no subfolder in this folder as LuaSparks parses through the folder to create routes for the site.

/state

The /state subfolder contains state variables that when change will re-render portions of the page. The manner in which these states are imperative, meaning you have to reference to specific elements in the DOM to rerender.

/styles

The /styles subfolder contains the global css stylesheet which is where you define all your media-queries or event-driven styling properties..

/website

The /website subfolder contains the rendered/compiled files that will ship to the front-end. This folder contains your production-ready files.