git-command-helper
Version:
github command helper for nodejs
21 lines (18 loc) • 490 B
JavaScript
// git-command-helper 2.1.0 by Dimas Lanjaka <dimaslanjaka@gmail.com> (https://www.webmanajemen.com)
import { gitConfig } from './gitConfig.mjs';
/**
* force end of line LF
* @param cwd
*/
async function forceEolLF(cwd) {
const config = new gitConfig({
cwd
});
// set the EOL
await config.eol("lf");
// compatibility for windows
await config.autocrlf(true);
// update index
await config.git.spawn("git", ["checkout-index", "-r", "--all"]);
}
export { forceEolLF };