UNPKG

@ali-i18n-fe/dada-component

Version:
20 lines (16 loc) 427 B
const git = require("fie-git"); const Def = { async load() { const gitInfo = git.project() || ""; if (!gitInfo) { console.log( "Din't found git repository, you can use 'comp def' command to init DEF again if the git repository is ready." .yellow ); return; } const [group, project] = gitInfo.split("/"); this.repo = { group, project }; }, }; module.exports = Def;