mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-22 17:10:26 +03:00
14 lines
402 B
JavaScript
14 lines
402 B
JavaScript
|
const argv = process.argv.slice(2);
|
||
|
const [ homepage ] = argv;
|
||
|
|
||
|
if (!homepage) {
|
||
|
throw new Error('Homepage has to be provided as the first arg for this script');
|
||
|
}
|
||
|
|
||
|
const packageJsonPath = `${__dirname}/../package.json`;
|
||
|
const packageJson = require(packageJsonPath);
|
||
|
const fs = require('fs');
|
||
|
|
||
|
packageJson.homepage = homepage;
|
||
|
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|