Add Gemfile and Guardfile

This commit is contained in:
Ushitora Anqou 2020-03-31 20:58:22 +09:00
parent 4e377cabc7
commit b8414005e8
4 changed files with 69 additions and 0 deletions

5
Gemfile Normal file
View File

@ -0,0 +1,5 @@
source "https://rubygems.org"
gem "guard"
gem "guard-shell"
gem "asciidoctor"

48
Gemfile.lock Normal file
View File

@ -0,0 +1,48 @@
GEM
remote: https://rubygems.org/
specs:
asciidoctor (2.0.10)
coderay (1.1.2)
ffi (1.12.2)
formatador (0.2.5)
guard (2.16.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-shell (0.7.1)
guard (>= 2.0.0)
guard-compat (~> 1.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.4)
method_source (1.0.0)
nenv (0.3.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.13.0)
coderay (~> 1.1)
method_source (~> 1.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
shellany (0.0.1)
thor (1.0.1)
PLATFORMS
ruby
DEPENDENCIES
asciidoctor
guard
guard-shell
BUNDLED WITH
1.17.2

7
Guardfile Normal file
View File

@ -0,0 +1,7 @@
Bundler.require :default
guard 'shell' do
watch(/^main\.asciidoc$/) {|m|
Asciidoctor.convert_file m[0], safe: :safe
}
end

View File

@ -7,6 +7,15 @@
[ここからmasterが読めます。](https://ushitora-anqou.github.io/write-your-llvm-backend/)
## ビルド方法
Asciidoctorのmasterを持ってきて`asciidoctor main.asciidoc`とかする。
文章を書くときに、ファイルを更新するたびにコンパイルしたい場合は
付属の`Gemfile`と`Guardfile`を使って`bundle exec guard`とかする。
要`bundle install`。EpiphanyGNU Webを入れて生成されたHTMLを見ると、
更新時にリロードしてくれるので便利。詳細は[公式ドキュメント](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/)を参照。
## Author
[艮 鮟鱇(うしとら あんこうUshitora Anqou](https://anqou.net/)