Adds a build option to directly compile the plugin into the runtime, so ant deploy is not needed for testing changes.
git-svn-id: https://svn.libreccm.org/ccm/trunk@5766 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
02ec9e0023
commit
a8889c03b0
|
|
@ -0,0 +1,35 @@
|
||||||
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||||
|
|
||||||
|
const pluginName = "ccm-cms-images";
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: {
|
||||||
|
plugin: "./src/index.ts",
|
||||||
|
"plugin.min": "./src/index.ts"
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
path: path.join(__dirname, "../../../../../runtime/apache-tomcat-8.5.15/webapps/ROOT/assets/tinymce/js/tinymce/plugins", pluginName),
|
||||||
|
filename: "[name].js"
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: [".webpack.js", ".web.js", ".ts", ".js"]
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [{
|
||||||
|
test: /\.ts$/,
|
||||||
|
use: "ts-loader"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
|
include: /\.min\.js$/,
|
||||||
|
minimize: true
|
||||||
|
}),
|
||||||
|
new CopyWebpackPlugin([{
|
||||||
|
from: path.join(__dirname, "../src/LICENSE"),
|
||||||
|
to: path.join(__dirname, "../dist", pluginName)
|
||||||
|
}])
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
"start": "webpack-dev-server --config config/webpack.config.dev.js --progress --open --inline",
|
"start": "webpack-dev-server --config config/webpack.config.dev.js --progress --open --inline",
|
||||||
"lint": "tslint 'src/**/*.js'",
|
"lint": "tslint 'src/**/*.js'",
|
||||||
"build": "webpack --config config/webpack.config.prod.js --progress",
|
"build": "webpack --config config/webpack.config.prod.js --progress",
|
||||||
|
"test": "webpack --config config/webpack.config.test.js --progress",
|
||||||
"watch": "npm-watch"
|
"watch": "npm-watch"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue