chore: set repo

This commit is contained in:
xiaohuoni 2023-06-07 17:51:30 +08:00 committed by 林熠
parent 182fdae78f
commit 6015c5d1d1
19 changed files with 111 additions and 22 deletions

View File

@ -144,5 +144,10 @@
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "git@github.com:alibaba/lowcode-engine.git"
"repository": {
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/modules/code-generator"
},
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -66,5 +66,11 @@
},
"engines": {
"node": ">=10.0.0"
}
},
"repository": {
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/modules/material-parser"
},
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -53,5 +53,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/designer"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -47,5 +47,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-core"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -42,5 +42,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-skeleton"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -53,5 +53,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/engine"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -16,5 +16,11 @@
"devDependencies": {
"@alib/build-scripts": "^0.1.18",
"fs-extra": "^10.0.0"
}
},
"repository": {
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/ignitor"
},
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -37,5 +37,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-designer"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -38,5 +38,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-outline-pane"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -48,6 +48,7 @@
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/rax-renderer"
},
"license": "MIT",
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-rax-renderer@0.1.2/build/index.html",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues"
}

View File

@ -49,6 +49,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/rax-simulator-renderer"
},
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-rax-simulator-renderer@1.0.73/build/index.html",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues"
}

View File

@ -41,6 +41,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-renderer"
},
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-react-renderer@1.0.21/build/index.html",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues"
}

View File

@ -43,5 +43,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-simulator-renderer"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -55,5 +55,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/renderer-core"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -48,5 +48,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -29,5 +29,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/types"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -32,5 +32,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/utils"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -47,7 +47,9 @@
},
"repository": {
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/workspace"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

45
scripts/set-repo.js Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/env node
const path = require('path');
const fs = require('fs-extra');
(async () => {
const root = path.join(__dirname, '../');
const workspaces = ['modules', 'packages'];
for (const workspace of workspaces) {
const pkgDir = path.join(root, workspace);
const pkgs = await fs.readdir(pkgDir);
for (const pkg of pkgs) {
if (pkg.charAt(0) === '.') continue;
if (!(await fs.statSync(path.join(pkgDir, pkg))).isDirectory()) continue;
await setRepo({
workspace,
pkgDir,
pkg,
});
}
}
async function setRepo(opts) {
const pkgDir = path.join(opts.pkgDir, opts.pkg);
const pkgPkgJSONPath = path.join(pkgDir, 'package.json');
if (!fs.existsSync(pkgPkgJSONPath)) {
console.log(`${opts.pkg} exists`);
} else {
const pkgPkgJSON = require(pkgPkgJSONPath);
fs.writeJSONSync(
pkgPkgJSONPath,
Object.assign(pkgPkgJSON, {
repository: {
type: 'http',
url: `https://github.com/alibaba/lowcode-engine/tree/main/${opts.workspace}/${opts.pkg}`,
},
bugs: 'https://github.com/alibaba/lowcode-engine/issues',
homepage: 'https://github.com/alibaba/lowcode-engine/#readme',
}),
{ spaces: ' ' },
);
console.log(`[Write] ${opts.pkg}`);
}
}
})();