Put simpleParallax and modify logo.php to merge
This commit is contained in:
58
js/simpleParallaxe/simpleParallax-master/webpack.config.js
Normal file
58
js/simpleParallaxe/simpleParallax-master/webpack.config.js
Normal file
@@ -0,0 +1,58 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
||||
const moment = require('moment');
|
||||
const now = moment().format('DD-MM-YYYY H:m:s');
|
||||
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
const PACKAGE = require('./package.json'),
|
||||
version = PACKAGE.version,
|
||||
description = PACKAGE.description,
|
||||
homepage = PACKAGE.homepage;
|
||||
|
||||
const htmlPlugin = new HtmlWebPackPlugin({
|
||||
template: './index.html',
|
||||
filename: './index.html'
|
||||
});
|
||||
|
||||
const BannerPlugin = new webpack.BannerPlugin({
|
||||
banner: `[name] - ${description},
|
||||
@date: ${now},
|
||||
@version: ${version},
|
||||
@link: ${homepage}`
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
simpleParallax: './src/simpleParallax.js',
|
||||
'simpleParallax.min': './src/simpleParallax.js',
|
||||
index: './test/index.js'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js',
|
||||
library: 'simpleParallax',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true,
|
||||
libraryExport: 'default'
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
include: /\.min\.js$/
|
||||
})
|
||||
]
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: ['babel-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [htmlPlugin, BannerPlugin]
|
||||
};
|
||||
Reference in New Issue
Block a user