blob: 366d04e8299bbf5a834b3dc6575c6ad484e12ff1 (
plain)
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
|
usage 'frontend [options]'
aliases :ds, :stuff
summary 'uses nanoc cli to execute frontend related tasks'
description 'This command is used by the Nanoc CLI to bundle the JavaScript.'
flag :h, :help, 'show help for this command' do |value, cmd|
puts cmd.help
exit 0
end
run do |opts, args, cmd|
puts 'Compiling JavaScript...'
unless system('yarn install --frozen-lockfile')
abort <<~ERROR
Error: failed to run yarn. JavaScript compilation failed. For more information, see:
https://gitlab.com/gitlab-org/gitlab-docs/blob/master/README.md
ERROR
end
unless system('yarn bundle')
abort <<~ERROR
Error: failed to run yarn. JavaScript compilation failed. For more information, see:
https://gitlab.com/gitlab-org/gitlab-docs/blob/master/README.md
ERROR
end
end
|