Coder Social home page Coder Social logo

loverboy's Introduction

💘 Löverboy

I learned my passion in the good old-fashioned school of lover boys

Löverboy makes it easy to add Lua libraries to your LÖVE project with a simple set of commands. Library files are added directly to your project directory so distributing your game is a snap.

Table of contents

Installation

The easiest way to install Löverboy is using LuaRocks:

$ luarocks install loverboy

You’ll also need the metafiles that describe the libraries available to Löverboy:

$ git clone https://github.com/ngscheurich/loverboy-mfiles.git ~/.local/share/loverboy

Usage

Usage: loverboy [OPTIONS]

COMMANDS:
  add           Add a library to the current project
  info          Display information about a library
  search        Search available libraries
  update        Update local metafiles cache

OPTIONS:
  -v, --version Prints the program's version

Roadmap

  • Install multi-file libraries, e.g., hump, to their own subdirectory
  • Consolidate installation of Löverboy and metafiles
  • Let user select a subset of files from a multi-file library

Contributing

PRs are welcome—just be sure and adhere to the code of conduct.

Is your favorite library not available? You’ll want to have a look at the Löverboy Metafiles repo.

License

Löverboy is released under the MIT license.

loverboy's People

Contributors

ngscheurich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

loverboy's Issues

repos with folders aren't supported

As far as I can tell, repos with folders aren't supported. The current windfield has two problems:

  1. windfield has all its code in a folder
  2. mlib is incorrectly spelled mib in the mfiles

So if you try to install it, it looks successful:

$ mkdir lib
$ loverboy add windfield
==> Adding windfield (master)...
  * lib/init.lua
  * lib/mlib/mib.lua
Done!

But actually, it was not:

$ find lib -type f -exec head -n2 {} +
==> lib/mlib/mib.lua <==
404: Not Found

==> lib/init.lua <==
404: Not Found

Fixing the typo doesn't make things better. I tried a couple methods of describing the path to download in the mfiles

Tested on loverboy version 0.1.0 and ngscheurich/loverboy-mfiles@f45fcbf

I think a remapping syntax like this would make sense:

files = {
  -- structure of table defines desired folder structure
  windfield = {
    "windfield/init.lua", -- path of string defines folder structure in git
  }
}

Loverboy doesn't explain about mfiles

On first install, if you've forgotten to setup the mfiles, you get a stacktrace:

$ loverboy help
/usr/local/opt/lua/bin/lua5.3: /usr/local/share/lua/5.3/loverboy/util.lua:10: cannot open ~/.local/share/loverboy/mfiles: No such file or directory
stack traceback:
    [C]: in function 'lfs.dir'
    /usr/local/share/lua/5.3/loverboy/util.lua:10: in local 'load_mfiles'
    /usr/local/share/lua/5.3/loverboy/util.lua:19: in main chunk
    [C]: in function 'require'
    /usr/local/share/lua/5.3/loverboy.lua:4: in main chunk
    [C]: in function 'require'
    ...cal/lib/luarocks/rocks-5.3/loverboy/0.1.0-1/bin/loverboy:3: in main chunk
    [C]: in ?

Instead, it'd be nice to tell the user what to do:

$ loverboy help
cannot open ~/.local/share/loverboy/mfiles: No such file or directory

To get mfiles, run:
    git clone https://github.com/ngscheurich/loverboy-mfiles.git ~/.local/share/loverboy

Loverboy doesn't create lib folder for you or explain that you must create it

After installing loverboy and creating a new empty project folder, loverboy fails to add a library.

$ mkdir puppypark
$ cd puppypark
$ loverboy add baton
==> Adding baton (v1.0)...
* lib/baton.lua
/usr/local/opt/lua/bin/lua5.3: /usr/local/share/lua/5.3/loverboy/util.lua:74: lib/baton.lua: No such file or directory
stack traceback:
    [C]: in function 'assert'
    /usr/local/share/lua/5.3/loverboy/util.lua:74: in function 'loverboy.util.download'
    /usr/local/share/lua/5.3/loverboy/add.lua:21: in local 'recursiveDownload'
    /usr/local/share/lua/5.3/loverboy/add.lua:50: in main chunk
    /usr/local/share/lua/5.3/cliargs/parser.lua:54: in function </usr/local/share/lua/5.3/cliargs/parser.lua:51>
    (...tail calls...)
    /usr/local/share/lua/5.3/cliargs.lua:13: in method 'parse'
    /usr/local/share/lua/5.3/loverboy.lua:24: in main chunk
    [C]: in function 'require'
    ...cal/lib/luarocks/rocks-5.3/loverboy/0.1.0-1/bin/loverboy:3: in main chunk
    [C]: in ?

Creating a lib/ directory fixes the problem, but the output doesn't clearly indicate that's the solution.

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.