@globules-io/ogx.js
Advanced tools
Comparing version 1.45.0 to 1.46.0
@@ -8,6 +8,7 @@ const path = require('path'); | ||
const src_lib = path.normalize(__dirname+'/www/js/lib'); | ||
const dest_www = path.normalize(__dirname+'./../../../www'); | ||
const dest_themes = path.normalize(__dirname+'./../../../www/themes'); | ||
const dest_lib = path.normalize(__dirname+'./../../js/lib'); | ||
const dest_bin = path.normalize(__dirname+'./../../js/bin'); | ||
const root = require.main.paths[0].split('node_modules')[0].slice(0, -1); | ||
const dest_www = path.normalize(root+'/www'); | ||
const dest_themes = path.normalize(root+'/www/themes'); | ||
const dest_lib = path.normalize(root+'/www/js/lib'); | ||
const dest_bin = path.normalize(root+'/www/js/bin'); | ||
//if no www, copy the whole folder | ||
@@ -21,4 +22,6 @@ if(!fs.existsSync(dest_www)){ | ||
if(!fs.existsSync(dest_lib)){ | ||
console.log('Info: copying lib folder'); | ||
copy(src_lib, dest_lib); | ||
}else{ | ||
}else{ | ||
console.log('Info: merging libraries...'); | ||
//copy cryto, globules, howler, jquery, moment, mongogx | ||
@@ -29,4 +32,4 @@ let lib_folders = ['cryto', 'globules', 'howler', 'jquery', 'moment', 'mongogx']; | ||
for(let i = 0; i < lib_folders.length; i++){ | ||
lib_folders_src = path.normalize(__dirname+'/www/js/lib/'+lib_folders[i]); | ||
lib_folders_dest = path.normalize(__dirname+'./../../js/lib/'+lib_folders[i]); | ||
lib_folders_src = path.normalize(src_lib+'/'+lib_folders[i]); | ||
lib_folders_dest = path.normalize(dest_www+'/js/lib/'+lib_folders[i]); | ||
//patch --dev | ||
@@ -37,3 +40,4 @@ if(fs.existsSync(lib_folders_src)){ | ||
} | ||
} | ||
} | ||
console.log('Info: done merging libraries'); | ||
} | ||
@@ -43,2 +47,3 @@ //check if themes are here | ||
if(!fs.existsSync(dest_themes) && fs.existsSync(src_themes)){ | ||
console.log('Info: copying default theme'); | ||
copy(src_themes, dest_themes, {overwrite:false}); | ||
@@ -48,3 +53,3 @@ } | ||
//patch --dev | ||
if(!fs.existsSync(dest_bin) && fs.existsSync(src_bin)){ | ||
if(!fs.existsSync(dest_bin) && fs.existsSync(src_bin)){ | ||
copy(src_bin, dest_bin, {overwrite:false}); | ||
@@ -51,0 +56,0 @@ } |
{ | ||
"name": "@globules-io/ogx.js", | ||
"version": "1.45.0", | ||
"version": "1.46.0", | ||
"description": "Javascript framework for webviews", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
{ | ||
"routing":{ | ||
"routes":{}, | ||
"index": "", | ||
"options":{ | ||
@@ -5,0 +6,0 @@ "history": true, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3014944
222