mirror of
https://github.com/pezkuwichain/pezkuwi-dev.git
synced 2026-04-22 03:17:57 +00:00
Initial rebrand: @polkadot -> @pezkuwi (3 packages)
- Package namespace: @polkadot/dev -> @pezkuwi/dev - Repository: polkadot-js/dev -> pezkuwichain/pezkuwi-dev - Author: Pezkuwi Team <team@pezkuwichain.io> Packages: - @pezkuwi/dev (build tools, linting, CI scripts) - @pezkuwi/dev-test (test runner) - @pezkuwi/dev-ts (TypeScript build) Upstream: polkadot-js/dev v0.83.3
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2017-2025 @polkadot/dev authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import fs from 'node:fs';
|
||||
|
||||
import { DENO_POL_PRE } from './util.mjs';
|
||||
|
||||
const [e, i] = fs
|
||||
.readdirSync('packages')
|
||||
.filter((p) => fs.existsSync(`packages/${p}/src/mod.ts`))
|
||||
.sort()
|
||||
.reduce((/** @type {[string[], Record<String, string>]} */ [e, i], p) => {
|
||||
e.push(`export * as ${p.replace(/-/g, '_')} from '${DENO_POL_PRE}/${p}/mod.ts';`);
|
||||
i[`${DENO_POL_PRE}/${p}/`] = `./packages/${p}/build-deno/`;
|
||||
|
||||
return [e, i];
|
||||
}, [[], {}]);
|
||||
|
||||
if (!fs.existsSync('mod.ts')) {
|
||||
fs.writeFileSync('mod.ts', `// Copyright 2017-${new Date().getFullYear()} @polkadot/dev authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// auto-generated via polkadot-dev-deno-map, do not edit\n\n// This is a Deno file, so we can allow .ts imports
|
||||
/* eslint-disable import/extensions */\n\n${e.join('\n')}\n`);
|
||||
}
|
||||
|
||||
if (fs.existsSync('import_map.in.json')) {
|
||||
const o = JSON.parse(fs.readFileSync('import_map.in.json', 'utf-8'));
|
||||
|
||||
Object
|
||||
.entries(o.imports)
|
||||
.forEach(([k, v]) => {
|
||||
i[k] = v;
|
||||
});
|
||||
}
|
||||
|
||||
fs.writeFileSync('import_map.json', JSON.stringify({ imports: i }, null, 2));
|
||||
Reference in New Issue
Block a user