1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

fix package-deps building

This commit is contained in:
Andrew Simachev 2020-07-10 14:07:07 +03:00
parent d19b48acf6
commit 838f4ca230
6 changed files with 76 additions and 109 deletions

View file

@ -10,18 +10,17 @@ stdin.on('data', function(chunk) {
});
stdin.on('end', function() {
let lines = data.split('\n');
let lines = data.split('\n').sort();
let baseDepsFile = fs.readFileSync('package.deps.json');
let baseDepsJSON = JSON.parse(baseDepsFile);
let packageFile = fs.readFileSync('package.json');
let packageJSON = JSON.parse(packageFile);
lines = [ ...new Set(lines) ];
packageJSON.build.files = baseDepsJSON.concat(lines).filter(function (el) {
return el != "";
});
let jsonS = JSON.stringify(packageJSON, null, '\t');
fs.writeFileSync('package.json', jsonS);
});
});