mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
31
backend/apis/nodejs/node_modules/knex/scripts/clean.js
generated
vendored
Normal file
31
backend/apis/nodejs/node_modules/knex/scripts/clean.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
function main() {
|
||||
const repoDir = path.dirname(__dirname);
|
||||
const gitDir = path.join(repoDir, '.git');
|
||||
const gitDirExists = doesDirectoryExist(gitDir);
|
||||
if (!gitDirExists) {
|
||||
console.log("No .git directory detected so can not clean 'lib/'. Exiting.");
|
||||
process.exit(0);
|
||||
}
|
||||
console.log(
|
||||
"Cleaning 'lib/' of outputted files from Typescript compilation ..."
|
||||
);
|
||||
const cmd = 'git clean -f -X lib/';
|
||||
const output = execSync(cmd, { cwd: repoDir });
|
||||
console.log(output.toString('utf8'));
|
||||
console.log('Done');
|
||||
}
|
||||
|
||||
function doesDirectoryExist(p) {
|
||||
if (fs.existsSync(p)) {
|
||||
return fs.lstatSync(p).isDirectory();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
main();
|
Reference in New Issue
Block a user