From 03eb1b9ed5cd0994020ebc38bd8c31ef86dab7ad Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 28 Apr 2016 15:46:47 -0700 Subject: [PATCH] pedanticism --- README.md | 7 +------ example.lua | 3 +-- init.lua | 2 ++ 3 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 init.lua diff --git a/README.md b/README.md index a02b218..a2f0444 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,7 @@ Even this README is incomplete. ## Usage -Install the lips directory to somewhere Lua's `package.path` can find it. -If you're using it locally, you'll either need to write something like: -``` -package.path = package.path..";?/init.lua" -``` -or `require "lips.init"` directly. +`local lips = require "lips.init"` You can then use it as such: [example.lua][elua] — [example.asm][easm] diff --git a/example.lua b/example.lua index 3fa85f9..4c75e2a 100644 --- a/example.lua +++ b/example.lua @@ -1,5 +1,4 @@ -package.path = package.path..";?/init.lua" -local lips = require "lips" +local lips = require "lips.init" local err = lips('example.asm') if err then print(err) diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..d3fc36d --- /dev/null +++ b/init.lua @@ -0,0 +1,2 @@ +local path = string.gsub(..., "%.init$", "").."." +return require(path.."lips.init")