add env_loc.js
This commit is contained in:
13
boot_link.js
13
boot_link.js
@@ -4,11 +4,13 @@ const { execSync } = require('child_process')
|
||||
const path = require('path')
|
||||
|
||||
// Main function to link libraries
|
||||
const openNpmPath = fs.existsSync(path.resolve('./env_loc.gitomit.sfomit.json'))
|
||||
? require(path.resolve('./env_loc.gitomit.sfomit.json')).openNpm
|
||||
const openSharePath = fs.existsSync(
|
||||
path.resolve('./env_loc.gitomit.sfomit.json')
|
||||
)
|
||||
? require(path.resolve('./env_loc.gitomit.sfomit.json')).openShare
|
||||
: ''
|
||||
console.log('openNpm:', openNpmPath)
|
||||
if (!openNpmPath) {
|
||||
console.log('openShare:', openSharePath)
|
||||
if (!openSharePath) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -24,10 +26,9 @@ const libs = fs
|
||||
libName.startsWith('wo-') ||
|
||||
libName === 'tic-crypto'
|
||||
)
|
||||
console.log('libs:', libs)
|
||||
|
||||
libs.forEach(libName => {
|
||||
const libPath = path.join(openNpmPath, libName)
|
||||
const libPath = path.join(openSharePath, libName)
|
||||
if (fs.existsSync(libPath)) {
|
||||
console.log(`Copying ${libName}`)
|
||||
const sourceFiles = fs
|
||||
|
||||
Reference in New Issue
Block a user