-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version 0.4.2: handle deeper node_modules search and scopes
Verify files exist in pod/gradle Automatically resolve symlinks for iOS
- Loading branch information
1 parent
4a4292a
commit e05271b
Showing
6 changed files
with
174 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
;(() => { | ||
let resolved_paths = [] | ||
|
||
function process(p, file, found) { | ||
let resolved = path.resolve(p, file) | ||
let real = fs.realpathSync(resolved) | ||
if (resolved_paths.includes(real)) return; // Don't get stuck in an endless loop | ||
resolved_paths.push(real) | ||
|
||
try { | ||
const stat = fs.statSync(resolved) | ||
if (stat.isDirectory()) { | ||
if (file == 'node_modules' || file[0] == '@') { | ||
return fs.readdirSync(resolved).forEach(m => process(resolved, m, found)) | ||
} else { | ||
try { | ||
let package = JSON.parse(fs.readFileSync(path.resolve(resolved, 'package.json'))) | ||
let addon = package && package['liquidcore-addon'] | ||
if (addon) { | ||
found(package, resolved) | ||
} | ||
return fs.readdirSync(resolved).forEach(m => process(resolved, m, found)) | ||
} catch (e) {} | ||
} | ||
} | ||
} catch (e) {} | ||
} | ||
|
||
const version = (s) => s.split('.').map((v,n) => | ||
(s.length-n-1)*100*parseInt(v)).reduce((p,v)=>Number.isInteger(v)?p+v:v) | ||
|
||
module.exports = { | ||
recurse_packages : process, | ||
version : version | ||
} | ||
})() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters