这是我的 cli 我想要人们对此发表意见所以如果可以的话请发表意见

编程入门 行业动态 更新时间:2024-10-04 23:32:47

<a href=https://www.elefans.com/category/jswz/34/1769433.html style=这是我的 cli 我想要人们对此发表意见所以如果可以的话请发表意见"/>

这是我的 cli 我想要人们对此发表意见所以如果可以的话请发表意见

我想知道你对我的客户有什么看法

#!/usr/bin/env node
import inquirer from 'inquirer';
import * as child from 'node:child_process'

inquirer
  .prompt([
    {
    type:'list',
    message:'what is your project',
    name:'framework',
    choices: ['angular','react','vue','svelte','preact']
    }
  ])
  .then((answers) => {
    if (answers.framework === 'angular'  ){
    child.exec(`git clone .git`)
    console.log("now install the angular cli with")
    console.log("npm i @angular/cli")
    }
    if (answers.framework === 'react'  ){
    child.exec(`git clone .git`)
    console.log("now install react with")
    console.log("npm i react")
    }
    if (answers.framework === 'vue'  ){
    child.exec(`git clone .git`)
    console.log("now install vue with")
    console.log("npm i vue")
    }
    if (answers.framework === 'svelte'  ){
    child.exec(`npm create svelte@latest myapp`)
    console.log("here is the app")
    }
    if (answers.framework === 'preact'  ){
    child.exec(`git clone .git`)
    console.log("now install preact with")
    console.log("npm i preact")
    }  
})

你怎么看?我知道这很愚蠢,所以我将其命名为 stupid projects cli。祝你有美好的一天,随心所欲

回答如下:

更多推荐

这是我的 cli 我想要人们对此发表意见所以如果可以的话请发表意见

本文发布于:2024-05-30 18:44:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1770804.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发表意见   这是   对此   我想要   cli

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!