diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2020-03-07 13:32:43 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2020-03-07 13:32:43 +0100 |
commit | 89e4858c2bfe6a528261ba0968e40ffe2360f976 (patch) | |
tree | 78657203011a5b6f6e4a4347286d6b39e40fc156 | |
parent | 76631beb2eead2e6fca10b0b53b1c94338feb8e1 (diff) |
Readme: Exclude irrelevant parts from readme for npm
-rw-r--r-- | README.adoc | 4 | ||||
-rw-r--r-- | Rakefile | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/README.adoc b/README.adoc index 70a4ac9..c34066e 100644 --- a/README.adoc +++ b/README.adoc @@ -62,6 +62,7 @@ where “The First Section” is *title* of the section with id _sec1_ in _other == Installation +ifndef::npm-readme[] === Ruby Install {gem-name} from Rubygems: @@ -76,6 +77,7 @@ gem install {gem-name} --pre === Node.js +endif::npm-readme[] Install {gem-name} from npmjs.com: @@ -85,6 +87,7 @@ npm install --save {gem-name} == Usage +ifndef::npm-readme[] === CLI If you invoke Asciidoctor from command-line, use option `-r` to load the extension: @@ -104,6 +107,7 @@ IMPORTANT: Bundler automatically _requires_ all the specified gems. === Node.js +endif::npm-readme[] [source, js, subs="+attributes"] ---- @@ -28,7 +28,7 @@ task :readme2md do require 'pandoc-ruby' docbook = Asciidoctor - .load_file('README.adoc', header_footer: true, backend: 'docbook') + .load_file('README.adoc', header_footer: true, backend: 'docbook', attributes: 'npm-readme') .convert markdown = PandocRuby .convert(docbook, from: :docbook, to: :markdown_github, 'base-header-level': 2) |