Coder Social home page Coder Social logo

luvit-extras's Introduction

luvit-extras

gmodproj >= 0.4.0

Requirements

Description

Extends the built-in APIs of Luvit with utility or missing features

Documentation

Currently missing a more readable form of documentation, although everything under the src directory annotated.

For synchronous API calls, unlike Luvit, errors are dispatched instead of being returned as the second result, if any.

crypto

Has bindings for some basic OpenSSL functionality

fs

Extension of the fs internal module, providing some helper functions or missing features like fs::watchPoll(string path, number tickRate?, function listener) -> DirectoryPoll or FilePoll

process

Extension of the process internal module, providing missing features like process::chdir(string directory) -> void

vfs

New module providing a simplistic multi-layered virtual file system, supporting basic file system APIs.

vfs = VirtualFileSystem:new()
vfs:mount("test", myVirtualAdapter)

vfs:writeFileSync("test://myfile.txt", "test text") -- Write 'test text' to the file in the virtual adapter
print(vfs:readFileSync("test://myfile.txt"))        -- Should read and print 'test text'

adapters

Adapter classes for configuring sources for the VirtualFileSystem class to use

FileSystemAdapter

Class for configuring a VirtualFileSystem to use an isolated directory on the local machine

vfs     = VirtualFileSystem:new()
adapter = FileSystemAdapter:new("/home/myname/resourcefiles")
vfs:mount("resources", adapter)

vfs:writeFileSync("resources://myfile.txt")

Installation

If wanting to use without gmodproj on luvit, download the latest luvit-extras.lua build from Releases. And use it as you would any other library.

Alternatively, if using with gmodproj. Download the latest .zip or .tar.gz archive from the Releases. Extract the contents of src directory into your project's packages directory under a novacbn/luvit-extras directory.

Building

# Clone the repository
git clone https://github.com/novacbn/luvit-extras

# Move into the project and make the build directory
cd luvit-extras
mkdir ./dist

# Building the project will produce `./dist/luvit-extras.lua`
gmodproj build # Or gmodproj build production

luvit-extras's People

Contributors

novacbn avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.