#8750 fixed, npm update
This commit is contained in:
parent
b5c610daf4
commit
233c9f624c
|
@ -221,6 +221,9 @@
|
|||
.tags td:first-child {
|
||||
color: #999;
|
||||
}
|
||||
.tags td:last-child {
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
/* List view */
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@ Hedera.New = new Class
|
|||
"advlist autolink lists link image charmap print preview hr"
|
||||
,"anchor pagebreak searchreplace wordcount visualblocks"
|
||||
,"visualchars code fullscreen insertdatetime media nonbreaking"
|
||||
,"save table contextmenu directionality emoticons template"
|
||||
,"paste textcolor"
|
||||
,"save table directionality emoticons template paste"
|
||||
]
|
||||
,toolbar1:
|
||||
" print preview | link image media emoticons blockquote"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
|
@ -8,28 +8,29 @@
|
|||
"url": "https://git.verdnatura.es/hedera-web"
|
||||
},
|
||||
"devDependencies": {
|
||||
"archiver": "^2.1.0",
|
||||
"assets-webpack-plugin": "^3.5.1",
|
||||
"bundle-loader": "^0.5.4",
|
||||
"css-loader": "^0.25.0",
|
||||
"eslint": "^3.16.1",
|
||||
"file-loader": "^0.9.0",
|
||||
"archiver": "^3.0.0",
|
||||
"assets-webpack-plugin": "^3.9.7",
|
||||
"bundle-loader": "^0.5.6",
|
||||
"css-loader": "^2.1.0",
|
||||
"eslint": "^5.13.0",
|
||||
"file-loader": "^3.0.1",
|
||||
"fs-extra": "^5.0.0",
|
||||
"glob": "^7.1.2",
|
||||
"glob": "^7.1.3",
|
||||
"json-loader": "^0.5.7",
|
||||
"raw-loader": "^0.5.1",
|
||||
"style-loader": "^0.19.1",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^3.12.0",
|
||||
"webpack-dev-server": "^2.11.2",
|
||||
"webpack-merge": "^4.1.2",
|
||||
"raw-loader": "^1.0.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.29.1",
|
||||
"webpack-cli": "^3.2.3",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
"webpack-merge": "^4.2.1",
|
||||
"yaml-loader": "^0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-yaml": "^3.10.0",
|
||||
"js-yaml": "^3.12.1",
|
||||
"mootools": "^1.5.2",
|
||||
"require-yaml": "0.0.1",
|
||||
"tinymce": "^4.7.13"
|
||||
"tinymce": "^5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server --progress --colors --hot",
|
||||
|
|
38
web/html.php
38
web/html.php
|
@ -25,40 +25,20 @@ function css($fileName) {
|
|||
function getWebpackAssets() {
|
||||
$wpConfig = json_decode(file_get_contents('webpack.config.json'));
|
||||
$buildDir = $wpConfig->buildDir;
|
||||
$devServerPort = $wpConfig->devServerPort;
|
||||
$serverPath = '';
|
||||
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
$assets = new stdClass();
|
||||
|
||||
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";
|
||||
if (_DEV_MODE) {
|
||||
$devServerPort = $wpConfig->devServerPort;
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
$serverPath = "http://$host:$devServerPort/";
|
||||
}
|
||||
|
||||
$wpAssets = json_decode(file_get_contents("$buildDir/webpack-assets.json"));
|
||||
$jsFiles = [];
|
||||
$jsFiles[] = $manifestJs;
|
||||
|
||||
foreach ($assets as $jsFile)
|
||||
$jsFiles[] = $jsFile;
|
||||
|
||||
$jsFiles[] = $mainJs;
|
||||
foreach ($wpAssets as $name => $asset)
|
||||
if ($name && property_exists($asset, 'js'))
|
||||
$jsFiles[] = $serverPath . $asset->js;
|
||||
|
||||
return $jsFiles;
|
||||
}
|
||||
|
|
|
@ -4,12 +4,14 @@ var AssetsWebpackPlugin = require('assets-webpack-plugin');
|
|||
var merge = require('webpack-merge');
|
||||
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 publicPath = wpConfig.buildDir +'/';
|
||||
|
||||
var baseConfig = {
|
||||
entry: wpConfig.entry,
|
||||
mode: devMode ? 'development' : 'production',
|
||||
output: {
|
||||
path: outputPath,
|
||||
publicPath: publicPath
|
||||
|
@ -34,15 +36,21 @@ var baseConfig = {
|
|||
__dirname: true
|
||||
},
|
||||
plugins: [
|
||||
new AssetsWebpackPlugin({
|
||||
path: outputPath
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
_DEV_MODE: devMode,
|
||||
_DEV_SERVER_PORT: wpConfig.devServerPort,
|
||||
_PUBLIC_PATH: JSON.stringify (publicPath)
|
||||
}),
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
names: ['vendor', 'manifest']
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
runtimeChunk: true,
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
}
|
||||
},
|
||||
watchOptions: {
|
||||
ignored: /node_modules/
|
||||
}
|
||||
|
@ -54,13 +62,6 @@ var prodConfig = {
|
|||
chunkFilename: 'chunk.[id].[chunkhash].js'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
minimize: true,
|
||||
compress: { warnings: false }
|
||||
}),
|
||||
new AssetsWebpackPlugin({
|
||||
path: outputPath
|
||||
}),
|
||||
new webpack.HashedModuleIdsPlugin()
|
||||
],
|
||||
devtool: 'source-map'
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{
|
||||
"buildDir": "build",
|
||||
"devServerPort": 9000,
|
||||
"entry": {
|
||||
"main": "./app.js",
|
||||
"vendor": ["mootools", "js-yaml"]
|
||||
}
|
||||
"entry": {"main": "./app.js"}
|
||||
}
|
Loading…
Reference in New Issue