Skip to content

Commit 4e493c8

Browse files
committed
use "nvim -l" instead of "lua"
1 parent 64f5d78 commit 4e493c8

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ deps:
3232

3333
.PHONY: test
3434
test: deps json
35-
./scripts/packspec.lua examples/packspec.1.lua
36-
./scripts/packspec.lua examples/packspec.1.json
35+
nvim -l ./scripts/packspec.lua examples/packspec.1.lua
36+
nvim -l ./scripts/packspec.lua examples/packspec.1.json
3737
./deps/bin/busted
3838

3939
.PHONY: json
4040
json: deps
41-
./scripts/generate_json_schema.lua
41+
nvim -l ./scripts/generate_json_schema.lua
4242

4343
.PHONY: clean
4444
clean:

scripts/generate_json_schema.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
#! /usr/bin/env lua5.1
2-
31
-- local cjson = require('cjson')
42
local schema = require('packspec.schema')
53
local format_json = require('utils.format_cjson')
6-
local encoded_json = format_json(schema, "\n", " ")..'\n'
7-
8-
local file = io.open('schema/packspec_schema.json', 'w')
94

5+
local encoded_json = format_json(schema, "\n", " ")..'\n'
6+
local file = assert(io.open('schema/packspec_schema.json', 'w'))
107
io.output(file)
118
io.write(encoded_json)
129
io.close(file)

scripts/packspec.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#! /usr/bin/env lua5.1
2-
31
local function fatal(s, ...)
42
print(string.format(s, ...))
53
os.exit(1)

0 commit comments

Comments
 (0)