completing the migration of all files to es modules

This commit is contained in:
Aaron Powell 2025-11-18 11:23:31 +11:00
parent 3f746c6e8d
commit 25adc5da81
3 changed files with 11 additions and 11 deletions

9
.vscode/tasks.json vendored
View File

@ -12,19 +12,19 @@
{
"label": "generate-readme",
"type": "shell",
"command": "node ${workspaceFolder}/eng/update-readme.js",
"command": "npm run build",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Generates the README.md file using update-readme.js script.",
"detail": "Generates the README.md file using npm build run-script.",
"dependsOn": "npm install"
},
{
"label": "validate-collections",
"type": "shell",
"command": "node ${workspaceFolder}/eng/validate-collections.js",
"command": "npm run collection:validate",
"problemMatcher": [],
"group": "build",
"detail": "Validates all collection manifest files.",
@ -33,9 +33,8 @@
{
"label": "create-collection",
"type": "shell",
"command": "node",
"command": "npm run collection:create",
"args": [
"${workspaceFolder}/eng/create-collection.js",
"--id",
"${input:collectionId}",
"--tags",

10
eng/create-collection.js → eng/create-collection.mjs Executable file → Normal file
View File

@ -1,9 +1,9 @@
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
const readline = require("readline");
const { COLLECTIONS_DIR } = require("./constants");
import fs from "fs";
import path from "path";
import readline from "readline";
import { COLLECTIONS_DIR } from "./constants.mjs";
const rl = readline.createInterface({
input: process.stdin,
@ -166,7 +166,7 @@ display:
console.log("\n📝 Next steps:");
console.log("1. Edit the collection manifest to add your items");
console.log("2. Update the name, description, and tags as needed");
console.log("3. Run 'npm run validate:collections' to validate");
console.log("3. Run 'npm run collection:validate' to validate");
console.log("4. Run 'npm start' to generate documentation");
console.log("\n📄 Collection template contents:");
console.log(template);

View File

@ -10,7 +10,8 @@
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"contributors:check": "all-contributors check",
"validate:collections": "node ./eng/validate-collections.mjs"
"collection:validate": "node ./eng/validate-collections.mjs",
"collection:create": "node ./eng/create-collection.mjs"
},
"repository": {
"type": "git",