]> git.localhorst.tv Git - gtbkgg-extension.git/blob - index.js
v0.0.1
[gtbkgg-extension.git] / index.js
1 const HtmlWebpackPlugin = require('html-webpack-plugin')
2
3 let entryPoints = {
4         VideoComponent:{
5                 path:"./src/VideoComponent.js",
6                 outputHtml:"video_component.html",
7                 build:false
8         },
9         VideoOverlay:{
10                 path:"./src/VideoOverlay.js",
11                 outputHtml:"video_overlay.html",
12                 build:false
13         },
14         Panel:{
15                 path:"./src/Panel.js",
16                 outputHtml:"panel.html",
17                 build:true
18         },
19         Config:{
20                 path:"./src/Config.js",
21                 outputHtml:"config.html",
22                 build:false
23         },
24         LiveConfig:{
25                 path:"./src/LiveConfig.js",
26                 outputHtml:"live_config.html",
27                 build:false
28         },
29         Mobile:{
30                 path:"./src/Mobile.js",
31                 outputHtml:"mobile.html",
32                 build:false
33         }
34 }
35
36 let entry = {}
37 let output = []
38 for(name in entryPoints){
39         if(entryPoints[name].build){
40                 entry[name]=entryPoints[name].path
41                 output.push(new HtmlWebpackPlugin({
42                         inject:true,
43                         chunks:name,
44                         template:'./template.html',
45                         filename:entryPoints[name].outputHtml
46                 }))
47         }               
48 }
49 console.log(entry)
50 console.log(output)