UNPKG

preamble

Version:

Automated License & Metadata applicators for Codebases.

66 lines (59 loc) 1.95 kB
#!/usr/bin/env node /******************************************************** * preamble * * Lawfull Good * * @license * * Apache-2.0 * * Copyright 2024 Alex Stevovich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * package_name: @lawfulgood/js * file_name: test-src\cli.mjs * purpose: {{PURPOSE}} * * --- SYSTEM FIELDS --- * generated_on: 2025-03-06T09:31:49.941Z * uuid: 31141f07-5f64-4f3a-90d1-1a23ae1121b1 * certified_version: 1.0.0 * file_size: 2020 bytes * hash: 5da31d985fe9274320493b4b4218fd220ad5360374a0b4a56cae23ec7ce075da * mast: 9abcdefca77ea65b970ffa395cab01d46ae4c08f3378c41e134df286dae31036 * * ~generated by @lawfulgood/js on npm! * ********************************************************/ import fs from 'fs/promises'; import path from 'path'; import pkgplz from 'pkgplz'; import wz from 'warpzone'; import { pathToFileURL } from 'url'; const pkg = await pkgplz(); const configPath = path.join(process.cwd(), 'lawfulgood.config.mjs'); const configModule = await import(pathToFileURL(configPath)); console.log('?'); const config = await configModule.getConfig(); console.log(config.getRoot()); let files = await wz.sweep(config.getRoot(), config.getGlob()); await wz.sequential(files, (file) => { console.log(file); }); //const config = await configModule(); //const cmdRoot = config.getRoot() //const cmdExt = config.getExt() //const cmdTemplate = config.getTemplate()