neo.mjs 4.0.31 → 4.0.34

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.
@@ -128,6 +128,16 @@ if (programOpts.info) {
128
128
  threads === 'yes' && spawnSync('node', [`${webpackPath}/buildThreads.mjs`] .concat(cpArgs), cpOpts);
129
129
  parsedocs === 'yes' && spawnSync(npmCmd, ['run', 'generate-docs-json'], cpOpts);
130
130
 
131
+ if (env === 'all' || env === 'dev') {
132
+ spawnSync('node', [`${neoPath}/buildScripts/copyFolder.mjs -s ${path.resolve(cwd, 'docs/output') } -t ${path.resolve(cwd, 'dist/development/docs/output')}`], cpOpts);
133
+ spawnSync('node', [`${neoPath}/buildScripts/copyFolder.mjs -s ${path.resolve(cwd, 'docs/resources')} -t ${path.resolve(cwd, 'dist/development/docs/resources')}`], cpOpts);
134
+ }
135
+
136
+ if (env === 'all' || env === 'prod') {
137
+ spawnSync('node', [`${neoPath}/buildScripts/copyFolder.mjs -s ${path.resolve(cwd, 'docs/output') } -t ${path.resolve(cwd, 'dist/production/docs/output')}`], cpOpts);
138
+ spawnSync('node', [`${neoPath}/buildScripts/copyFolder.mjs -s ${path.resolve(cwd, 'docs/resources')} -t ${path.resolve(cwd, 'dist/production/docs/resources')}`], cpOpts);
139
+ }
140
+
131
141
  const processTime = (Math.round((new Date - startDate) * 100) / 100000).toFixed(2);
132
142
  console.log(`\nTotal time for ${programName}: ${processTime}s`);
133
143
 
@@ -1,7 +1,6 @@
1
- import fs from 'fs-extra';
2
- import path from 'path';
3
- import webpack from 'webpack';
4
- import WebpackHookPlugin from 'webpack-hook-plugin';
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
5
4
 
6
5
  const cwd = process.cwd(),
7
6
  configPath = path.resolve(cwd, 'buildScripts/myApps.json'),
@@ -135,9 +134,6 @@ export default env => {
135
134
  context.request = '../../' + context.request;
136
135
  }
137
136
  }),
138
- new WebpackHookPlugin({
139
- onBuildEnd: ['node '+path.resolve(neoPath, 'buildScripts/copyFolder.mjs')+' -s '+path.resolve(neoPath, 'docs/resources')+' -t '+path.resolve(cwd, buildTarget.folder, 'docs/resources')]
140
- }),
141
137
  ...plugins
142
138
  ],
143
139
 
@@ -1,7 +1,6 @@
1
- import fs from 'fs-extra';
2
- import path from 'path';
3
- import webpack from 'webpack';
4
- import WebpackHookPlugin from 'webpack-hook-plugin';
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
5
4
 
6
5
  const cwd = process.cwd(),
7
6
  configPath = path.resolve(cwd, 'buildScripts/myApps.json'),
@@ -139,9 +138,6 @@ export default env => {
139
138
  context.request = '../../' + context.request;
140
139
  }
141
140
  }),
142
- new WebpackHookPlugin({
143
- onBuildEnd: ['node '+path.resolve(neoPath, 'buildScripts/copyFolder.mjs')+' -s '+path.resolve(neoPath, 'docs/resources')+' -t '+path.resolve(cwd, buildTarget.folder, 'docs/resources')]
144
- }),
145
141
  ...plugins
146
142
  ],
147
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.0.31",
3
+ "version": "4.0.34",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -305,7 +305,7 @@ class Base extends Component {
305
305
  */
306
306
  destroy(updateParentVdom=false, silent=false) {
307
307
  this.items.forEach(item => {
308
- item.destroy(false, true);
308
+ item.destroy?.(false, true);
309
309
  });
310
310
 
311
311
  super.destroy(updateParentVdom, silent);
@@ -73,7 +73,7 @@ class Stylesheet extends Base {
73
73
  themes = config.themes,
74
74
  folders = config.useCssVars ? ['src', ...themes] : [themes[0]],
75
75
  env = config.environment,
76
- path = env.startsWith('dist/') ? '' : `../../dist/${env}/`,
76
+ path = env.startsWith('dist/') ? '' : config.appPath.includes('docs') ? `../dist/${env}/` : `../../dist/${env}/`,
77
77
  rootPath = config.basePath.substr(6);
78
78
 
79
79
  document.body.classList.add(themes[0]);
@@ -93,6 +93,7 @@ class Stylesheet extends Base {
93
93
 
94
94
  /**
95
95
  * @param {Object} data
96
+ * @param {String} data.appName
96
97
  * @param {String} data.className
97
98
  * @param {String[]} data.folders
98
99
  */
@@ -100,7 +101,7 @@ class Stylesheet extends Base {
100
101
  let className = data.className,
101
102
  config = Neo.config,
102
103
  env = config.environment,
103
- path = env.startsWith('dist/') ? '' : `../../dist/${env}/`,
104
+ path = env.startsWith('dist/') ? '' : config.appPath.includes('docs') ? `../dist/${env}/` : `../../dist/${env}/`,
104
105
  rootPath = config.basePath.substr(6);
105
106
 
106
107
  if (className.startsWith('Neo.')) {