-
Notifications
You must be signed in to change notification settings - Fork 0
/
push.ts
61 lines (55 loc) · 1.71 KB
/
push.ts
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
import Command from '../../command'
import { flags } from '@oclif/command'
import proxy from '../../nimbu-gem/command'
export default class ThemesPush extends Command {
static description = 'push the theme code online'
static flags = {
// --liquid, --liquid-only # only push template code
liquid: flags.boolean({
hidden: true,
}),
'liquid-only': flags.boolean({
description: 'only push template code',
}),
// --css, --css-only # only push css
css: flags.boolean({ hidden: true }),
'css-only': flags.boolean({
description: 'only push css',
}),
// --js, --js-only # only push javascript
js: flags.boolean({ hidden: true }),
'js-only': flags.boolean({
description: 'only push javascript',
}),
// --images-only # only push new images
'images-only': flags.boolean({
description: 'only push new images',
}),
// --fonts-only # only push fonts
'fonts-only': flags.boolean({
description: 'only push fonts',
}),
// --only # only push the files given on the command line
only: flags.boolean({
description: 'only push the files given on the command line',
}),
// --force # skip the usage check and upload anyway
force: flags.boolean({
description: 'skip the usage check and upload anyway',
}),
}
static strict = false
static args = [
{
name: 'files',
description: 'The files to push with --only',
},
]
async run() {
await this.nimbu.validateLogin()
if (this.nimbu.token !== undefined) {
// don't parse, then this.argv is the original arguments (including flags)
await proxy(this.nimbu.token, 'themes:push', this.argv)
}
}
}