UNPKG

@alexaegis/nuke

Version:
137 lines (136 loc) 4.8 kB
#!/usr/bin/env node Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const require_functions = require("../functions-BbQkbvEM.cjs"); let _alexaegis_logging = require("@alexaegis/logging"); let _alexaegis_cli_tools = require("@alexaegis/cli-tools"); //#endregion //#region src/bin/nuke.ts var yarguments = _alexaegis_cli_tools.YargsBuilder.withDefaults({ name: "@alexaegis/nuke", description: "Nuke stuff", version: "0.15.6", license: "MIT", "private": false, archetype: { "platform": "node", "language": "ts", "kind": "lib" }, keywords: [ "clean", "managed-by-autotool", "nuke" ], repository: { "url": "git+https://github.com/AlexAegis/js-tooling.git", "type": "git" }, type: "module", publishConfig: { "access": "public", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs", "default": "./dist/index.js" }, "./package.json": "./package.json", "./readme": "./readme.md" }, "bin": { "nuke": "./dist/bin/nuke.js" } }, files: ["dist"], engines: { "node": ">=22.6.0" }, scripts: { "lint:depcheck": "turbo run lint:depcheck_ --concurrency 16 --filter @alexaegis/nuke", "lint:depcheck_": "depcheck", "lint:es": "turbo run lint:es_ --concurrency 16 --filter @alexaegis/nuke", "lint:es_": "eslint --max-warnings=0 --fix --no-error-on-unmatched-pattern .", "lint:format": "turbo run lint:format_ --concurrency 16 --filter @alexaegis/nuke", "lint:format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --check .", "lint:md": "turbo run lint:md_ --concurrency 16 --filter @alexaegis/nuke", "lint:md_": "remark --frail --no-stdout --silently-ignore .", "lint:tsc": "turbo run lint:tsc_ --concurrency 16 --filter @alexaegis/nuke", "lint:tsc_": "tsc --noEmit", "publint": "BUILD_REASON='publish' turbo run publint_ --concurrency 16 --filter @alexaegis/nuke", "publint_": "publint", "test": "turbo run test_ --concurrency 16 --filter @alexaegis/nuke", "test_": "vitest --passWithNoTests --coverage --run", "test:watch": "vitest --passWithNoTests --coverage", "all": "BUILD_REASON='publish' turbo run all_ --concurrency 16 --filter @alexaegis/nuke", "build": "turbo run build-lib_ --concurrency 16 --filter @alexaegis/nuke", "build-lib_": "vite build", "format": "turbo run format_ --concurrency 16 --filter @alexaegis/nuke", "format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --write ." }, exports: { ".": { "types": "./src/index.ts", "import": "./dist/index.js", "require": "./dist/index.cjs", "default": "./dist/index.js" }, "./package.json": "./package.json", "./readme": "./readme.md" }, bin: { "nuke": "./src/bin/nuke.ts" }, dependencies: { "@alexaegis/cli-tools": "workspace:^", "@alexaegis/common": "workspace:^", "@alexaegis/logging": "workspace:^", "@alexaegis/workspace-tools": "workspace:^", "globby": "^16.2.1" }, devDependencies: { "@alexaegis/eslint-config-vitest": "workspace:^", "@alexaegis/ts": "workspace:^", "@alexaegis/vite": "workspace:^", "@alexaegis/vitest": "workspace:^", "@types/node": "^26.1.1", "publint": "^0.3.21", "typescript": "^6.0.3", "vite": "^8.1.4", "vite-plugin-dts": "^5.0.3", "vitest": "^4.1.10" } }).add(_alexaegis_cli_tools.yargsForCollectWorkspacePackagesOptions).add((y) => y.option("skipNodeModules", { boolean: true, description: "Don't remove `node_modules` directories but try to clean them up", default: false }).option("nukeList", { array: true, type: "string", description: "A list of folders and files to delete.", default: require_functions.DEFAULT_NUKE_LIST }).option("nukeMore", { array: true, type: "string", description: "These will be nuked too. Same role as `nukeList` but defining this won't get rid of the built in nukelist" }).option("nukeGlobs", { array: true, type: "string", description: "A list of globs to also delete, not as efficient as a flat path but sometimes necessary", default: require_functions.DEFAULT_NUKE_GLOBS }).option("nukeMoreGlobs", { array: true, type: "string", description: "Additional globs to nuke if you don't want to overwrite the default ones" }).option("dontNukeIn", { array: true, type: "string", description: "If it shouldn't nuke a specific package, add them here." })).add(_alexaegis_cli_tools.yargsForLogLevelOption); (async () => { const options = await yarguments.build().parseAsync(); const logger = (0, _alexaegis_logging.createLogger)({ name: "nuke ☢", minLevel: options.logLevel }); await require_functions.nuke({ ...options, logger }); })(); //#endregion //# sourceMappingURL=nuke.cjs.map