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',
|
|
|
|
chunks: ['font-pack', 'index-styles-pack', 'index-styles', 'index'],
|
|
|
|
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',
|
|
|
|
chunks: ['font-pack', 'cover-styles-pack', 'cover'],
|
|
|
|
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',
|
|
|
|
chunks: ['font-pack', 'pretty-styles-pack', 'pretty-styles', 'pretty'],
|
|
|
|
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',
|
|
|
|
chunks: ['font-pack', 'slide-styles-pack', 'slide-styles', 'slide'],
|
|
|
|
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/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/emojify.js'),
|
|
|
|
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'
|
2017-03-08 18:41:05 +00:00
|
|
|
}
|
2018-07-02 20:24:56 +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'),
|
|
|
|
'font-pack': path.join(__dirname, 'public/css/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'),
|
2018-10-05 19:51:54 +00:00
|
|
|
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
|
2017-03-08 18:41:05 +00:00
|
|
|
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',
|
|
|
|
'script-loader!js-url',
|
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!js-url',
|
|
|
|
'expose-loader?filterXSS!xss',
|
|
|
|
'script-loader!Idle.Js',
|
|
|
|
'expose-loader?LZString!lz-string',
|
|
|
|
'script-loader!codemirror',
|
|
|
|
'script-loader!inlineAttachment',
|
|
|
|
'script-loader!jqueryTextcomplete',
|
|
|
|
'script-loader!codemirrorSpellChecker',
|
|
|
|
'script-loader!codemirrorInlineAttachment',
|
|
|
|
'script-loader!ot',
|
2017-03-08 18:41:05 +00:00
|
|
|
'flowchart.js',
|
|
|
|
'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'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/lib/codemirror.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/addon/fold/foldgutter.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/addon/display/fullscreen.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/addon/dialog/dialog.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/addon/scroll/simplescrollbars.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/addon/search/matchesonscrollbar.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/theme/monokai.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/theme/one-dark.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/mode/tiddlywiki/tiddlywiki.css'),
|
|
|
|
path.join(__dirname, 'node_modules/codemirror/mode/mediawiki/mediawiki.css'),
|
|
|
|
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'),
|
2018-10-05 19:51:54 +00:00
|
|
|
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/css/bootstrap-social.css'),
|
2018-10-04 18:01:01 +00:00
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css')
|
2017-03-08 18:41:05 +00:00
|
|
|
],
|
|
|
|
'index-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?Spinner!spin.js',
|
|
|
|
'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!js-url',
|
|
|
|
'script-loader!handlebars',
|
|
|
|
'expose-loader?hljs!highlight.js',
|
|
|
|
'expose-loader?emojify!emojify.js',
|
|
|
|
'expose-loader?filterXSS!xss',
|
|
|
|
'script-loader!Idle.Js',
|
|
|
|
'script-loader!gist-embed',
|
|
|
|
'expose-loader?LZString!lz-string',
|
|
|
|
'script-loader!codemirror',
|
|
|
|
'script-loader!inlineAttachment',
|
|
|
|
'script-loader!jqueryTextcomplete',
|
|
|
|
'script-loader!codemirrorSpellChecker',
|
|
|
|
'script-loader!codemirrorInlineAttachment',
|
|
|
|
'script-loader!ot',
|
2017-03-08 18:41:05 +00:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?Viz!viz.js',
|
|
|
|
'script-loader!abcjs',
|
|
|
|
'expose-loader?io!socket.io-client',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/index.js')
|
|
|
|
],
|
|
|
|
pretty: [
|
|
|
|
'babel-polyfill',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?filterXSS!xss',
|
2017-03-08 18:41:05 +00:00
|
|
|
'flowchart.js',
|
|
|
|
'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'),
|
2018-10-05 19:51:54 +00:00
|
|
|
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
|
2018-10-04 18:01:01 +00:00
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.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',
|
|
|
|
'expose-loader?emojify!emojify.js',
|
|
|
|
'expose-loader?filterXSS!xss',
|
|
|
|
'script-loader!gist-embed',
|
2017-03-08 18:41:05 +00:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?Viz!viz.js',
|
|
|
|
'script-loader!abcjs',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 18:41:05 +00:00
|
|
|
path.join(__dirname, 'public/js/pretty.js')
|
|
|
|
],
|
|
|
|
slide: [
|
|
|
|
'babel-polyfill',
|
|
|
|
'bootstrap-tooltip',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?filterXSS!xss',
|
2017-03-08 18:41:05 +00:00
|
|
|
'flowchart.js',
|
|
|
|
'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': [
|
2018-10-05 19:51:54 +00:00
|
|
|
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
|
2018-10-04 18:01:01 +00:00
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.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',
|
|
|
|
'expose-loader?emojify!emojify.js',
|
|
|
|
'expose-loader?filterXSS!xss',
|
|
|
|
'script-loader!gist-embed',
|
2017-03-08 18:41:05 +00:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?Viz!viz.js',
|
|
|
|
'script-loader!abcjs',
|
2017-03-08 18:41:05 +00:00
|
|
|
'headjs',
|
2018-07-02 20:24:56 +00:00
|
|
|
'expose-loader?Reveal!reveal.js',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
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: {
|
|
|
|
codemirror: path.join(__dirname, 'node_modules/codemirror/codemirror.min.js'),
|
|
|
|
inlineAttachment: path.join(__dirname, 'public/vendor/inlineAttachment/inline-attachment.js'),
|
|
|
|
jqueryTextcomplete: path.join(__dirname, 'public/vendor/jquery-textcomplete/jquery.textcomplete.js'),
|
|
|
|
codemirrorSpellChecker: path.join(__dirname, 'public/vendor/codemirror-spell-checker/spell-checker.min.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'),
|
|
|
|
'headjs': path.join(__dirname, 'node_modules/reveal.js/lib/js/head.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'),
|
|
|
|
raphael: path.join(__dirname, 'node_modules/raphael/raphael.no-deps.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: [{
|
2017-03-08 18:41:05 +00:00
|
|
|
test: /\.js$/,
|
2018-07-02 20:24:56 +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: require.resolve('js-sequence-diagrams'),
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'imports-loader',
|
2018-08-27 11:37:42 +00:00
|
|
|
options: {_: 'lodash', Raphael: 'raphael', eve: 'eve'}
|
|
|
|
}]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{loader: 'file-loader'}]
|
2017-04-09 12:05:48 +00:00
|
|
|
}, {
|
|
|
|
test: /\.html$/,
|
2018-07-02 20:24:56 +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-08-27 11:37:42 +00:00
|
|
|
options: {prefix: 'font/', limit: '5000'}
|
|
|
|
}]
|
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-08-27 11:37:42 +00:00
|
|
|
options: {limit: '5000', mimetype: 'application/octet-stream'}
|
|
|
|
}]
|
2017-03-08 18:41:05 +00:00
|
|
|
}, {
|
|
|
|
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 20:24:56 +00:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-08-27 11:37:42 +00:00
|
|
|
options: {limit: '10000', mimetype: 'svg+xml'}
|
|
|
|
}]
|
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-08-27 11:37:42 +00:00
|
|
|
options: {limit: '10000', mimetype: 'image/png'}
|
|
|
|
}]
|
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-08-27 11:37:42 +00:00
|
|
|
options: {limit: '10000', mimetype: 'image/gif'}
|
|
|
|
}]
|
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
|
|
|
}
|
|
|
|
}
|