loverocks icon indicating copy to clipboard operation
loverocks copied to clipboard

public API?

Open Alloyed opened this issue 9 years ago • 0 comments

loverocks is already about 80% there. An example from the test files:

local Purge   = require 'loverocks.commands.purge'
local New     = require 'loverocks.commands.new'
local Install = require 'loverocks.commands.install'

New.run {
    project      = "my-project",
    template     = "love",
    love_version = "0.10.1",
}

lfs.chdir("my-project")

Install.run {
    packages = {"inspect"},
    only_server = cwd .. "/test-repo"
}

Purge.run {}

Problems:

  • [ ] global state: current working directory, the logger
  • [X] config loading happens at the command level for reasons I've forgotten, try to hoist it up
  • [X] loverocks.api is already taken by my loverocks <-> luarocks layer. oops.

Alloyed avatar May 25 '16 13:05 Alloyed