@globules-io/ogx.js 1.20.2 → 1.21.1

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/install.js CHANGED
@@ -3,9 +3,11 @@ const fs = require('fs-extra');
3
3
  const copy = require('recursive-copy');
4
4
  const src_ogx = path.normalize(__dirname+'/ogx');
5
5
  const src_www = path.normalize(__dirname+'/www');
6
+ const src_themes = path.normalize(__dirname+'/www/themes');
6
7
  const src_bin = path.normalize(__dirname+'/www/js/bin');
7
8
  const src_lib = path.normalize(__dirname+'/www/js/lib');
8
9
  const dest_www = path.normalize(__dirname+'./../../../www');
10
+ const dest_themes = path.normalize(__dirname+'./../../../www/themes');
9
11
  const dest_ogx = path.normalize(__dirname+'./../../../ogx');
10
12
  const dest_lib = path.normalize(__dirname+'./../../js/lib');
11
13
  const dest_bin = path.normalize(__dirname+'./../../js/bin');
@@ -14,7 +16,9 @@ copy(src_ogx, dest_ogx, {overwrite:true});
14
16
  //if no www, copy the whole folder
15
17
  if(!fs.existsSync(dest_www)){
16
18
  copy(src_www, dest_www);
19
+ console.log('Info: copying entire www folder');
17
20
  }else{
21
+ console.log('Info: www present, merging files...');
18
22
  //if www, check if js and js/lib already there
19
23
  if(!fs.existsSync(dest_lib)){
20
24
  copy(src_lib, dest_lib);
@@ -26,11 +30,22 @@ if(!fs.existsSync(dest_www)){
26
30
  for(let i = 0; i < lib_folders.length; i++){
27
31
  lib_folders_src = path.normalize(__dirname+'/www/js/lib/'+lib_folders[i]);
28
32
  lib_folders_dest = path.normalize(__dirname+'./../../js/lib/'+lib_folders[i]);
29
- copy(lib_folders_src, lib_folders_dest, {overwrite:true});
33
+ //patch --dev
34
+ if(fs.existsSync(lib_folders_src)){
35
+ console.log('Info: merging lib', lib_folders[i]);
36
+ copy(lib_folders_src, lib_folders_dest, {overwrite:true});
37
+ }
30
38
  }
31
39
  }
40
+ //check if themes are here
41
+ //patch --dev
42
+ if(!fs.existsSync(dest_themes) && fs.existsSync(src_themes)){
43
+ copy(src_themes, dest_themes, {overwrite:false});
44
+ }
32
45
  //deploy js/bin if not already there
33
- if(!fs.existsSync(dest_bin)){
34
- copy(src_bin, dest_bin, {overwrite:false});
46
+ //patch --dev
47
+ if(!fs.existsSync(dest_bin) && fs.existsSync(src_bin)){
48
+ copy(src_bin, dest_bin, {overwrite:false});
35
49
  }
36
- }
50
+ }
51
+ console.log('Info: OGX.JS install done!');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globules-io/ogx.js",
3
- "version": "1.20.2",
3
+ "version": "1.21.1",
4
4
  "description": "Javascript framework for webviews",
5
5
  "dependencies": {
6
6
  "fs-extra": "^10.0.0",