move built plugin files from /dist/plugin/ to /plugin/<name>/
This commit is contained in:
parent
4e8959508b
commit
fb22716ddf
10
demo.html
10
demo.html
|
@ -413,11 +413,11 @@ Reveal.on( 'customevent', function() {
|
||||||
<script type="module">
|
<script type="module">
|
||||||
|
|
||||||
import Reveal from '/dist/reveal.esm.js';
|
import Reveal from '/dist/reveal.esm.js';
|
||||||
import Zoom from '/dist/plugin/zoom.esm.js';
|
import Zoom from '/plugin/zoom/zoom.esm.js';
|
||||||
import Notes from '/dist/plugin/notes.esm.js';
|
import Notes from '/plugin/notes/notes.esm.js';
|
||||||
import Search from '/dist/plugin/search.esm.js';
|
import Search from '/plugin/search/search.esm.js';
|
||||||
import Markdown from '/dist/plugin/markdown.esm.js';
|
import Markdown from '/plugin/markdown/markdown.esm.js';
|
||||||
import Highlight from '/dist/plugin/highlight.esm.js';
|
import Highlight from '/plugin/highlight/highlight.esm.js';
|
||||||
|
|
||||||
// More info https://github.com/hakimel/reveal.js#configuration
|
// More info https://github.com/hakimel/reveal.js#configuration
|
||||||
Reveal.initialize({
|
Reveal.initialize({
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -163,7 +163,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script src="../dist/reveal.js"></script>
|
||||||
<script src="../dist/plugin/highlight.js"></script>
|
<script src="../plugin/highlight/highlight.js"></script>
|
||||||
<script>
|
<script>
|
||||||
Reveal.initialize({
|
Reveal.initialize({
|
||||||
center: true,
|
center: true,
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script src="../dist/reveal.js"></script>
|
||||||
<script src="../dist/plugin/highlight.js"></script>
|
<script src="../plugin/highlight/highlight.js"></script>
|
||||||
<script>
|
<script>
|
||||||
Reveal.initialize({
|
Reveal.initialize({
|
||||||
center: true,
|
center: true,
|
||||||
|
|
|
@ -110,9 +110,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script src="../dist/reveal.js"></script>
|
||||||
<script src="../dist/plugin/markdown.js"></script>
|
<script src="../plugin/markdown/markdown.js"></script>
|
||||||
<script src="../dist/plugin/highlight.js"></script>
|
<script src="../plugin/highlight/highlight.js"></script>
|
||||||
<script src="../dist/plugin/notes.js"></script>
|
<script src="../plugin/notes/notes.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
dependencies: [
|
dependencies: [
|
||||||
{ src: '../dist/plugin/math.js', async: true }
|
{ src: '../plugin/math/math.js', async: true }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -67,9 +67,9 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script src="../dist/reveal.js"></script>
|
||||||
<script src="../dist/plugin/highlight.js"></script>
|
<script src="../plugin/highlight/highlight.js"></script>
|
||||||
<script src="../dist/plugin/markdown.js"></script>
|
<script src="../plugin/markdown/markdown.js"></script>
|
||||||
<script src="../dist/plugin/math.js"></script>
|
<script src="../plugin/math/math.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
let deck1 = new Reveal( document.querySelector( '.deck1' ), {
|
let deck1 = new Reveal( document.querySelector( '.deck1' ), {
|
||||||
|
|
14
gulpfile.js
14
gulpfile.js
|
@ -108,12 +108,12 @@ gulp.task('js', gulp.parallel('js-es5', 'js-es6'));
|
||||||
// built-in plugins
|
// built-in plugins
|
||||||
gulp.task('plugins', () => {
|
gulp.task('plugins', () => {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
{ name: 'RevealHighlight', input: './plugin/highlight/plugin.js', output: './dist/plugin/highlight' },
|
{ name: 'RevealHighlight', input: './plugin/highlight/plugin.js', output: './plugin/highlight/highlight' },
|
||||||
{ name: 'RevealMarkdown', input: './plugin/markdown/plugin.js', output: './dist/plugin/markdown' },
|
{ name: 'RevealMarkdown', input: './plugin/markdown/plugin.js', output: './plugin/markdown/markdown' },
|
||||||
{ name: 'RevealSearch', input: './plugin/search/plugin.js', output: './dist/plugin/search' },
|
{ name: 'RevealSearch', input: './plugin/search/plugin.js', output: './plugin/search/search' },
|
||||||
{ name: 'RevealNotes', input: './plugin/notes/plugin.js', output: './dist/plugin/notes' },
|
{ name: 'RevealNotes', input: './plugin/notes/plugin.js', output: './plugin/notes/notes' },
|
||||||
{ name: 'RevealZoom', input: './plugin/zoom/plugin.js', output: './dist/plugin/zoom' },
|
{ name: 'RevealZoom', input: './plugin/zoom/plugin.js', output: './plugin/zoom/zoom' },
|
||||||
{ name: 'RevealMath', input: './plugin/math/plugin.js', output: './dist/plugin/math' },
|
{ name: 'RevealMath', input: './plugin/math/plugin.js', output: './plugin/math/math' },
|
||||||
].map( plugin => {
|
].map( plugin => {
|
||||||
return rollup({
|
return rollup({
|
||||||
input: plugin.input,
|
input: plugin.input,
|
||||||
|
@ -248,7 +248,7 @@ gulp.task('serve', () => {
|
||||||
|
|
||||||
gulp.watch(['js/**'], gulp.series('js', 'test'))
|
gulp.watch(['js/**'], gulp.series('js', 'test'))
|
||||||
|
|
||||||
gulp.watch(['plugin/**/*.js'], gulp.series('plugins'))
|
gulp.watch(['plugin/**/plugin.js'], gulp.series('plugins'))
|
||||||
|
|
||||||
gulp.watch(['test/*.html'], gulp.series('test'))
|
gulp.watch(['test/*.html'], gulp.series('test'))
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="dist/reveal.js"></script>
|
<script src="dist/reveal.js"></script>
|
||||||
<script src="dist/plugin/markdown.js"></script>
|
<script src="plugin/markdown/markdown.js"></script>
|
||||||
<script src="dist/plugin/highlight.js"></script>
|
<script src="plugin/highlight/highlight.js"></script>
|
||||||
<script src="dist/plugin/notes.js"></script>
|
<script src="plugin/notes/notes.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// More info about config & dependencies:
|
// More info about config & dependencies:
|
||||||
// - https://github.com/hakimel/reveal.js#configuration
|
// - https://github.com/hakimel/reveal.js#configuration
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
import hljs from 'highlight.js'
|
|
||||||
|
|
||||||
/* highlightjs-line-numbers.js 2.6.0 | (C) 2018 Yauheni Pakala | MIT License | github.com/wcoder/highlightjs-line-numbers.js */
|
|
||||||
/* Edited by Hakim for reveal.js; removed async timeout */
|
|
||||||
!function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=g(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[v,L,b]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"interactive"===e.readyState||"complete"===e.readyState?i(t):n.addEventListener("DOMContentLoaded",function(){i(t)})}function i(t){try{var r=e.querySelectorAll("code.hljs,code.nohighlight");for(var i in r)r.hasOwnProperty(i)&&l(r[i],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function l(n,e){"object"==typeof n&&f(function(){n.innerHTML=s(n,e)})}function o(n,e){if("string"==typeof n){var t=document.createElement("code");return t.innerHTML=n,s(t,e)}}function s(n,e){e=e||{singleLine:!1};var t=e.singleLine?0:1;return c(n),a(n.innerHTML,t)}function a(n,e){var t=u(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",i=0,l=t.length;i<l;i++)r+=g('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[j,m,L,b,p,i+1,t[i].length>0?t[i]:" "]);return g('<table class="{0}">{1}</table>',[v,r])}return n}function c(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];h(r.textContent)>0&&(r.childNodes.length>0?c(r):d(r.parentNode))}}function d(n){var e=n.className;if(/hljs-/.test(e)){for(var t=u(n.innerHTML),r=0,i="";r<t.length;r++){var l=t[r].length>0?t[r]:" ";i+=g('<span class="{0}">{1}</span>\n',[e,l])}n.innerHTML=i.trim()}}function u(n){return 0===n.length?[]:n.split(y)}function h(n){return(n.trim().match(y)||[]).length}function f(e){e()}function g(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var v="hljs-ln",m="hljs-ln-line",p="hljs-ln-code",j="hljs-ln-numbers",L="hljs-ln-n",b="data-line-number",y=/\r\n|\r|\n/g;hljs?(hljs.initLineNumbersOnLoad=r,hljs.lineNumbersBlock=l,hljs.lineNumbersValue=o,t()):n.console.error("highlight.js not detected!")}(window,document);
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,8 @@
|
||||||
import hljs from 'highlight.js'
|
import hljs from 'highlight.js'
|
||||||
import './highlight-line-numbers.js'
|
|
||||||
|
/* highlightjs-line-numbers.js 2.6.0 | (C) 2018 Yauheni Pakala | MIT License | github.com/wcoder/highlightjs-line-numbers.js */
|
||||||
|
/* Edited by Hakim for reveal.js; removed async timeout */
|
||||||
|
!function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=g(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[v,L,b]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"interactive"===e.readyState||"complete"===e.readyState?i(t):n.addEventListener("DOMContentLoaded",function(){i(t)})}function i(t){try{var r=e.querySelectorAll("code.hljs,code.nohighlight");for(var i in r)r.hasOwnProperty(i)&&l(r[i],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function l(n,e){"object"==typeof n&&f(function(){n.innerHTML=s(n,e)})}function o(n,e){if("string"==typeof n){var t=document.createElement("code");return t.innerHTML=n,s(t,e)}}function s(n,e){e=e||{singleLine:!1};var t=e.singleLine?0:1;return c(n),a(n.innerHTML,t)}function a(n,e){var t=u(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",i=0,l=t.length;i<l;i++)r+=g('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[j,m,L,b,p,i+1,t[i].length>0?t[i]:" "]);return g('<table class="{0}">{1}</table>',[v,r])}return n}function c(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];h(r.textContent)>0&&(r.childNodes.length>0?c(r):d(r.parentNode))}}function d(n){var e=n.className;if(/hljs-/.test(e)){for(var t=u(n.innerHTML),r=0,i="";r<t.length;r++){var l=t[r].length>0?t[r]:" ";i+=g('<span class="{0}">{1}</span>\n',[e,l])}n.innerHTML=i.trim()}}function u(n){return 0===n.length?[]:n.split(y)}function h(n){return(n.trim().match(y)||[]).length}function f(e){e()}function g(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var v="hljs-ln",m="hljs-ln-line",p="hljs-ln-code",j="hljs-ln-numbers",L="hljs-ln-n",b="data-line-number",y=/\r\n|\r|\n/g;hljs?(hljs.initLineNumbersOnLoad=r,hljs.lineNumbersBlock=l,hljs.lineNumbersValue=o,t()):n.console.error("highlight.js not detected!")}(window,document);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* reveal.js plugin that adds syntax highlight support.
|
* reveal.js plugin that adds syntax highlight support.
|
||||||
|
|
|
@ -286,8 +286,8 @@
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import Reveal from '../dist/reveal.esm.js'
|
import Reveal from '../dist/reveal.esm.js'
|
||||||
import Markdown from '../dist/plugin/markdown.esm.js'
|
import Markdown from '../plugin/markdown/markdown.esm.js'
|
||||||
import Highlight from '../dist/plugin/highlight.esm.js'
|
import Highlight from '../plugin/highlight/highlight.esm.js'
|
||||||
|
|
||||||
let deck1 = new Reveal( document.querySelector( '.deck1' ), { plugins: [ Markdown ] })
|
let deck1 = new Reveal( document.querySelector( '.deck1' ), { plugins: [ Markdown ] })
|
||||||
deck1.addEventListener( 'ready', function() {
|
deck1.addEventListener( 'ready', function() {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script src="../dist/reveal.js"></script>
|
||||||
<script src="../dist/plugin/zoom.js"></script>
|
<script src="../plugin/zoom/zoom.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
QUnit.module( 'Multiple reveal.js instances' );
|
QUnit.module( 'Multiple reveal.js instances' );
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<script type="module">
|
<script type="module">
|
||||||
|
|
||||||
import Reveal from '../dist/reveal.esm.js';
|
import Reveal from '../dist/reveal.esm.js';
|
||||||
import Zoom from '../dist/plugin/zoom.esm.js';
|
import Zoom from '../plugin/zoom/zoom.esm.js';
|
||||||
|
|
||||||
QUnit.module( 'Multiple reveal.js instances' );
|
QUnit.module( 'Multiple reveal.js instances' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue