UNPKG

gitmoji-cli

Version:

A gitmoji client for using emojis on commit messages.

53 lines 1.49 kB
import { CONFIG } from "../../constants/configuration.js"; import getConfiguration from "./getConfiguration.js"; const configuration = getConfiguration(); const setAutoAdd = autoAdd => { configuration.set(CONFIG.AUTO_ADD, autoAdd); }; const setEmojiFormat = emojiFormat => { configuration.set(CONFIG.EMOJI_FORMAT, emojiFormat); }; const setScopePrompt = scopePrompt => { configuration.set(CONFIG.SCOPE_PROMPT, scopePrompt); }; const setMessagePrompt = messagePrompt => { configuration.set(CONFIG.MESSAGE_PROMPT, messagePrompt); }; const setCapitalizeTitle = capitalizeTitle => { configuration.set(CONFIG.CAPITALIZE_TITLE, capitalizeTitle); }; const setGitmojisUrl = gitmojisUrl => { configuration.set(CONFIG.GITMOJIS_URL, gitmojisUrl); }; const getAutoAdd = () => { return configuration.get(CONFIG.AUTO_ADD); }; const getEmojiFormat = () => { return configuration.get(CONFIG.EMOJI_FORMAT); }; const getScopePrompt = () => { return configuration.get(CONFIG.SCOPE_PROMPT); }; const getMessagePrompt = () => { return configuration.get(CONFIG.MESSAGE_PROMPT); }; const getCapitalizeTitle = () => { return configuration.get(CONFIG.CAPITALIZE_TITLE); }; const getGitmojisUrl = () => { return configuration.get(CONFIG.GITMOJIS_URL); }; export default { getAutoAdd, getEmojiFormat, getScopePrompt, getMessagePrompt, getCapitalizeTitle, getGitmojisUrl, setAutoAdd, setEmojiFormat, setScopePrompt, setMessagePrompt, setCapitalizeTitle, setGitmojisUrl };