UNPKG

git-command-helper

Version:
23 lines (19 loc) 523 B
// git-command-helper 2.1.0 by Dimas Lanjaka <dimaslanjaka@gmail.com> (https://www.webmanajemen.com) 'use strict'; var gitConfig = require('./gitConfig.js'); /** * force end of line LF * @param cwd */ async function forceEolLF(cwd) { const config = new gitConfig.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"]); } exports.forceEolLF = forceEolLF;