Skip to content

Commit 5c436bd

Browse files
authored
refactor: fix plugin paths and move custom reveal plugin out of build folder (#1898)
2 parents 56fd0c1 + 9f0e3a7 commit 5c436bd

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

public/build/reveal.js/plugin/elapsed-time-bar/elapsed-time-bar.js renamed to public/js/revealjs-plugins/elapsed-time-bar/elapsed-time-bar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
var ElapsedTimeBar = {
23
// default value
34
barColor: 'rgb(200,0,0)',

public/build/reveal.js/plugin/spotlight/spotlight.js renamed to public/js/revealjs-plugins/spotlight/spotlight.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
var RevealSpotlight = window.RevealSpotlight || (function () {
23

34
//configs

public/js/slide.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ delete options.dependencies
8585

8686
if (Object.hasOwnProperty.call(options, 'spotlight')) {
8787
defaultOptions.dependencies.push({
88-
src: `${serverurl}/build/reveal.js/plugin/spotlight/spotlight.js`
88+
src: `${serverurl}/build/revealjs-plugins/spotlight/spotlight.js`
8989
})
9090
}
9191

9292
if (Object.hasOwnProperty.call(options, 'allottedTime') || Object.hasOwnProperty.call(options, 'allottedMinutes')) {
9393
defaultOptions.dependencies.push({
94-
src: `${serverurl}/build/reveal.js/plugin/elapsed-time-bar/elapsed-time-bar.js`
94+
src: `${serverurl}/build/revealjs-plugins/elapsed-time-bar/elapsed-time-bar.js`
9595
})
9696
if (Object.hasOwnProperty.call(options, 'allottedMinutes')) {
9797
options.allottedTime = options.allottedMinutes * 60 * 1000

webpack.common.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ module.exports = {
166166
from: 'plugin',
167167
to: 'reveal.js/plugin'
168168
},
169+
{
170+
context: path.join(__dirname, 'public/js'),
171+
from: 'revealjs-plugins',
172+
to: 'revealjs-plugins'
173+
},
169174
{
170175
context: path.join(__dirname, 'node_modules/dictionary-de'),
171176
from: '*',

0 commit comments

Comments
 (0)