【问题标题】:vue init webpack alphalayui strange thingvue init webpack alphalayui 奇怪的东西
【发布时间】:2017-07-25 03:55:29
【问题描述】:

我的环境:
OS:win10
Vue:2.82
Yarn:0.27.5
Nodejs:8.2.1
Other:Git-bash
当我第一次使用vue init webpack alphalayui构建一个vue项目时,我发现了一个奇怪的事情。

它可以获取我的Email-ID,我很惊讶,这个Email-ID只是在一个名为Foxmail的软件中使用。但是我这台电脑上有很多Email-ID。

我想知道vue init如何获取我的Email-ID?

有人可以帮助我吗?提前致谢。
$ vue init webpack alphalayui ? Project name (alphalayui) y ? Project name y ? Project description (A Vue.js project) y ? Project description y ? Author (alphayan <yanyq@sdkej.com>) y ? Author y ? Vue build standalone ? Install vue-router? (Y/n) y ? Install vue-router? Yes ? Use ESLint to lint your code? (Y/n) y ? Use ESLint to lint your code? Yes ? Pick an ESLint preset (Use arrow keys) ? Pick an ESLint preset Standard ? Setup unit tests with Karma + Mocha? (Y/n) y ? Setup unit tests with Karma + Mocha? Yes ? Setup e2e tests with Nightwatch? (Y/n) y ? Setup e2e tests with Nightwatch? Yes

【问题讨论】:

  • 可能来自你的全局 git 配置

标签: vue.js


【解决方案1】:

试试这个:

git config --get user.email

...看看是否匹配。

这就是 Vue.init 在 vue-cli/lib/git-user.js 中使用的内容

try {
name = exec('git config --get user.name')
email = exec('git config --get user.email')
} catch (e) {}

【讨论】:

    猜你喜欢
    • 2017-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-11
    • 1970-01-01
    • 1970-01-01
    • 2022-11-11
    • 2020-11-02
    相关资源
    最近更新 更多