neo.mjs 9.2.0 → 9.3.0
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.
package/apps/ServiceWorker.mjs
CHANGED
@@ -41,11 +41,21 @@ export default env => {
|
|
41
41
|
const copyResources = resourcesPath => {
|
42
42
|
let inputPath = path.resolve(cwd, resourcesPath),
|
43
43
|
outputPath = path.resolve(cwd, buildTarget.folder, resourcesPath),
|
44
|
-
childProcess;
|
44
|
+
childProcess, content, filePath;
|
45
45
|
|
46
46
|
if (fs.existsSync(inputPath)) {
|
47
47
|
childProcess = spawnSync('node', [`${neoPath}/buildScripts/copyFolder.mjs -s ${inputPath} -t ${outputPath}`], cpOpts);
|
48
48
|
childProcess.status && process.exit(childProcess.status);
|
49
|
+
|
50
|
+
// Minify all json files inside the copied resources folder
|
51
|
+
fs.readdirSync(outputPath, {recursive: true}).forEach(fileOrFolder => {
|
52
|
+
if (fileOrFolder.endsWith('.json')) {
|
53
|
+
filePath = path.join(outputPath, fileOrFolder);
|
54
|
+
content = requireJson(filePath);
|
55
|
+
|
56
|
+
fs.writeFileSync(filePath, JSON.stringify(content));
|
57
|
+
}
|
58
|
+
});
|
49
59
|
}
|
50
60
|
};
|
51
61
|
|
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -263,12 +263,12 @@ const DefaultConfig = {
|
|
263
263
|
useVdomWorker: true,
|
264
264
|
/**
|
265
265
|
* buildScripts/injectPackageVersion.mjs will update this value
|
266
|
-
* @default '9.
|
266
|
+
* @default '9.3.0'
|
267
267
|
* @memberOf! module:Neo
|
268
268
|
* @name config.version
|
269
269
|
* @type String
|
270
270
|
*/
|
271
|
-
version: '9.
|
271
|
+
version: '9.3.0'
|
272
272
|
};
|
273
273
|
|
274
274
|
Object.assign(DefaultConfig, {
|