diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..f714c1f --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gem "guard" +gem "guard-shell" +gem "asciidoctor" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..b22ecf5 --- /dev/null +++ b/Gemfile.lock @@ -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 diff --git a/Guardfile b/Guardfile new file mode 100644 index 0000000..8234b7a --- /dev/null +++ b/Guardfile @@ -0,0 +1,7 @@ +Bundler.require :default + +guard 'shell' do + watch(/^main\.asciidoc$/) {|m| + Asciidoctor.convert_file m[0], safe: :safe + } +end diff --git a/README.md b/README.md index 1c62ed1..b50bf4a 100644 --- a/README.md +++ b/README.md @@ -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`。Epiphany(GNU Web)を入れて生成されたHTMLを見ると、 +更新時にリロードしてくれるので便利。詳細は[公式ドキュメント](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/)を参照。 + ## Author [艮 鮟鱇(うしとら あんこう/Ushitora Anqou)](https://anqou.net/)