neo.mjs 4.0.26 → 4.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import fs
|
|
2
|
-
import path
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import WebpackHookPlugin from 'webpack-hook-plugin';
|
|
3
4
|
|
|
4
5
|
const cwd = process.cwd(),
|
|
5
6
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
|
@@ -7,7 +8,10 @@ const cwd = process.cwd(),
|
|
|
7
8
|
neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
|
|
8
9
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
|
|
9
10
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
|
10
|
-
entry = {main: path.resolve(neoPath, filenameConfig.mainInput)}
|
|
11
|
+
entry = {main: path.resolve(neoPath, filenameConfig.mainInput)},
|
|
12
|
+
copyFolder = path.resolve(neoPath, 'buildScripts/copyFolder.mjs'),
|
|
13
|
+
faFrom = path.resolve(cwd, 'node_modules/@fortawesome/fontawesome-free'),
|
|
14
|
+
faTo = path.resolve(cwd, buildTarget.folder, 'resources/fontawesome-free');
|
|
11
15
|
|
|
12
16
|
export default {
|
|
13
17
|
mode : 'development',
|
|
@@ -15,6 +19,12 @@ export default {
|
|
|
15
19
|
entry,
|
|
16
20
|
target : 'web',
|
|
17
21
|
|
|
22
|
+
plugins: [
|
|
23
|
+
new WebpackHookPlugin({
|
|
24
|
+
onBuildEnd: [`node ${copyFolder} -s ${faFrom} -t ${faTo}`]
|
|
25
|
+
})
|
|
26
|
+
],
|
|
27
|
+
|
|
18
28
|
output: {
|
|
19
29
|
chunkFilename: 'chunks/main/[id].js',
|
|
20
30
|
filename : filenameConfig.mainOutput,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import fs
|
|
2
|
-
import path
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import WebpackHookPlugin from 'webpack-hook-plugin';
|
|
3
4
|
|
|
4
5
|
const cwd = process.cwd(),
|
|
5
6
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
|
@@ -7,13 +8,22 @@ const cwd = process.cwd(),
|
|
|
7
8
|
neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
|
|
8
9
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
|
|
9
10
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
|
10
|
-
entry = {main: path.resolve(neoPath, filenameConfig.mainInput)}
|
|
11
|
+
entry = {main: path.resolve(neoPath, filenameConfig.mainInput)},
|
|
12
|
+
copyFolder = path.resolve(neoPath, 'buildScripts/copyFolder.mjs'),
|
|
13
|
+
faFrom = path.resolve(cwd, 'node_modules/@fortawesome/fontawesome-free'),
|
|
14
|
+
faTo = path.resolve(cwd, buildTarget.folder, 'resources/fontawesome-free');
|
|
11
15
|
|
|
12
16
|
export default {
|
|
13
17
|
mode : 'production',
|
|
14
18
|
entry,
|
|
15
19
|
target: 'web',
|
|
16
20
|
|
|
21
|
+
plugins: [
|
|
22
|
+
new WebpackHookPlugin({
|
|
23
|
+
onBuildEnd: [`node ${copyFolder} -s ${faFrom} -t ${faTo}`]
|
|
24
|
+
})
|
|
25
|
+
],
|
|
26
|
+
|
|
17
27
|
output: {
|
|
18
28
|
chunkFilename: 'chunks/main/[id].js',
|
|
19
29
|
filename : filenameConfig.mainOutput,
|
package/package.json
CHANGED
|
@@ -47,11 +47,20 @@ class Stylesheet extends Base {
|
|
|
47
47
|
construct(config) {
|
|
48
48
|
super.construct(config);
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
let neoConfig = Neo.config,
|
|
51
|
+
faPath;
|
|
52
|
+
|
|
53
|
+
if (neoConfig.useFontAwesome) {
|
|
54
|
+
if (neoConfig.environment === 'development') {
|
|
55
|
+
faPath = neoConfig.basePath + 'node_modules/@fortawesome/fontawesome-free/css/all.min.css';
|
|
56
|
+
} else {
|
|
57
|
+
faPath = neoConfig.basePath.substr(6) + 'resources/fontawesome-free/css/all.min.css';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
this.createStyleSheet(null, null, faPath);
|
|
52
61
|
}
|
|
53
62
|
|
|
54
|
-
if (
|
|
63
|
+
if (neoConfig.themes.length > 0 && neoConfig.themes[0] !== '') {
|
|
55
64
|
this.addGlobalCss();
|
|
56
65
|
}
|
|
57
66
|
}
|
package/src/table/View.mjs
CHANGED
|
@@ -112,7 +112,7 @@ class View extends Component {
|
|
|
112
112
|
value : rendererValue
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
-
cellCls = rendererOutput
|
|
115
|
+
cellCls = rendererOutput?.cls || ['neo-table-cell'];
|
|
116
116
|
|
|
117
117
|
if (column.align !== 'left') {
|
|
118
118
|
cellCls.push('neo-' + column.align);
|
|
@@ -121,7 +121,7 @@ class View extends Component {
|
|
|
121
121
|
if (!Neo.isObject(rendererOutput)) {
|
|
122
122
|
rendererOutput = {
|
|
123
123
|
cls : cellCls,
|
|
124
|
-
html: rendererOutput
|
|
124
|
+
html: rendererOutput?.toString()
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
|