generated from EnergoStalin/tampermonkey-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.nvim.lua
88 lines (81 loc) · 1.62 KB
/
.nvim.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
local overseer = require('overseer')
overseer.register_template({
name = 'dev',
builder = function()
return {
name = 'dev',
strategy = { 'orchestrator', tasks = {} },
components = {
'default',
'unique',
{
'dependencies',
task_names = {
'pnpm dev',
'pnpm serve',
}
},
},
}
end,
})
overseer.register_template({
name = 'release',
params = function()
local version = vim.json.decode(
vim.fn.join(
vim.fn.readfile('package.json'), '\n'
)
).version
return {
version = {
type = 'string',
default = version
},
}
end,
builder = function(p)
return {
cmd = 'pnpm release ' .. p.version,
env = {
VERSION = p.version
}
}
end,
})
overseer.register_template({
name = 'install release',
builder = function()
return {
name = 'install local release',
strategy = {
'orchestrator',
tasks = {
{ 'pnpm build' },
{ 'shell', cmd = 'xdg-open ./build/index.user.js' },
}
},
components = {
{ 'on_complete_dispose', require_view = { 'FAILURE' }, timeout = 10 },
'on_exit_set_status',
'unique',
}
}
end,
})
overseer.register_template({
name = 'install greasyfork',
builder = function()
return {
name = 'install remote release',
cmd = 'xdg-open https://update.greasyfork.org/scripts/475316/kemonosu%20links%20for%20ppixiv.user.js',
components = {
{ 'on_complete_dispose', require_view = { 'FAILURE' }, timeout = 10 },
'default',
'unique',
}
}
end,
})
overseer.run_template({ name = 'dev' })
vim.fn.writefile({ "pnpm build", "git add index.user.js" }, ".git/hooks/pre-commit")