@git.zone/cli
Version:
A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.
27 lines (23 loc) • 757 B
text/typescript
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { logger } from '../gitzone.logging.js';
import { Project } from '../classes.project.js';
const filesToDelete = [
'defaults.yml',
'yarn.lock',
'package-lock.json',
'tslint.json',
];
export const run = async (projectArg: Project) => {
for (const relativeFilePath of filesToDelete) {
const fileExists = await plugins.smartfs.file(relativeFilePath).exists();
if (fileExists) {
logger.log('info', `Found ${relativeFilePath}! Removing it!`);
await plugins.smartfs
.file(plugins.path.join(paths.cwd, relativeFilePath))
.delete();
} else {
logger.log('info', `Project is free of ${relativeFilePath}`);
}
}
};