@@ -16,6 +16,7 @@ module.exports = {
1616 "moment" : "moment" ,
1717 "Handlebars" : "handlebars"
1818 } ) ,
19+ new webpack . optimize . OccurrenceOrderPlugin ( true ) ,
1920 new webpack . optimize . CommonsChunkPlugin ( {
2021 names : [ "cover" , "index" , "pretty" , "slide" , "vendor" ] ,
2122 children : true ,
@@ -95,14 +96,21 @@ module.exports = {
9596 filename : path . join ( __dirname , 'public/views/build/pretty-pack-scripts.ejs' ) ,
9697 inject : false
9798 } ) ,
99+ new HtmlWebpackPlugin ( {
98100 template : 'public/views/includes/header.ejs' ,
99- chunks : [ 'vendor ' , 'slide' ] ,
101+ chunks : [ 'font' , 'slide-styles ', 'slide' ] ,
100102 filename : path . join ( __dirname , 'public/views/build/slide-header.ejs' ) ,
101103 inject : false
102104 } ) ,
105+ new HtmlWebpackPlugin ( {
106+ template : 'public/views/includes/header.ejs' ,
107+ chunks : [ 'font-pack' , 'slide-styles-pack' , 'slide-styles' , 'slide' ] ,
108+ filename : path . join ( __dirname , 'public/views/build/slide-pack-header.ejs' ) ,
109+ inject : false
110+ } ) ,
103111 new HtmlWebpackPlugin ( {
104112 template : 'public/views/includes/scripts.ejs' ,
105- chunks : [ 'vendor' , ' slide'] ,
113+ chunks : [ 'slide' ] ,
106114 filename : path . join ( __dirname , 'public/views/build/slide-scripts.ejs' ) ,
107115 inject : false
108116 } ) ,
@@ -133,7 +141,6 @@ module.exports = {
133141 ] ,
134142
135143 entry : {
136- slide : path . join ( __dirname , 'public/js/slide.js' ) ,
137144 font : path . join ( __dirname , 'public/css/google-font.css' ) ,
138145 "font-pack" : path . join ( __dirname , 'public/css/font.css' ) ,
139146 common : [
@@ -266,6 +273,40 @@ module.exports = {
266273 path . join ( __dirname , 'public/js/reveal-markdown.js' ) ,
267274 path . join ( __dirname , 'public/js/pretty.js' )
268275 ] ,
276+ slide : [
277+ "expose?filterXSS!xss" ,
278+ "flowchart.js" ,
279+ "js-sequence-diagrams" ,
280+ path . join ( __dirname , 'public/js/reveal-markdown.js' ) ,
281+ path . join ( __dirname , 'public/js/slide.js' )
282+ ] ,
283+ "slide-styles" : [
284+ path . join ( __dirname , 'public/css/github-extract.css' ) ,
285+ path . join ( __dirname , 'public/css/mermaid.css' ) ,
286+ path . join ( __dirname , 'public/css/markdown.css' )
287+ ] ,
288+ "slide-styles-pack" : [
289+ path . join ( __dirname , 'node_modules/font-awesome/css/font-awesome.min.css' ) ,
290+ path . join ( __dirname , 'node_modules/ionicons/css/ionicons.min.css' ) ,
291+ path . join ( __dirname , 'node_modules/octicons/octicons/octicons.css' ) ,
292+ path . join ( __dirname , 'public/vendor/bootstrap/tooltip.min.css' )
293+ ] ,
294+ "slide-pack" : [
295+ "expose?jsyaml!js-yaml" ,
296+ "script!mermaid" ,
297+ "expose?moment!moment" ,
298+ "script!handlebars" ,
299+ "expose?hljs!highlight.js" ,
300+ "expose?emojify!emojify.js" ,
301+ "expose?filterXSS!xss" ,
302+ "script!gist-embed" ,
303+ "flowchart.js" ,
304+ "js-sequence-diagrams" ,
305+ "expose?Viz!viz.js" ,
306+ "headjs" ,
307+ "expose?Reveal!reveal.js" ,
308+ path . join ( __dirname , 'public/js/reveal-markdown.js' ) ,
309+ path . join ( __dirname , 'public/js/slide.js' )
269310 ]
270311 } ,
271312
@@ -293,6 +334,8 @@ module.exports = {
293334 handlebars : path . join ( __dirname , 'node_modules/handlebars/dist/handlebars.min.js' ) ,
294335 "jquery-ui-resizable" : path . join ( __dirname , 'public/vendor/jquery-ui/jquery-ui.min.js' ) ,
295336 "gist-embed" : path . join ( __dirname , 'node_modules/gist-embed/gist-embed.min.js' ) ,
337+ "bootstrap-tooltip" : path . join ( __dirname , 'public/vendor/bootstrap/tooltip.min.js' ) ,
338+ "headjs" : path . join ( __dirname , 'node_modules/reveal.js/lib/js/head.min.js' )
296339 }
297340 } ,
298341
0 commit comments