Skip to content

Commit

Permalink
admin: small updates to build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 8, 2021
1 parent 5b41675 commit 3a76d69
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 8 deletions.
7 changes: 6 additions & 1 deletion misc/admin/lib/cmds/bump-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ const utils_1 = require("../utils");
}
output.forEach((line) => { console.log(line); });
});
})().catch((error) => {
})().then((result) => {
// Something above causes this script to hang, so let's exit manually
setTimeout(() => {
process.exit(0);
}, 1000);
}, (error) => {
console.log(`Error running ${process.argv[0]}: ${error.message}`);
process.exit(1);
});
1 change: 0 additions & 1 deletion misc/admin/lib/cmds/esm-alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ function alias(name) {
// + transform the map JSON to reference "geturl.js"
// We need to swap in the replacement and update its data
const replace = replacements[filename.replace(/\.d.ts\.map$|\.js\.map$/i, ".js")];
console.log(filename, replace);
// Skip!
if (replace === "") {
return;
Expand Down
4 changes: 2 additions & 2 deletions misc/admin/lib/cmds/lock-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ const utils_1 = require("../utils");
accum[pkg.name] = pkg.version;
return accum;
}, ({}));
console.log(versions);
path_1.dirnames.forEach((dirname) => {
// Skip ethers; it's versions are locked during update-versions
if (dirname === "ethers") {
return;
}
console.log(dirname);
const path = path_1.resolve("packages", dirname, "package.json");
const json = utils_1.loadJson(path);
for (const name in (json.dependencies || {})) {
const version = json.dependencies[name];
const target = (versions[name] ? ("^" + versions[name]) : version);
if (version !== target) {
console.log(name, version, "=>", target);
console.log(" ", name, version, "=>", target);
}
json.dependencies[name] = target;
}
Expand Down
1 change: 1 addition & 0 deletions misc/admin/lib/cmds/serve-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function getMime(filename) {
case 'eot': return 'application/vnd.ms-fontobject';
case 'gif': return 'image/gif';
case 'html': return 'text/html';
case 'ico': return 'image/x-icon';
case 'js': return 'application/javascript';
case 'jpg': return 'image/jpeg';
case 'jpeg': return 'image/jpeg';
Expand Down
2 changes: 1 addition & 1 deletion misc/admin/lib/cmds/spell-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ apikey asc endblock startblock
alchemyapi Cloudflare Etherscan INFURA IPFS MetaMask Nodesmith
Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs
goerli homestead kotti kovan mainnet morden mordor rinkeby
ropsten testnet
ropsten testnet lb
// Demo words
args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna
Expand Down
1 change: 1 addition & 0 deletions misc/admin/lib/cmds/upload-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function getMime(filename) {
case 'eot': return 'application/vnd.ms-fontobject';
case 'gif': return 'image/gif';
case 'html': return 'text/html';
case 'ico': return 'image/x-icon';
case 'js': return 'application/javascript';
case 'jpg': return 'image/jpeg';
case 'jpeg': return 'image/jpeg';
Expand Down
7 changes: 6 additions & 1 deletion misc/admin/src.ts/cmds/bump-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ import { loadJson, repeat, saveJson } from "../utils";

output.forEach((line) => { console.log(line); });

})().catch((error) => {
})().then((result) => {
// Something above causes this script to hang, so let's exit manually
setTimeout(() => {
process.exit(0);
}, 1000);
}, (error) => {
console.log(`Error running ${ process.argv[0] }: ${ error.message }`);
process.exit(1);
});
1 change: 0 additions & 1 deletion misc/admin/src.ts/cmds/esm-alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ async function alias(name: string): Promise<void> {
// + transform the map JSON to reference "geturl.js"
// We need to swap in the replacement and update its data
const replace = replacements[filename.replace(/\.d.ts\.map$|\.js\.map$/i, ".js")];
console.log(filename, replace);

// Skip!
if (replace === "") { return; }
Expand Down
1 change: 1 addition & 0 deletions misc/admin/src.ts/cmds/serve-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function getMime(filename: string): string {
case 'eot': return 'application/vnd.ms-fontobject';
case 'gif': return 'image/gif';
case 'html': return 'text/html';
case 'ico': return 'image/x-icon';
case 'js': return 'application/javascript';
case 'jpg': return 'image/jpeg';
case 'jpeg': return 'image/jpeg';
Expand Down
2 changes: 1 addition & 1 deletion misc/admin/src.ts/cmds/spell-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ apikey asc endblock startblock
alchemyapi Cloudflare Etherscan INFURA IPFS MetaMask Nodesmith
Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs
goerli homestead kotti kovan mainnet morden mordor rinkeby
ropsten testnet
ropsten testnet lb
// Demo words
args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna
Expand Down
1 change: 1 addition & 0 deletions misc/admin/src.ts/cmds/upload-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function getMime(filename: string): string {
case 'eot': return 'application/vnd.ms-fontobject';
case 'gif': return 'image/gif';
case 'html': return 'text/html';
case 'ico': return 'image/x-icon';
case 'js': return 'application/javascript';
case 'jpg': return 'image/jpeg';
case 'jpeg': return 'image/jpeg';
Expand Down

0 comments on commit 3a76d69

Please sign in to comment.