GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lowcode-engine/scripts/set-repo.js at main · hengleeme/lowcode-engine

Expand file tree

/

set-repo.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
45 lines (42 loc) · 1.54 KB
/

set-repo.js

Copy path

File metadata and controls

45 lines (42 loc) · 1.54 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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}`);
}
}
})();
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.