@sbj42/maze-generator-dev
Version:
Development support library for maze-generator plugins
26 lines (23 loc) • 660 B
JavaScript
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
function webDemoAlgorithm(algorithmName, algorithmModulePath, outPath) {
webpack({
context: __dirname,
entry: ['./web-demo-main'],
output: {
path: outPath,
filename: 'mgdemo.js'
},
resolve: {
alias: {
'mg-algorithm': algorithmModulePath
}
},
plugins: [new HtmlWebpackPlugin({
title: algorithmName + ' demo',
template: 'web-demo-template.ejs'
})]
}, function() {
});
}
module.exports = webDemoAlgorithm;