asciidoctor-revealjs 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5368399f156f92de3794d4919d8fc0740fbec78d
4
- data.tar.gz: 3ad253db3e4038170b061836a8fe4c27c35fd674
3
+ metadata.gz: 14b2dd8f11550942b75a46297e1be232d179fc0a
4
+ data.tar.gz: 86e9d3aff792a1c83b57bd0ecbb7677680b44308
5
5
  SHA512:
6
- metadata.gz: dd3c0ec294a8b66ad5cf1d761642d30b8b461a1a4f54e8021997dd0a7960f82afdf0a780f576b1680188e3bda89693c6dfcdf64b131addd98ec1c17e7adce937
7
- data.tar.gz: b44326137fc221a903834d047254c34b30d335d263913e12e9fb77618e5bbaca0f298aab8be8374f54ffdae926b8ede32c51e045a13caba701bc78002e91cb2d
6
+ metadata.gz: 7bb80a495ef1343f0138230c39f7f50d62ef605030649305383bf3962a10a7a8f76cb5eca90403bd35d03f266d60ef941b2ba764bde8922f25f573211f76bac3
7
+ data.tar.gz: 77b81ec739da0c63e5746cd1d6e7f9eb93b2090ff4e28ad4d7c5ea1b4e219db0bda344de1c675a3746ba6e0464b273e609b343627356f4d2654f35e61c4b67b5
data/CHANGELOG.adoc CHANGED
@@ -5,11 +5,10 @@
5
5
  This document provides a high-level view of the changes introduced in {project-name} by release.
6
6
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
7
7
 
8
- == 1.0.1 (2016-10-12) - @obilodeau
8
+ == 1.0.2 (2016-12-22) - @obilodeau
9
9
 
10
10
  Enhancements::
11
- * Documentation: aligned release process for both npm and ruby gems packages
12
- * npm package in sync with ruby gem
11
+ * Ruby back-end is now compiled in Javascript with Opal (#115)
13
12
 
14
13
  ////
15
14
  Compliance::
@@ -22,6 +21,12 @@ Infrastructure::
22
21
  * item
23
22
  ////
24
23
 
24
+ == 1.0.1 (2016-10-12) - @obilodeau
25
+
26
+ Enhancements::
27
+ * Documentation: aligned release process for both npm and ruby gems packages
28
+ * npm package in sync with ruby gem
29
+
25
30
  == 1.0.0 (2016-10-06) - @obilodeau
26
31
 
27
32
  Since this is the first ever "release" of asciidoctor-reveal.js (we used to do continuous improvements w/o releases in the past), this list focuses on the major enhancements introduced over the last few weeks.
data/HACKING.adoc CHANGED
@@ -204,8 +204,7 @@ In order to test the Node package, you need to create a test project adjacent to
204
204
 
205
205
  Now, install the dependencies:
206
206
 
207
- $ npm i --save asciidoctor.js@1.5.5-2
208
- $ npm i --save asciidoctor-template.js@1.5.5-2
207
+ $ npm i --save asciidoctor.js@1.5.5-3
209
208
  $ npm i --save ../asciidoctor-reveal.js
210
209
 
211
210
  NOTE: The relative portion of the last command is where you are installing the local `asciidoctor-reveal.js` version from.
@@ -233,12 +232,16 @@ Then proceed as documented in the `README.adoc`.
233
232
  $ gem push asciidoctor-revealjs-X.Y.Z.gem
234
233
 
235
234
  . Check that the new version is available on https://rubygems.org/gems/asciidoctor-revealjs[rubygems.org]
235
+ . Build the node package (make sure you have `devDependencies` installed with: `npm install`):
236
+ +
237
+ $ npm run build
238
+
236
239
  . Publish the node package on npm:
237
240
  +
238
241
  $ npm login
239
242
  $ npm publish
240
243
 
241
244
  . Check that the new version is available on https://www.npmjs.com/package/asciidoctor-reveal.js[npmjs.com]
242
- . Update version (+1 bugfix and append '.dev') and commit
245
+ . Update version in `lib/asciidoctor-revealjs/version.rb` and `package.json` (+1 bugfix and append '-dev') and commit
243
246
  ** commit msg: Begin development on next release
244
247
 
data/README.adoc CHANGED
@@ -1,27 +1,44 @@
1
- = reveal.js backend for Asciidoctor
1
+ = Reveal.js converter for Asciidoctor
2
+ Olivier Bilodeau <https://github.com/obilodeau[@obilodeau]>; Guillaume Grossetie <https://github.com/mogztter[@mogztter]>; Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Rahman Usta <https://github.com/rahmanusta[@rahmanusta]>; Charles Moulliard <https://github.com/cmoulliard[@cmoulliard]>
3
+ ifdef::env-github,env-browser[]
2
4
  :toc: preamble
3
5
  :toclevels: 2
4
- :uri-us: https://github.com/asciidoctor/asciidoctor-reveal.js
6
+ endif::[]
7
+ ifdef::env-github[]
8
+ :status:
9
+ :outfilesuffix: .adoc
10
+ :!toc-title:
11
+ :caution-caption: :fire:
12
+ :important-caption: :exclamation:
13
+ :note-caption: :paperclip:
14
+ :tip-caption: :bulb:
15
+ :warning-caption: :warning:
16
+ endif::[]
17
+ :uri-project-repo: https://github.com/asciidoctor/asciidoctor-reveal.js
5
18
  :uri-asciidoctor: https://github.com/asciidoctor/asciidoctor
6
19
  :uri-asciidoctorjs: https://github.com/asciidoctor/asciidoctor.js
7
20
  :uri-revealjs-home: http://lab.hakim.se/reveal-js/
8
21
  :uri-revealjs-gh: https://github.com/hakimel/reveal.js
9
22
  :uri-nodejs-download: https://nodejs.org/en/download/
10
23
 
11
- // Changes made here should be sync'ed in packages.json's readme field
12
- The {uri-us}[reveal.js backend] is a collection of templates for {uri-asciidoctor}[Asciidoctor] (or {uri-asciidoctorjs}[Asciidoctor.js]) that transform an AsciiDoc document into HTML5 slides animated by {uri-revealjs-home}[reveal.js].
24
+ ifdef::env-github[]
25
+ image:http://img.shields.io/gem/v/asciidoctor-revealjs.svg[gem, link=https://rubygems.org/gems/asciidoctor-revealjs]
26
+ image:http://img.shields.io/npm/v/asciidoctor-reveal.js.svg[npm, link=https://www.npmjs.org/package/asciidoctor-reveal.js]
27
+ endif::[]
28
+
29
+ // IMPORTANT: Changes made to this description should be sync'ed with the readme field in package.json.
30
+ {uri-project-repo}[Asciidoctor reveal.js] is a converter for {uri-asciidoctor}[Asciidoctor] and {uri-asciidoctorjs}[Asciidoctor.js] that transforms an AsciiDoc document into an HTML5 presentation designed to be executed by the {uri-revealjs-home}[reveal.js] presentation framework.
13
31
 
14
32
  //image:https://travis-ci.org/asciidoctor/asciidoctor-reveal.js.svg?branch=master[Build Status,link=https://travis-ci.org/asciidoctor/asciidoctor-reveal.js]
15
33
 
16
- There are two main technology stacks that can transform AsciiDoc into HTML5 / Reveal.js:
34
+ There are two main technology stacks that can transform AsciiDoc into HTML5 / reveal.js:
17
35
 
18
- * Asciidoctor / Ruby / Slim / Bundler (<<ruby, instructions here>>)
19
- * Asciidoctor.js / JavaScript / Jade / Node.js (<<javascript, instructions here>>)
36
+ * Asciidoctor / Ruby / Slim / Bundler (See <<Ruby Setup>>)
37
+ * Asciidoctor.js / JavaScript / Jade / Node.js (See <<Node / JavaScript Setup>>)
20
38
 
21
39
  Right now the Ruby / Slim templates are more featureful but that is changing quickly.
22
40
 
23
41
 
24
- [[ruby]]
25
42
  == Ruby Setup
26
43
 
27
44
  NOTE: asciidoctor-reveal.js is now a Ruby Gem.
@@ -60,6 +77,7 @@ NOTE: These instructions should be repeated for every presentation project.
60
77
 
61
78
  . Create a file named `Gemfile` with the following content:
62
79
  +
80
+ [source,ruby]
63
81
  ----
64
82
  source 'https://rubygems.org'
65
83
 
@@ -92,7 +110,6 @@ NOTE: For some reason, when you use the system Ruby on Fedora, you also have to
92
110
  TIP: If you are using https://pages.github.com/[GitHub Pages], plan ahead by keeping your source files on `master` branch and all output files on the `gh-pages` branch.
93
111
 
94
112
 
95
- [[javascript]]
96
113
  == Node / JavaScript Setup
97
114
 
98
115
  === Prerequisites
@@ -103,32 +120,27 @@ First you must install and configure {uri-nodejs-download}[Node.js] on your mach
103
120
 
104
121
  Using npm:
105
122
 
106
- $ npm i --save asciidoctor.js@1.5.5-2
107
- $ npm i --save asciidoctor-template.js@1.5.5-2
108
- $ npm i --save asciidoctor-reveal.js@1.5.5-2
123
+ $ npm i --save asciidoctor.js@1.5.5-3
124
+ $ npm i --save asciidoctor-reveal.js
109
125
 
110
126
  === Rendering the AsciiDoc into slides
111
127
 
112
- Once the package is installed, you can convert AsciiDoc files using Reveal.js backend.
113
- Here we are converting a file named `presentation.adoc` into a Reveal.js presentation using Node.js:
128
+ Once the package is installed, you can convert AsciiDoc files using reveal.js converter.
129
+ Here we are converting a file named `presentation.adoc` into a reveal.js presentation using Node.js:
114
130
 
115
131
  .asciidoctor-revealjs.js
116
132
  [source, javascript]
117
133
  ----
118
- // Load asciidoctor.js + asciidoctor-template.js
134
+ // Load asciidoctor.js and asciidoctor-reveal.js
119
135
  var asciidoctor = require('asciidoctor.js')();
120
136
  var Asciidoctor = asciidoctor.Asciidoctor();
121
- var Opal = asciidoctor.Opal;
122
- Opal.load('nodejs');
123
- Opal.load('pathname');
124
- require('asciidoctor-template.js');
125
137
 
126
- // Convert the document 'presentation.adoc' using Reveal.js backend
138
+ require('asciidoctor-reveal.js');
139
+
140
+ // Convert the document 'presentation.adoc' using the reveal.js converter
127
141
  var attributes = 'revealjsdir=node_modules/reveal.js@';
128
- var options = Opal.hash({safe: 'safe',
129
- backend: 'revealjs',
130
- attributes: attributes});
131
- Asciidoctor.$convert_file('presentation.adoc', options); // <1>
142
+ var options = {safe: 'safe', backend: 'revealjs', attributes: attributes};
143
+ Asciidoctor.convertFile('presentation.adoc', options); // <1>
132
144
  ----
133
145
  <1> Creates a file named `presentation.html` (in the directory where command is run)
134
146
 
@@ -182,7 +194,7 @@ Actually things aren't that bad
182
194
  --
183
195
  ----
184
196
 
185
- In previous snippet we are creating a slide titled Slide One with bullets and another one titled Slide Two with centered text (reveal.js' default behavior) with {uri-revealjs-gh}#speaker-notes[speaker notes].
197
+ In previous snippet we are creating a slide titled Slide One with bullets and another one titled Slide Two with centered text (reveal.js`' default behavior) with {uri-revealjs-gh}#speaker-notes[speaker notes].
186
198
 
187
199
 
188
200
  === Slides without titles
@@ -225,7 +237,7 @@ image::cover.jpg[background, size=cover]
225
237
  ----
226
238
 
227
239
  This will put `cover.jpg` as the slide's background image.
228
- It sets `reveal.js'` `data-background-image` attribute.
240
+ It sets reveal.js`' `data-background-image` attribute.
229
241
  The `size` attribute is also supported.
230
242
  See the {uri-revealjs-gh}#image-backgrounds[relevant reveal.js documentation] for details.
231
243
 
@@ -320,9 +332,7 @@ Note that only `fade-in` is supported for lists at the moment.
320
332
  Reveal.js supports a special class that will give all available screen space to an HTML node.
321
333
  This class element is named `stretch`.
322
334
 
323
- __
324
335
  Sometimes it's desirable to have an element, like an image or video, stretch to consume as much space as possible within a given slide.
325
- __
326
336
 
327
337
  To apply that class to block simply use asciidoctor's class assignment:
328
338
 
@@ -333,7 +343,7 @@ See {uri-revealjs-gh}#stretching-elements[reveal.js documentation on stretching
333
343
 
334
344
  === Videos
335
345
 
336
- In addition to <<background_videos,background videos>>, videos can be inserted directly into slides.
346
+ In addition to <<Background videos,background videos>>, videos can be inserted directly into slides.
337
347
  The syntax is the standard http://asciidoctor.org/docs/user-manual/#video[asciidoc video block macro] syntax.
338
348
 
339
349
  ----
@@ -422,7 +432,7 @@ The title slide is customized via Asciidoc attributes.
422
432
  These are the global variable assigned at the top of a document under the lead
423
433
  title that look like this: `:name: value`.
424
434
 
425
- This back-end supports changing the color, image, video, iframe and
435
+ This converter supports changing the color, image, video, iframe and
426
436
  transitions of the title slide.
427
437
 
428
438
  Read {uri-revealjs-gh}#slide-backgrounds[the relevant
@@ -439,15 +449,15 @@ include::test/title-slide-image.adoc[]
439
449
  The title slide is also added a `title` CSS class to help with template
440
450
  customization.
441
451
 
442
- === Content meant for multiple back-ends
452
+ === Content meant for multiple converters
443
453
 
444
454
  Some content can be created with both slides and book in mind.
445
455
 
446
456
  To mark slides split points you can use preprocessor conditionals combined
447
- with back-end declaration.
457
+ with a backend declaration.
448
458
  Breaking points are set using slides with no title `=== !` wrapped in a
449
459
  conditional: `ifdef::backend-revealjs[=== !]`.
450
- In the end, the whole document has to be compiled with the back-end option:
460
+ In the end, the whole document has to be compiled with the backend option:
451
461
  `-b revealjs`
452
462
 
453
463
  For example:
@@ -510,7 +520,7 @@ In AsciiDoc the `data-state` can be applied to a slide by adding a state attribu
510
520
  ----
511
521
 
512
522
  That state can be queried from Javascript or used in CSS to apply further customization to your slide deck.
513
- For example, by combining this feature with the <<_css_override, CSS override>> one, you can alter fonts for specific pages with this CSS:
523
+ For example, by combining this feature with the <<CSS override>> one, you can alter fonts for specific pages with this CSS:
514
524
 
515
525
  ----
516
526
  @import 'https://fonts.googleapis.com/css?family=Baloo+Bhai';
@@ -525,11 +535,11 @@ section[data-state="topic"] h2 {
525
535
  // FIXME this is no longer accurate
526
536
  == About Jade Templates
527
537
 
528
- `/templates/jade` directory contains jade template files they are ported from `/templates/slim` templates. These templates were written to support reveal.js backend for Asciidoctor.js environment that is currently using in https://github.com/asciidocfx/AsciidocFX[AsciidocFX] editor. You can look at the https://github.com/asciidocfx/asciidoctor.js-reveal-demo[demo].
538
+ `/templates/jade` directory contains jade template files they are ported from `/templates/slim` templates. These templates were written to support the reveal.js converter for Asciidoctor.js environment that is currently using in https://github.com/asciidocfx/AsciidocFX[AsciidocFX] editor. You can look at the https://github.com/asciidocfx/asciidoctor.js-reveal-demo[demo].
529
539
 
530
- == reveal.js Options
540
+ == Reveal.js Options
531
541
 
532
- There are some attributes that can be set at the top of the document which they are specific of +revealjs+ backend.
542
+ There are some attributes that can be set at the top of the document which they are specific of `revealjs` converter.
533
543
 
534
544
  NOTE: Default settings are based on `reveal.js` default settings.
535
545
 
@@ -539,7 +549,7 @@ NOTE: Default settings are based on `reveal.js` default settings.
539
549
 
540
550
  |:revealjs_theme:
541
551
  |beige, *black*, league, night, serif, simple, sky, solarized, white
542
- |Chooses one of reveal.js' {uri-revealjs-gh}#theming[built-in themes].
552
+ |Chooses one of reveal.js`' {uri-revealjs-gh}#theming[built-in themes].
543
553
 
544
554
  |:revealjs_customtheme:
545
555
  |<file\|URL>
@@ -666,7 +676,7 @@ activate it.
666
676
 
667
677
  == Copyright and Licensing
668
678
 
669
- Copyright (C) 2012-2016 Olivier Bilodeau, Charles Moulliard, Dan Allen and the Asciidoctor Project.
679
+ Copyright (C) 2012-2016 {authors} and the Asciidoctor Project.
670
680
  Free use of this software is granted under the terms of the MIT License.
671
681
 
672
- See the <<LICENSE#,LICENSE>> file for details.
682
+ ifdef::env-github,env-browser[See the <<LICENSE#,LICENSE>> file for details.]
@@ -1,2 +1,7 @@
1
- require 'asciidoctor' unless defined? Asciidoctor::Converter
2
- require_relative 'asciidoctor-revealjs/converter'
1
+ if RUBY_ENGINE == 'opal'
2
+ require 'asciidoctor-revealjs/converter'
3
+ `require('asciidoctor-template.js')`
4
+ else
5
+ require 'asciidoctor' unless defined? Asciidoctor::Converter
6
+ require_relative 'asciidoctor-revealjs/converter'
7
+ end
@@ -1,11 +1,13 @@
1
- require 'asciidoctor/converter/html5'
2
- require 'asciidoctor/converter/composite'
3
- require 'asciidoctor/converter/template'
1
+ unless RUBY_ENGINE == 'opal'
2
+ require 'asciidoctor/converter/html5'
3
+ require 'asciidoctor/converter/composite'
4
+ require 'asciidoctor/converter/template'
5
+ end
4
6
 
5
7
  module Asciidoctor; module Revealjs
6
8
 
7
9
  class Converter < ::Asciidoctor::Converter::CompositeConverter
8
- ProvidedTemplatesDir = ::File.expand_path '../../../templates', __FILE__
10
+ ProvidedTemplatesDir = RUBY_ENGINE == 'opal' ? 'node_modules/asciidoctor-reveal.js/templates' : (::File.expand_path '../../../templates', __FILE__)
9
11
  register_for 'revealjs'
10
12
 
11
13
  def initialize backend, opts = {}
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Revealjs
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
@@ -15,7 +15,7 @@ html(lang=node.document.$attr("lang", "en") )
15
15
  if node.$attr("revealjs_customtheme", false)
16
16
  link(rel='stylesheet',href="#{node.$attr('revealjs_customtheme')}",id='theme')
17
17
  else
18
- link(rel='stylesheet',href='#{revealjsdir}/css/theme/serif.css',id='theme')
18
+ link(rel='stylesheet',href='#{revealjsdir}/css/theme/#{node.$attr("revealjs_theme", "black")}.css',id='theme')
19
19
  link(href="#{revealjsdir}/lib/css/zenburn.css",rel="stylesheet")
20
20
  script(src = "http://getfirebug.com/firebug-lite.js#startOpened=false")
21
21
  script(type='text/javascript').
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-revealjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Bilodeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-13 00:00:00.000000000 Z
11
+ date: 2016-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.5.1
181
+ rubygems_version: 2.5.2
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Converts AsciiDoc to HTML for a Reveal.js presentation