added a javascript build pipeline for transpiling and minifying; updated readme

This commit is contained in:
Robert Clarke 2019-05-08 09:54:41 +01:00
parent f5420dac1e
commit 4847d3f171
17 changed files with 3870 additions and 9 deletions

View file

@ -0,0 +1,28 @@
const path = require('path');
module.exports = {
entry: {
zulma_navbar: './src/zulma_navbar.js',
zulma_search: './src/zulma_search.js',
zulma_switchcss: './src/zulma_switchcss.js'
},
output: {
filename: '[name].js',
path: path.resolve('../static/js')
},
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader']
}]
},
resolve: {
extensions: ['*', '.js']
},
stats: {
colors: true
},
devtool: 'source-map',
mode: 'production',
};