diff --git a/app/index.js b/app/index.js index 1279298..138b9e8 100644 --- a/app/index.js +++ b/app/index.js @@ -41,17 +41,16 @@ var PUGJS = 'Pug (formerly Jade)'; var ASCIIDOC = 'AsciiDoc (using Asciidoctor Bespoke)'; var optionalPlugins = [ - // bespoke-prism seems to be broken - //{ - // when: function (response) { - // return response.templatingLanguage !== ASCIIDOC; - // }, - // name: 'prism', - // version: '~1.0', - // priority: 1, - // message: 'Will your presentation include code samples?', - // default: true - //}, + { + when: function (response) { + return response.templatingLanguage !== ASCIIDOC; + }, + name: 'prism', + version: '~1.0', + priority: 1, + message: 'Will your presentation include code samples?', + default: true + }, { name: 'multimedia', version: '~1.1', diff --git a/app/templates/src/index.html b/app/templates/src/index.html index cfbe147..1fac7bf 100644 --- a/app/templates/src/index.html +++ b/app/templates/src/index.html @@ -49,23 +49,21 @@

Powered by bespoke-bu <% } -%> +<% if (usePluginPrism) { -%>

Syntax Highlighting

Powered by Lea Verou's Prism


-(function() {
-  function hanoi(n, a, b, c) {
-    return n ? hanoi(n - 1, a, c, b)
-        .concat([[a, b]])
-        .concat(hanoi(n - 1, c, b, a)) : [];
-  }
-  return hanoi(3, 'left', 'right', 'mid')
-    .map(function(d) {
-      return d[0] + ' -> ' + d[1];
-    });
-})();
+function hanoi (n, a, b, c) { + return n ? hanoi(n - 1, a, c, b) + .concat([[a, b]]) + .concat(hanoi(n - 1, c, b, a)) : [] +} +console.log(hanoi(3, 'left', 'right', 'mid') + .map((d) => `${d[0]} -> ${d[1]}`))
+<% } -%>

Named Route

Powered by bespoke-hash

diff --git a/app/templates/src/index.pug b/app/templates/src/index.pug index 9e4661f..d299761 100644 --- a/app/templates/src/index.pug +++ b/app/templates/src/index.pug @@ -43,23 +43,21 @@ html iframe(width="640", height="360", src="https://www.youtube.com/embed/AV3kYPutYfs?rel=0&showinfo=0&controls=0&enablejsapi=1&loop=1&playlist=AV3kYPutYfs", frameborder="0", allowfullscreen, data-volume="0") <% } -%> +<% if (usePluginPrism) { -%> section h2 Syntax Highlighting h3 Powered by Lea Verou's Prism pre code.language-javascript. - (function() { - function hanoi(n, a, b, c) { - return n ? hanoi(n - 1, a, c, b) - .concat([[a, b]]) - .concat(hanoi(n - 1, c, b, a)) : []; - } - return hanoi(3, 'left', 'right', 'mid') - .map(function(d) { - return d[0] + ' -> ' + d[1]; - }); - })(); + function hanoi (n, a, b, c) { + return n ? hanoi(n - 1, a, c, b) + .concat([[a, b]]) + .concat(hanoi(n - 1, c, b, a)) : [] + } + console.log(hanoi(3, 'left', 'right', 'mid') + .map((d) => `${d[0]} -> ${d[1]}`)) +<% } -%> section(data-bespoke-hash='named-route') h2 Named Route h3 Powered by bespoke-hash diff --git a/test/test-behaviour.js b/test/test-behaviour.js index 1559a5c..e74501c 100644 --- a/test/test-behaviour.js +++ b/test/test-behaviour.js @@ -58,7 +58,7 @@ describe('bespoke generator', function () { .withPrompts({ 'title': 'Foobar Test Title', 'templatingLanguage': 'Pug (formerly Jade)', - //'prism': false, + 'prism': false, 'multimedia': false, });