* removed editor and initial cleanup * cleanup * updated jquery * tidy up * moved src and build to lib * tidy up and fixed webpack * updated readme * removed junk * tidy up * works with sample and editor * removed editor_width and editor_height * auto width and height * added license feature * not doing dist * fixed typo * added searchcursor * fixed typo * doc updates * improved comment * updated init for cm settings * fixed jquery/cm includes * documentation updates * updated changes doc * fixed cmsettings * updated examples
39 lines
961 B
JavaScript
39 lines
961 B
JavaScript
const webpack = require('webpack');
|
|
const path = require('path');
|
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: {
|
|
mergely: './src/mergely.js',
|
|
// 'mergely.min': './src/mergely.js'
|
|
},
|
|
output: {
|
|
path: path.join(__dirname, 'lib'),
|
|
filename: './[name].js',
|
|
library: 'mergely',
|
|
libraryTarget: 'umd',
|
|
umdNamedDefine: true
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{ test: /\.css$/, loader: ExtractTextPlugin.extract('css-loader') }
|
|
]
|
|
},
|
|
resolve: {
|
|
extensions: ['.js']
|
|
},
|
|
externals: {
|
|
jquery: 'jQuery',
|
|
CodeMirror: 'CodeMirror'
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
sourceMap: true,
|
|
include: /\.js$/,
|
|
// include: /\.min\.js$/,
|
|
exclude: /node_modules/
|
|
}),
|
|
new ExtractTextPlugin('mergely.css')
|
|
]
|
|
};
|