2018-10-18 11:50:45 +00:00
|
|
|
const webpack = require('webpack')
|
|
|
|
const path = require('path')
|
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
2018-07-02 20:24:56 +00:00
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
2016-10-11 07:45:00 +00:00
|
|
|
|
2018-04-16 19:08:24 +00:00
|
|
|
// Fix possible nofile-issues
|
2018-10-18 11:50:45 +00:00
|
|
|
const fs = require('fs')
|
|
|
|
const gracefulFs = require('graceful-fs')
|
2018-04-16 19:08:24 +00:00
|
|
|
gracefulFs.gracefulify(fs)
|
|
|
|
|
2016-10-11 07:45:00 +00:00
|
|
|
module.exports = {
|
2018-10-10 19:54:27 +00:00
|
|
|
name: 'app',
|
2017-03-08 18:41:05 +00:00
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
Visibility: 'visibilityjs',
|
|
|
|
Cookies: 'js-cookie',
|
|
|
|
key: 'keymaster',
|
|
|
|
$: 'jquery',
|
|
|
|
jQuery: 'jquery',
|
|
|
|
'window.jQuery': 'jquery',
|
|
|
|
'moment': 'moment',
|
|
|
|
'Handlebars': 'handlebars'
|
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
|
|
|
chunks: ['font', 'index-styles', 'index'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/index-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
2020-07-10 08:08:45 +00:00
|
|
|
chunks: ['index-styles-pack', 'index-styles', 'index'],
|
2017-03-08 18:41:05 +00:00
|
|
|
filename: path.join(__dirname, 'public/views/build/index-pack-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['index'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/index-scripts.ejs'),
|
|
|
|
inject: false
|
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['common', 'index-pack'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/index-pack-scripts.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
|
|
|
chunks: ['font', 'cover'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/cover-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
2020-07-10 08:08:45 +00:00
|
|
|
chunks: ['cover-styles-pack', 'cover'],
|
2017-03-08 18:41:05 +00:00
|
|
|
filename: path.join(__dirname, 'public/views/build/cover-pack-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['cover'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/cover-scripts.ejs'),
|
|
|
|
inject: false
|
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['common', 'cover-pack'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/cover-pack-scripts.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
|
|
|
chunks: ['font', 'pretty-styles', 'pretty'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/pretty-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
2020-07-10 08:08:45 +00:00
|
|
|
chunks: ['pretty-styles-pack', 'pretty-styles', 'pretty'],
|
2017-03-08 18:41:05 +00:00
|
|
|
filename: path.join(__dirname, 'public/views/build/pretty-pack-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['pretty'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/pretty-scripts.ejs'),
|
|
|
|
inject: false
|
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['common', 'pretty-pack'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/pretty-pack-scripts.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
|
|
|
chunks: ['font', 'slide-styles', 'slide'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/slide-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/header.ejs',
|
2020-07-10 08:08:45 +00:00
|
|
|
chunks: ['slide-styles-pack', 'slide-styles', 'slide'],
|
2017-03-08 18:41:05 +00:00
|
|
|
filename: path.join(__dirname, 'public/views/build/slide-pack-header.ejs'),
|
2018-08-27 11:37:42 +00:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 18:41:05 +00:00
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['slide'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/slide-scripts.ejs'),
|
|
|
|
inject: false
|
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'public/views/includes/scripts.ejs',
|
|
|
|
chunks: ['slide-pack'],
|
|
|
|
filename: path.join(__dirname, 'public/views/build/slide-pack-scripts.ejs'),
|
|
|
|
inject: false
|
|
|
|
}),
|
|
|
|
new CopyWebpackPlugin([
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/mathjax'),
|
|
|
|
from: {
|
|
|
|
glob: '**/*',
|
|
|
|
dot: false
|
|
|
|
},
|
|
|
|
to: 'MathJax/'
|
|
|
|
},
|
|
|
|
{
|
2019-08-19 15:48:57 +00:00
|
|
|
context: path.join(__dirname, 'node_modules/@hackmd/emojify.js'),
|
2017-03-08 18:41:05 +00:00
|
|
|
from: {
|
2017-03-12 18:09:52 +00:00
|
|
|
glob: 'dist/**/*',
|
2017-03-08 18:41:05 +00:00
|
|
|
dot: false
|
|
|
|
},
|
|
|
|
to: 'emojify.js/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
2017-03-12 18:09:52 +00:00
|
|
|
from: 'js',
|
|
|
|
to: 'reveal.js/js'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
|
|
|
from: 'css',
|
|
|
|
to: 'reveal.js/css'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
|
|
|
from: 'lib',
|
|
|
|
to: 'reveal.js/lib'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
|
|
|
from: 'plugin',
|
|
|
|
to: 'reveal.js/plugin'
|
2020-01-31 09:51:14 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/dictionary-de'),
|
|
|
|
from: '*',
|
|
|
|
to: 'dictionary-de/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/dictionary-de-at'),
|
|
|
|
from: '*',
|
|
|
|
to: 'dictionary-de-at/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/dictionary-de-ch'),
|
|
|
|
from: '*',
|
|
|
|
to: 'dictionary-de-ch/'
|
|
|
|
},
|
2019-09-28 11:24:55 +00:00
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/leaflet'),
|
|
|
|
from: 'dist',
|
|
|
|
to: 'leaflet'
|
2020-07-10 08:08:45 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/fork-awesome'),
|
|
|
|
from: 'fonts',
|
|
|
|
to: 'fork-awesome/fonts'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/fork-awesome'),
|
|
|
|
from: 'css',
|
|
|
|
to: 'fork-awesome/css'
|
2019-09-28 11:24:55 +00:00
|
|
|
}
|
2018-07-02 20:24:56 +00:00
|
|
|
]),
|
2019-11-01 08:33:58 +00:00
|
|
|
new MiniCssExtractPlugin()
|
2017-03-08 18:41:05 +00:00
|
|
|
],
|
2018-07-02 20:24:56 +00:00
|
|
|
|
2017-03-08 18:41:05 +00:00
|
|
|
entry: {
|
|
|
|
font: path.join(__dirname, 'public/css/google-font.css'),
|
|
|
|
common: [
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?jQuery!expose-loader?$!jquery',
|
2017-03-08 18:41:05 +00:00
|
|
|
'velocity-animate',
|
2018-07-02 20:24:56 +00:00
|
|
|
'imports-loader?$=jquery!jquery-mousewheel',
|
2017-03-08 18:41:05 +00:00
|
|
|
'bootstrap'
|
2016-10-11 07:45:00 +00:00
|
|
|
],
|
2017-03-08 18:41:05 +00:00
|
|
|
cover: [
|
|
|
|
'babel-polyfill',
|
|
|
|
path.join(__dirname, 'public/js/cover.js')
|
|
|
|
],
|
|
|
|
'cover-styles-pack': [
|
|
|
|
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
|
|
|
|
path.join(__dirname, 'public/css/bootstrap-social.css'),
|
|
|
|
path.join(__dirname, 'node_modules/select2/select2.css'),
|
|
|
|
path.join(__dirname, 'node_modules/select2/select2-bootstrap.css')
|
|
|
|
],
|
|
|
|
'cover-pack': [
|
|
|
|
'babel-polyfill',
|
|
|
|
'bootstrap-validator',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?select2!select2',
|
|
|
|
'expose-loader?moment!moment',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/cover.js')
|
|
|
|
],
|
|
|
|
index: [
|
|
|
|
'babel-polyfill',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!jquery-ui-resizable',
|
|
|
|
'script-loader!codemirror',
|
|
|
|
'script-loader!inlineAttachment',
|
|
|
|
'script-loader!jqueryTextcomplete',
|
|
|
|
'script-loader!codemirrorInlineAttachment',
|
|
|
|
'script-loader!ot',
|
2019-04-10 11:17:38 +00:00
|
|
|
'flowchart.js',
|
2019-07-28 16:30:04 +00:00
|
|
|
'imports-loader?Raphael=raphael!js-sequence-diagrams',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/index.js')
|
|
|
|
],
|
|
|
|
'index-styles': [
|
|
|
|
path.join(__dirname, 'public/vendor/jquery-ui/jquery-ui.min.css'),
|
|
|
|
path.join(__dirname, 'public/vendor/codemirror-spell-checker/spell-checker.min.css'),
|
2019-04-11 10:43:43 +00:00
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/lib/codemirror.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/addon/fold/foldgutter.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/addon/display/fullscreen.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/addon/dialog/dialog.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/addon/scroll/simplescrollbars.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/addon/search/matchesonscrollbar.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/monokai.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/one-dark.css'),
|
2020-01-31 07:41:37 +00:00
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/dracula.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/material.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/nord.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/panda-syntax.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/theme/solarized.css'),
|
|
|
|
path.join(__dirname, 'public/css/codemirror-extend/ayu-dark.css'),
|
|
|
|
path.join(__dirname, 'public/css/codemirror-extend/ayu-mirage.css'),
|
|
|
|
path.join(__dirname, 'public/css/codemirror-extend/tomorrow-night-bright.css'),
|
|
|
|
path.join(__dirname, 'public/css/codemirror-extend/tomorrow-night-eighties.css'),
|
2019-04-11 10:43:43 +00:00
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/mode/tiddlywiki/tiddlywiki.css'),
|
|
|
|
path.join(__dirname, 'node_modules/@hackmd/codemirror/mode/mediawiki/mediawiki.css'),
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/css/github-extract.css'),
|
|
|
|
path.join(__dirname, 'public/vendor/showup/showup.css'),
|
|
|
|
path.join(__dirname, 'public/css/mermaid.css'),
|
|
|
|
path.join(__dirname, 'public/css/markdown.css'),
|
|
|
|
path.join(__dirname, 'public/css/slide-preview.css')
|
|
|
|
],
|
|
|
|
'index-styles-pack': [
|
|
|
|
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
|
|
|
|
path.join(__dirname, 'public/css/bootstrap-social.css'),
|
2019-09-28 10:20:26 +00:00
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
|
|
|
|
path.join(__dirname, 'node_modules/leaflet/dist/leaflet.css')
|
2017-03-08 18:41:05 +00:00
|
|
|
],
|
|
|
|
'index-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!jquery-ui-resizable',
|
2017-03-08 18:41:05 +00:00
|
|
|
'bootstrap-validator',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?jsyaml!js-yaml',
|
|
|
|
'script-loader!mermaid',
|
|
|
|
'expose-loader?moment!moment',
|
|
|
|
'script-loader!handlebars',
|
|
|
|
'expose-loader?hljs!highlight.js',
|
2019-08-19 15:48:57 +00:00
|
|
|
'emojify.js',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!gist-embed',
|
|
|
|
'script-loader!codemirror',
|
|
|
|
'script-loader!inlineAttachment',
|
|
|
|
'script-loader!jqueryTextcomplete',
|
|
|
|
'script-loader!codemirrorInlineAttachment',
|
|
|
|
'script-loader!ot',
|
2019-04-10 11:17:38 +00:00
|
|
|
'flowchart.js',
|
2019-07-28 16:30:04 +00:00
|
|
|
'imports-loader?Raphael=raphael!js-sequence-diagrams',
|
2019-10-04 14:23:51 +00:00
|
|
|
'script-loader!viz.js',
|
|
|
|
'script-loader!viz.render.js',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!abcjs',
|
2019-08-04 12:12:39 +00:00
|
|
|
'script-loader!vega',
|
|
|
|
'script-loader!vega-lite',
|
|
|
|
'script-loader!vega-embed',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?io!socket.io-client',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2019-09-28 10:20:26 +00:00
|
|
|
'expose-loader?L!leaflet',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/index.js')
|
|
|
|
],
|
|
|
|
pretty: [
|
|
|
|
'babel-polyfill',
|
2019-04-10 11:17:38 +00:00
|
|
|
'flowchart.js',
|
2019-07-28 16:30:04 +00:00
|
|
|
'imports-loader?Raphael=raphael!js-sequence-diagrams',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/pretty.js')
|
|
|
|
],
|
|
|
|
'pretty-styles': [
|
|
|
|
path.join(__dirname, 'public/css/github-extract.css'),
|
|
|
|
path.join(__dirname, 'public/css/mermaid.css'),
|
|
|
|
path.join(__dirname, 'public/css/markdown.css'),
|
|
|
|
path.join(__dirname, 'public/css/slide-preview.css')
|
|
|
|
],
|
|
|
|
'pretty-styles-pack': [
|
|
|
|
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
|
2019-09-28 10:20:26 +00:00
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
|
|
|
|
path.join(__dirname, 'node_modules/leaflet/dist/leaflet.css')
|
2017-03-08 18:41:05 +00:00
|
|
|
],
|
|
|
|
'pretty-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?jsyaml!js-yaml',
|
|
|
|
'script-loader!mermaid',
|
|
|
|
'expose-loader?moment!moment',
|
|
|
|
'script-loader!handlebars',
|
|
|
|
'expose-loader?hljs!highlight.js',
|
2019-08-19 15:48:57 +00:00
|
|
|
'emojify.js',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!gist-embed',
|
2019-04-10 11:17:38 +00:00
|
|
|
'flowchart.js',
|
2019-07-28 16:30:04 +00:00
|
|
|
'imports-loader?Raphael=raphael!js-sequence-diagrams',
|
2019-10-04 14:23:51 +00:00
|
|
|
'script-loader!viz.js',
|
|
|
|
'script-loader!viz.render.js',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!abcjs',
|
2019-08-04 12:12:39 +00:00
|
|
|
'script-loader!vega',
|
|
|
|
'script-loader!vega-lite',
|
|
|
|
'script-loader!vega-embed',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2019-09-28 10:20:26 +00:00
|
|
|
'expose-loader?L!leaflet',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/pretty.js')
|
|
|
|
],
|
|
|
|
slide: [
|
|
|
|
'babel-polyfill',
|
|
|
|
'bootstrap-tooltip',
|
2019-04-10 11:17:38 +00:00
|
|
|
'flowchart.js',
|
2019-07-28 16:30:04 +00:00
|
|
|
'imports-loader?Raphael=raphael!js-sequence-diagrams',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/slide.js')
|
|
|
|
],
|
|
|
|
'slide-styles': [
|
|
|
|
path.join(__dirname, 'public/vendor/bootstrap/tooltip.min.css'),
|
|
|
|
path.join(__dirname, 'public/css/github-extract.css'),
|
|
|
|
path.join(__dirname, 'public/css/mermaid.css'),
|
|
|
|
path.join(__dirname, 'public/css/markdown.css')
|
|
|
|
],
|
|
|
|
'slide-styles-pack': [
|
2019-09-28 10:20:26 +00:00
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
|
|
|
|
path.join(__dirname, 'node_modules/leaflet/dist/leaflet.css')
|
2017-03-08 18:41:05 +00:00
|
|
|
],
|
|
|
|
'slide-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?jQuery!expose-loader?$!jquery',
|
2017-03-08 18:41:05 +00:00
|
|
|
'velocity-animate',
|
2018-07-02 20:24:56 +00:00
|
|
|
'imports-loader?$=jquery!jquery-mousewheel',
|
2017-03-08 18:41:05 +00:00
|
|
|
'bootstrap-tooltip',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?jsyaml!js-yaml',
|
|
|
|
'script-loader!mermaid',
|
|
|
|
'expose-loader?moment!moment',
|
|
|
|
'script-loader!handlebars',
|
|
|
|
'expose-loader?hljs!highlight.js',
|
2019-08-19 15:48:57 +00:00
|
|
|
'emojify.js',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!gist-embed',
|
2019-04-10 11:17:38 +00:00
|
|
|
'flowchart.js',
|
2019-07-28 16:30:04 +00:00
|
|
|
'imports-loader?Raphael=raphael!js-sequence-diagrams',
|
2019-10-04 14:23:51 +00:00
|
|
|
'script-loader!viz.js',
|
|
|
|
'script-loader!viz.render.js',
|
2018-07-02 20:24:56 +00:00
|
|
|
'script-loader!abcjs',
|
2019-08-04 12:12:39 +00:00
|
|
|
'script-loader!vega',
|
|
|
|
'script-loader!vega-lite',
|
|
|
|
'script-loader!vega-embed',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?Reveal!reveal.js',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2019-09-28 10:20:26 +00:00
|
|
|
'expose-loader?L!leaflet',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/slide.js')
|
|
|
|
]
|
|
|
|
},
|
2016-10-11 07:45:00 +00:00
|
|
|
|
2017-03-08 18:41:05 +00:00
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, 'public/build'),
|
|
|
|
publicPath: '/build/',
|
2018-09-02 08:57:38 +00:00
|
|
|
filename: '[name].js'
|
2017-03-08 18:41:05 +00:00
|
|
|
},
|
2016-10-11 07:45:00 +00:00
|
|
|
|
2017-03-08 18:41:05 +00:00
|
|
|
resolve: {
|
2018-07-02 20:24:56 +00:00
|
|
|
modules: ['node_modules'],
|
|
|
|
extensions: ['.js'],
|
2017-03-08 18:41:05 +00:00
|
|
|
alias: {
|
2019-04-11 10:43:43 +00:00
|
|
|
codemirror: path.join(__dirname, 'node_modules/@hackmd/codemirror/codemirror.min.js'),
|
2017-03-08 18:41:05 +00:00
|
|
|
inlineAttachment: path.join(__dirname, 'public/vendor/inlineAttachment/inline-attachment.js'),
|
|
|
|
jqueryTextcomplete: path.join(__dirname, 'public/vendor/jquery-textcomplete/jquery.textcomplete.js'),
|
|
|
|
codemirrorInlineAttachment: path.join(__dirname, 'public/vendor/inlineAttachment/codemirror.inline-attachment.js'),
|
|
|
|
ot: path.join(__dirname, 'public/vendor/ot/ot.min.js'),
|
|
|
|
mermaid: path.join(__dirname, 'node_modules/mermaid/dist/mermaid.min.js'),
|
|
|
|
handlebars: path.join(__dirname, 'node_modules/handlebars/dist/handlebars.min.js'),
|
|
|
|
'jquery-ui-resizable': path.join(__dirname, 'public/vendor/jquery-ui/jquery-ui.min.js'),
|
|
|
|
'gist-embed': path.join(__dirname, 'node_modules/gist-embed/gist-embed.min.js'),
|
|
|
|
'bootstrap-tooltip': path.join(__dirname, 'public/vendor/bootstrap/tooltip.min.js'),
|
2017-03-26 12:39:07 +00:00
|
|
|
'reveal-markdown': path.join(__dirname, 'public/js/reveal-markdown.js'),
|
2018-03-06 13:38:46 +00:00
|
|
|
abcjs: path.join(__dirname, 'public/vendor/abcjs_basic_3.1.1-min.js'),
|
2019-04-10 11:17:38 +00:00
|
|
|
raphael: path.join(__dirname, 'node_modules/raphael/raphael.min.js'),
|
2019-08-04 12:12:39 +00:00
|
|
|
'js-sequence-diagrams': path.join(__dirname, 'node_modules/@hackmd/js-sequence-diagrams/build/main.js'),
|
|
|
|
vega: path.join(__dirname, 'node_modules/vega/build/vega.min.js'),
|
|
|
|
'vega-lite': path.join(__dirname, 'node_modules/vega-lite/build/vega-lite.min.js'),
|
2019-08-16 01:37:09 +00:00
|
|
|
'vega-embed': path.join(__dirname, 'node_modules/vega-embed/build/vega-embed.min.js'),
|
2019-08-19 15:48:57 +00:00
|
|
|
'emojify.js': path.join(__dirname, 'node_modules/@hackmd/emojify.js/dist/js/emojify-browser.min.js'),
|
2019-10-04 14:23:51 +00:00
|
|
|
'markdown-it': path.join(__dirname, 'node_modules/markdown-it/dist/markdown-it.js'),
|
|
|
|
'viz.js': path.join(__dirname, 'node_modules/viz.js/viz.js'),
|
2019-11-01 08:33:58 +00:00
|
|
|
'viz.render.js': path.join(__dirname, 'node_modules/viz.js/full.render.js'),
|
|
|
|
markdownlint: path.join(__dirname, 'node_modules/markdownlint/demo/markdownlint-browser.js')
|
2017-03-08 18:41:05 +00:00
|
|
|
}
|
|
|
|
},
|
2016-10-13 00:56:02 +00:00
|
|
|
|
2017-03-08 18:41:05 +00:00
|
|
|
externals: {
|
|
|
|
'viz.js': 'Viz',
|
|
|
|
'socket.io-client': 'io',
|
|
|
|
'jquery': '$',
|
|
|
|
'moment': 'moment',
|
|
|
|
'handlebars': 'Handlebars',
|
|
|
|
'highlight.js': 'hljs',
|
|
|
|
'select2': 'select2'
|
|
|
|
},
|
2016-10-11 07:45:00 +00:00
|
|
|
|
2017-03-08 18:41:05 +00:00
|
|
|
module: {
|
2018-07-02 20:24:56 +00:00
|
|
|
rules: [{
|
2019-10-14 05:20:44 +00:00
|
|
|
test: /\.mjs$/,
|
|
|
|
type: 'javascript/auto'
|
|
|
|
}, {
|
2017-03-08 18:41:05 +00:00
|
|
|
test: /\.js$/,
|
2018-10-18 12:12:32 +00:00
|
|
|
use: [{ loader: 'babel-loader' }],
|
2017-03-08 18:41:05 +00:00
|
|
|
exclude: [/node_modules/, /public\/vendor/]
|
|
|
|
}, {
|
|
|
|
test: /\.css$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader'
|
|
|
|
]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.scss$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'sass-loader'
|
|
|
|
]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.less$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'less-loader'
|
|
|
|
]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
|
2018-10-18 12:12:32 +00:00
|
|
|
use: [{ loader: 'file-loader' }]
|
2017-04-09 12:05:48 +00:00
|
|
|
}, {
|
|
|
|
test: /\.html$/,
|
2018-10-18 12:12:32 +00:00
|
|
|
use: [{ loader: 'string-loader' }]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-10-18 12:12:32 +00:00
|
|
|
options: { prefix: 'font/', limit: '5000' }
|
2018-08-27 11:37:42 +00:00
|
|
|
}]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-10-18 12:12:32 +00:00
|
|
|
options: { limit: '5000', mimetype: 'application/octet-stream' }
|
2018-08-27 11:37:42 +00:00
|
|
|
}]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
2020-04-08 14:47:12 +00:00
|
|
|
exclude: path.resolve(__dirname, 'public/js/lib/renderer/fretboard'),
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-10-18 12:12:32 +00:00
|
|
|
options: { limit: '10000', mimetype: 'svg+xml' }
|
2018-08-27 11:37:42 +00:00
|
|
|
}]
|
2020-04-02 12:43:56 +00:00
|
|
|
}, {
|
2020-04-08 14:47:12 +00:00
|
|
|
test: /.*\/fretboard\/svg\/.*\.svg$/,
|
|
|
|
loader: 'string-loader'
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.png(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-10-18 12:12:32 +00:00
|
|
|
options: { limit: '10000', mimetype: 'image/png' }
|
2018-08-27 11:37:42 +00:00
|
|
|
}]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.gif(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-10-18 12:12:32 +00:00
|
|
|
options: { limit: '10000', mimetype: 'image/gif' }
|
2018-08-27 11:37:42 +00:00
|
|
|
}]
|
2019-08-18 06:09:12 +00:00
|
|
|
}, {
|
|
|
|
test: /@hackmd\/codemirror\/addon\/lint\/lint/,
|
|
|
|
use: [{
|
|
|
|
loader: 'script-loader'
|
|
|
|
}]
|
2017-03-08 18:41:05 +00:00
|
|
|
}]
|
|
|
|
},
|
|
|
|
node: {
|
|
|
|
fs: 'empty'
|
2017-03-12 18:09:52 +00:00
|
|
|
},
|
2017-03-12 08:53:04 +00:00
|
|
|
|
2017-03-12 18:09:52 +00:00
|
|
|
stats: {
|
|
|
|
assets: false
|
2017-03-08 18:41:05 +00:00
|
|
|
}
|
|
|
|
}
|