diff --git a/bin/fix-licensing-headers.cjs b/bin/fix-licensing-headers.cjs deleted file mode 100644 index ff0c5a90f..000000000 --- a/bin/fix-licensing-headers.cjs +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Script to add missing licensing headers. - * Usually run via npm script. - */ -const { promises: fsp } = require("fs"); -const path = require("path"); - -const header = `/** - * (c) 2022, Micro:bit Educational Foundation and contributors - * - * SPDX-License-Identifier: MIT - */ -`; - -async function* walk(dir) { - for await (const d of await fsp.opendir(dir)) { - const entry = path.join(dir, d.name); - if (d.isDirectory()) { - yield* walk(entry); - } else if (d.isFile()) { - yield entry; - } - } -} - -async function main() { - for await (const p of walk("src")) { - if (/\.tsx?$/.test(p)) { - const contents = await fsp.readFile(p, { encoding: "utf-8" }); - if (!contents.startsWith("/**")) { - await fsp.writeFile(p, header + contents); - } - } - } -} - -main().catch((e) => { - console.error(e); - process.exit(2); -}); diff --git a/package.json b/package.json index 2adbf153e..274303be8 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "ci": "npm run typecheck && npm run test && npm run lint && npm run i18n:tidy -- --check && npm run build", "deploy": "website-deploy-aws", "dev:link-ui": "rm -rf node_modules/@microbit/ui node_modules/@microbit/ui-patterns node_modules/@microbit/i18n-tools && ln -s ../../../ui/packages/ui node_modules/@microbit/ui && ln -s ../../../ui/packages/ui-patterns node_modules/@microbit/ui-patterns && ln -s ../../../ui/packages/i18n-tools node_modules/@microbit/i18n-tools && ln -sf ../@microbit/i18n-tools/bin/microbit-i18n.mjs node_modules/.bin/microbit-i18n && rm -rf styled-system node_modules/.vite && npm run panda", - "fix-licensing-headers": "node bin/fix-licensing-headers.cjs", "generate": "npm run panda && npm run i18n:compile && npm run stubs", "i18n:compile": "microbit-i18n compile", "invalidate": "aws cloudfront create-invalidation --distribution-id $(printenv ${STAGE}_CLOUDFRONT_DISTRIBUTION_ID) --paths \"/*\"",