【问题标题】:how to execute an npm package cmd on a subdirectory via powershell?如何通过powershell在子目录上执行npm包cmd?
【发布时间】:2017-09-21 19:38:21
【问题描述】:

如何通过 PowerShell 在子目录中执行 npm 包 cmd?我有一个集成到父 .NET MVC 应用程序中的 ng2 应用程序。所以 ng2 目录是父根目录的子目录,如下所示:MySite/ng2

我需要更新存在于父应用根目录中的现有 PowerShell 脚本 (build.ps1),以在 MySite/ng2 子目录的上下文中调用 Angular CLI 的“ng build --prod”cmd。我应该使用什么方法来做到这一点?

【问题讨论】:

  • ng.exe 是否有某种路径参数?

标签: angular powershell npm angular-cli


【解决方案1】:

这种方法可行:

cd mySubdir
#exec special cmd against mySubdir
cd ..

【讨论】:

    猜你喜欢
    • 2014-10-11
    • 2019-07-20
    • 2017-09-09
    • 2019-05-02
    • 2011-05-08
    • 1970-01-01
    • 1970-01-01
    • 2018-05-03
    相关资源
    最近更新 更多