#8750 fixed, npm update

This commit is contained in:
Juan Ferrer 2019-02-05 14:11:40 +01:00
parent b5c610daf4
commit 233c9f624c
7 changed files with 3159 additions and 5312 deletions

View File

@ -221,6 +221,9 @@
.tags td:first-child { .tags td:first-child {
color: #999; color: #999;
} }
.tags td:last-child {
padding-left: .5em;
}
/* List view */ /* List view */

View File

@ -21,8 +21,7 @@ Hedera.New = new Class
"advlist autolink lists link image charmap print preview hr" "advlist autolink lists link image charmap print preview hr"
,"anchor pagebreak searchreplace wordcount visualblocks" ,"anchor pagebreak searchreplace wordcount visualblocks"
,"visualchars code fullscreen insertdatetime media nonbreaking" ,"visualchars code fullscreen insertdatetime media nonbreaking"
,"save table contextmenu directionality emoticons template" ,"save table directionality emoticons template paste"
,"paste textcolor"
] ]
,toolbar1: ,toolbar1:
" print preview | link image media emoticons blockquote" " print preview | link image media emoticons blockquote"

8326
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,28 +8,29 @@
"url": "https://git.verdnatura.es/hedera-web" "url": "https://git.verdnatura.es/hedera-web"
}, },
"devDependencies": { "devDependencies": {
"archiver": "^2.1.0", "archiver": "^3.0.0",
"assets-webpack-plugin": "^3.5.1", "assets-webpack-plugin": "^3.9.7",
"bundle-loader": "^0.5.4", "bundle-loader": "^0.5.6",
"css-loader": "^0.25.0", "css-loader": "^2.1.0",
"eslint": "^3.16.1", "eslint": "^5.13.0",
"file-loader": "^0.9.0", "file-loader": "^3.0.1",
"fs-extra": "^5.0.0", "fs-extra": "^5.0.0",
"glob": "^7.1.2", "glob": "^7.1.3",
"json-loader": "^0.5.7", "json-loader": "^0.5.7",
"raw-loader": "^0.5.1", "raw-loader": "^1.0.0",
"style-loader": "^0.19.1", "style-loader": "^0.23.1",
"url-loader": "^0.5.7", "url-loader": "^1.1.2",
"webpack": "^3.12.0", "webpack": "^4.29.1",
"webpack-dev-server": "^2.11.2", "webpack-cli": "^3.2.3",
"webpack-merge": "^4.1.2", "webpack-dev-server": "^3.1.14",
"webpack-merge": "^4.2.1",
"yaml-loader": "^0.5.0" "yaml-loader": "^0.5.0"
}, },
"dependencies": { "dependencies": {
"js-yaml": "^3.10.0", "js-yaml": "^3.12.1",
"mootools": "^1.5.2", "mootools": "^1.5.2",
"require-yaml": "0.0.1", "require-yaml": "0.0.1",
"tinymce": "^4.7.13" "tinymce": "^5.0.0"
}, },
"scripts": { "scripts": {
"dev": "webpack-dev-server --progress --colors --hot", "dev": "webpack-dev-server --progress --colors --hot",

View File

@ -25,40 +25,20 @@ function css($fileName) {
function getWebpackAssets() { function getWebpackAssets() {
$wpConfig = json_decode(file_get_contents('webpack.config.json')); $wpConfig = json_decode(file_get_contents('webpack.config.json'));
$buildDir = $wpConfig->buildDir; $buildDir = $wpConfig->buildDir;
$serverPath = '';
if (_DEV_MODE) {
$devServerPort = $wpConfig->devServerPort; $devServerPort = $wpConfig->devServerPort;
$host = $_SERVER['SERVER_NAME']; $host = $_SERVER['SERVER_NAME'];
$assets = new stdClass(); $serverPath = "http://$host:$devServerPort/";
if (!_DEV_MODE) {
$wpAssets = json_decode(file_get_contents("$buildDir/webpack-assets.json"));
$manifestJs = $wpAssets->manifest->js;
$mainJs = $wpAssets->main->js;
unset($wpAssets->manifest);
unset($wpAssets->main);
foreach ($wpAssets as $name => $asset)
if (property_exists($asset, 'js'))
$assets->$name = $asset->js;
} else {
$devServerPath = "http://$host:$devServerPort/$buildDir";
$manifestJs = "$devServerPath/manifest.js";
$mainJs = "$devServerPath/main.js";
unset($wpConfig->entry->main);
foreach ($wpConfig->entry as $asset => $files)
$assets->$asset = "$devServerPath/$asset.js";
} }
$wpAssets = json_decode(file_get_contents("$buildDir/webpack-assets.json"));
$jsFiles = []; $jsFiles = [];
$jsFiles[] = $manifestJs;
foreach ($assets as $jsFile) foreach ($wpAssets as $name => $asset)
$jsFiles[] = $jsFile; if ($name && property_exists($asset, 'js'))
$jsFiles[] = $serverPath . $asset->js;
$jsFiles[] = $mainJs;
return $jsFiles; return $jsFiles;
} }

View File

@ -4,12 +4,14 @@ var AssetsWebpackPlugin = require('assets-webpack-plugin');
var merge = require('webpack-merge'); var merge = require('webpack-merge');
var wpConfig = require('./webpack.config.json'); var wpConfig = require('./webpack.config.json');
var devMode = process.env.NODE_ENV !== 'production'; let env = process.env.NODE_ENV || 'development';
var devMode = env === 'development';
var outputPath = path.join(__dirname, wpConfig.buildDir); var outputPath = path.join(__dirname, wpConfig.buildDir);
var publicPath = wpConfig.buildDir +'/'; var publicPath = wpConfig.buildDir +'/';
var baseConfig = { var baseConfig = {
entry: wpConfig.entry, entry: wpConfig.entry,
mode: devMode ? 'development' : 'production',
output: { output: {
path: outputPath, path: outputPath,
publicPath: publicPath publicPath: publicPath
@ -34,15 +36,21 @@ var baseConfig = {
__dirname: true __dirname: true
}, },
plugins: [ plugins: [
new AssetsWebpackPlugin({
path: outputPath
}),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
_DEV_MODE: devMode, _DEV_MODE: devMode,
_DEV_SERVER_PORT: wpConfig.devServerPort, _DEV_SERVER_PORT: wpConfig.devServerPort,
_PUBLIC_PATH: JSON.stringify (publicPath) _PUBLIC_PATH: JSON.stringify (publicPath)
}),
new webpack.optimize.CommonsChunkPlugin({
names: ['vendor', 'manifest']
}) })
], ],
optimization: {
runtimeChunk: true,
splitChunks: {
chunks: 'all',
}
},
watchOptions: { watchOptions: {
ignored: /node_modules/ ignored: /node_modules/
} }
@ -54,13 +62,6 @@ var prodConfig = {
chunkFilename: 'chunk.[id].[chunkhash].js' chunkFilename: 'chunk.[id].[chunkhash].js'
}, },
plugins: [ plugins: [
new webpack.optimize.UglifyJsPlugin({
minimize: true,
compress: { warnings: false }
}),
new AssetsWebpackPlugin({
path: outputPath
}),
new webpack.HashedModuleIdsPlugin() new webpack.HashedModuleIdsPlugin()
], ],
devtool: 'source-map' devtool: 'source-map'

View File

@ -1,8 +1,5 @@
{ {
"buildDir": "build", "buildDir": "build",
"devServerPort": 9000, "devServerPort": 9000,
"entry": { "entry": {"main": "./app.js"}
"main": "./app.js",
"vendor": ["mootools", "js-yaml"]
}
} }