Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.
/ NEON Public archive

A simple dependency fetcher for Synapse

Notifications You must be signed in to change notification settings

Belkworks/NEON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEON

A simple dependency fetcher for Synapse.

Loader

Run this snippet to download and run NEON.

if not NEON then
    if not isfile('neon/init.lua')then
        makefolder('neon')
        local raw = 'https://raw.githubusercontent.com/%s/%s/master/init.lua'
        writefile('neon/init.lua',game:HttpGet(raw:format('belkworks','neon')))
    end
    pcall(loadfile('neon/init.lua'))
end
-- now NEON will be in the environment!

Alternatively, you can download the loader and put it in your autoexec folder.

API

Loading from GitHub

:github(author, repository, opts)
-- gets 'init.lua' from the 'master' branch
quick = NEON:github('belkworks', 'quick')

To use a different file/branch, specify file or branch in opts.

Loading from Pastebin

:pastebin(id, opts)
package = NEON:pastebin('pastebin-id')

Loading from Ghostbin

:ghostbin(id, opts)

Loading from URL

:web(url, opts)
package = NEON:web('http://path.to/the/file.lua')

Options

opts is a dictionary that changes how modules are loaded/saved.

Key Type Default Description
cache Boolean True Save the resource to file
minify Boolean True Save the resource as minified Lua
fresh Boolean False Force the resource to be redownloaded
text Boolean False Return the raw text
maxAge Number 7 Days Maximum cached age (in minutes)
secured String Value to take from the global environment

Official Modules

  • quick - an underscore port
  • broom - a reactive task runner, inspired by Nevermore's maid class.
  • nest - an event emitter
  • flat - a simple flatfile database
  • chance - a random generator
  • logfile - a log writer
  • synlog - a visual logger compatible with logfile
  • chalk - a terminal styler
  • future - an alternative to promises
  • hold - a caching mechanism
  • machine - a robust state machine
  • clerk - a state manager
  • gate - a pausable event handler
  • builder - a table builder
  • mono - a table printer
  • chain - a middleware runner
  • flags - a flag reader/writer
  • bucket - a rate limiter
  • envo - secure environment variables