2017-03-08 13:41:05 -05:00
|
|
|
var webpack = require('webpack')
|
|
|
|
var path = require('path')
|
|
|
|
var HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
|
|
var CopyWebpackPlugin = require('copy-webpack-plugin')
|
2018-07-02 16:24:56 -04:00
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
2016-10-11 03:45:00 -04:00
|
|
|
|
2018-04-16 15:08:24 -04:00
|
|
|
// Fix possible nofile-issues
|
|
|
|
var fs = require('fs')
|
|
|
|
var gracefulFs = require('graceful-fs')
|
|
|
|
gracefulFs.gracefulify(fs)
|
|
|
|
|
2016-10-11 03:45:00 -04:00
|
|
|
module.exports = {
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 07:37:42 -04:00
|
|
|
inject: false,
|
|
|
|
chunksSortMode: 'manual'
|
2017-03-08 13:41:05 -05: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 14:09:52 -04:00
|
|
|
glob: 'dist/**/*',
|
2017-03-08 13:41:05 -05:00
|
|
|
dot: false
|
|
|
|
},
|
|
|
|
to: 'emojify.js/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
2017-03-12 14:09:52 -04: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 13:41:05 -05:00
|
|
|
}
|
2018-07-02 16:24:56 -04:00
|
|
|
]),
|
|
|
|
new MiniCssExtractPlugin()
|
2017-03-08 13:41:05 -05:00
|
|
|
],
|
2018-07-02 16:24:56 -04:00
|
|
|
|
2017-03-08 13:41:05 -05:00
|
|
|
entry: {
|
|
|
|
font: path.join(__dirname, 'public/css/google-font.css'),
|
|
|
|
'font-pack': path.join(__dirname, 'public/css/font.css'),
|
|
|
|
common: [
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?jQuery!expose-loader?$!jquery',
|
2017-03-08 13:41:05 -05:00
|
|
|
'velocity-animate',
|
2018-07-02 16:24:56 -04:00
|
|
|
'imports-loader?$=jquery!jquery-mousewheel',
|
2017-03-08 13:41:05 -05:00
|
|
|
'bootstrap'
|
2016-10-11 03:45:00 -04:00
|
|
|
],
|
2017-03-08 13:41:05 -05: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, 'node_modules/font-awesome/css/font-awesome.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 16:24:56 -04:00
|
|
|
'expose-loader?select2!select2',
|
|
|
|
'expose-loader?moment!moment',
|
|
|
|
'script-loader!js-url',
|
2017-03-08 13:41:05 -05:00
|
|
|
path.join(__dirname, 'public/js/cover.js')
|
|
|
|
],
|
|
|
|
index: [
|
|
|
|
'babel-polyfill',
|
2018-07-02 16:24:56 -04: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 13:41:05 -05:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 13:41:05 -05: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'),
|
|
|
|
path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
|
|
|
|
path.join(__dirname, 'public/css/bootstrap-social.css'),
|
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
|
2018-06-30 09:08:36 -04:00
|
|
|
path.join(__dirname, 'node_modules/octicons/build/octicons.css')
|
2017-03-08 13:41:05 -05:00
|
|
|
],
|
|
|
|
'index-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?Spinner!spin.js',
|
|
|
|
'script-loader!jquery-ui-resizable',
|
2017-03-08 13:41:05 -05:00
|
|
|
'bootstrap-validator',
|
2018-07-02 16:24:56 -04: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 13:41:05 -05:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?Viz!viz.js',
|
|
|
|
'script-loader!abcjs',
|
|
|
|
'expose-loader?io!socket.io-client',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 13:41:05 -05:00
|
|
|
path.join(__dirname, 'public/js/index.js')
|
|
|
|
],
|
|
|
|
pretty: [
|
|
|
|
'babel-polyfill',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?filterXSS!xss',
|
2017-03-08 13:41:05 -05:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 13:41:05 -05: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'),
|
|
|
|
path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
|
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
|
2018-06-30 09:08:36 -04:00
|
|
|
path.join(__dirname, 'node_modules/octicons/build/octicons.css')
|
2017-03-08 13:41:05 -05:00
|
|
|
],
|
|
|
|
'pretty-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 16:24:56 -04: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 13:41:05 -05:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?Viz!viz.js',
|
|
|
|
'script-loader!abcjs',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 13:41:05 -05:00
|
|
|
path.join(__dirname, 'public/js/pretty.js')
|
|
|
|
],
|
|
|
|
slide: [
|
|
|
|
'babel-polyfill',
|
|
|
|
'bootstrap-tooltip',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?filterXSS!xss',
|
2017-03-08 13:41:05 -05:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 13:41:05 -05: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': [
|
|
|
|
path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
|
|
|
|
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
|
2018-06-30 09:08:36 -04:00
|
|
|
path.join(__dirname, 'node_modules/octicons/build/octicons.css')
|
2017-03-08 13:41:05 -05:00
|
|
|
],
|
|
|
|
'slide-pack': [
|
|
|
|
'babel-polyfill',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?jQuery!expose-loader?$!jquery',
|
2017-03-08 13:41:05 -05:00
|
|
|
'velocity-animate',
|
2018-07-02 16:24:56 -04:00
|
|
|
'imports-loader?$=jquery!jquery-mousewheel',
|
2017-03-08 13:41:05 -05:00
|
|
|
'bootstrap-tooltip',
|
2018-07-02 16:24:56 -04: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 13:41:05 -05:00
|
|
|
'flowchart.js',
|
|
|
|
'js-sequence-diagrams',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?Viz!viz.js',
|
|
|
|
'script-loader!abcjs',
|
2017-03-08 13:41:05 -05:00
|
|
|
'headjs',
|
2018-07-02 16:24:56 -04:00
|
|
|
'expose-loader?Reveal!reveal.js',
|
|
|
|
'expose-loader?RevealMarkdown!reveal-markdown',
|
2017-03-08 13:41:05 -05:00
|
|
|
path.join(__dirname, 'public/js/slide.js')
|
|
|
|
]
|
|
|
|
},
|
2016-10-11 03:45:00 -04:00
|
|
|
|
2017-03-08 13:41:05 -05:00
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, 'public/build'),
|
|
|
|
publicPath: '/build/',
|
2018-09-02 04:57:38 -04:00
|
|
|
filename: '[name].js'
|
2017-03-08 13:41:05 -05:00
|
|
|
},
|
2016-10-11 03:45:00 -04:00
|
|
|
|
2017-03-08 13:41:05 -05:00
|
|
|
resolve: {
|
2018-07-02 16:24:56 -04:00
|
|
|
modules: ['node_modules'],
|
|
|
|
extensions: ['.js'],
|
2017-03-08 13:41:05 -05: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 08:39:07 -04:00
|
|
|
'reveal-markdown': path.join(__dirname, 'public/js/reveal-markdown.js'),
|
2018-03-06 08:38:46 -05: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 13:41:05 -05:00
|
|
|
}
|
|
|
|
},
|
2016-10-12 20:56:02 -04:00
|
|
|
|
2017-03-08 13:41:05 -05:00
|
|
|
externals: {
|
|
|
|
'viz.js': 'Viz',
|
|
|
|
'socket.io-client': 'io',
|
|
|
|
'jquery': '$',
|
|
|
|
'moment': 'moment',
|
|
|
|
'handlebars': 'Handlebars',
|
|
|
|
'highlight.js': 'hljs',
|
|
|
|
'select2': 'select2'
|
|
|
|
},
|
2016-10-11 03:45:00 -04:00
|
|
|
|
2017-03-08 13:41:05 -05:00
|
|
|
module: {
|
2018-07-02 16:24:56 -04:00
|
|
|
rules: [{
|
2017-03-08 13:41:05 -05:00
|
|
|
test: /\.js$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{loader: 'babel-loader'}],
|
2017-03-08 13:41:05 -05:00
|
|
|
exclude: [/node_modules/, /public\/vendor/]
|
|
|
|
}, {
|
|
|
|
test: /\.css$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader'
|
|
|
|
]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.scss$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'sass-loader'
|
|
|
|
]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.less$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'less-loader'
|
|
|
|
]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: require.resolve('js-sequence-diagrams'),
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{
|
|
|
|
loader: 'imports-loader',
|
2018-08-27 07:37:42 -04:00
|
|
|
options: {_: 'lodash', Raphael: 'raphael', eve: 'eve'}
|
|
|
|
}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{loader: 'file-loader'}]
|
2017-04-09 08:05:48 -04:00
|
|
|
}, {
|
|
|
|
test: /\.html$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{loader: 'string-loader'}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-08-27 07:37:42 -04:00
|
|
|
options: {prefix: 'font/', limit: '5000'}
|
|
|
|
}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-08-27 07:37:42 -04:00
|
|
|
options: {limit: '5000', mimetype: 'application/octet-stream'}
|
|
|
|
}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-08-27 07:37:42 -04:00
|
|
|
options: {limit: '10000', mimetype: 'svg+xml'}
|
|
|
|
}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.png(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-08-27 07:37:42 -04:00
|
|
|
options: {limit: '10000', mimetype: 'image/png'}
|
|
|
|
}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}, {
|
|
|
|
test: /\.gif(\?v=\d+\.\d+\.\d+)?$/,
|
2018-07-02 16:24:56 -04:00
|
|
|
use: [{
|
|
|
|
loader: 'url-loader',
|
2018-08-27 07:37:42 -04:00
|
|
|
options: {limit: '10000', mimetype: 'image/gif'}
|
|
|
|
}]
|
2017-03-08 13:41:05 -05:00
|
|
|
}]
|
|
|
|
},
|
|
|
|
node: {
|
|
|
|
fs: 'empty'
|
2017-03-12 14:09:52 -04:00
|
|
|
},
|
2017-03-12 04:53:04 -04:00
|
|
|
|
2017-03-12 14:09:52 -04:00
|
|
|
stats: {
|
|
|
|
assets: false
|
2017-03-08 13:41:05 -05:00
|
|
|
}
|
|
|
|
}
|