简体   繁体   English

使用本地文件系统复制 libman unpkg

[英]Replicating libman unpkg with a local filesystem

I noticed I can use libman to download many libraries into my Asp.Net Core app in a nice way.我注意到我可以使用 libman 以一种很好的方式将许多库下载到我的 Asp.Net Core 应用程序中。 Eg I can easily get the latest @microsoft signalr:例如,我可以轻松获得最新的@microsoft signalr:

libman-unpkg

However, in my application I can't rely on external package sources and would like to store the packages I need within my network.但是,在我的应用程序中,我不能依赖外部 package 源,而是希望将我需要的包存储在我的网络中。 I noticed that libman supports "filesystem" mode, so I copied all the files downloaded from unpkg onto my local network drive, let's call it "L:"我注意到libman支持“文件系统”模式,所以我将所有从unpkg下载的文件复制到我的本地网络驱动器上,我们称之为“L:”

/ L:
  | local_unpkg
     | @microsoft
       | signalr
         | 5.0.2
           | package.json
           | README.md
           | src
             | ... // a lot of files
           | dist
             | browser
             | cjs
             | esm
             | ... // other subfolders

When I try using "filesystem" provider, I get only the files in directly in the folder I specify, without nested folders:当我尝试使用“文件系统”提供程序时,我只直接在我指定的文件夹中获取文件,没有嵌套文件夹:

unpkg_local

Is there a way to import entire packages that way, without manually specifying all the subfolders in the libman.json file?有没有办法以这种方式导入整个包,而无需手动指定 libman.json 文件中的所有子文件夹?

If not, what's the recommended approach for using the tool in an environment, when I don't want to rely on external package sources?如果不是,当我不想依赖外部 package 源时,在环境中使用该工具的推荐方法是什么?

The filesystem provider specifically does not support recursive directory contents.文件系统提供程序特别不支持递归目录内容。 With the other providers, the contents of the package are available all at once via the catalog metadata.对于其他提供程序,package 的内容可通过目录元数据一次性获得。 But with file paths, and especially network file paths, iterating the file system can lead to extremely poor performance in large (or deep) directory structures.但是对于文件路径,尤其是网络文件路径,迭代文件系统会导致大型(或深度)目录结构的性能极差。 In many cases, you'd be typing out the path and the wizard would try to evaluate the contents as you type (eg once you typed L:\ it would recognize that directory and enumerate all its contents recursively, over the network).在许多情况下,您会输入路径,向导会在您输入时尝试评估内容(例如,一旦您输入L:\ ,它就会识别该目录并通过网络递归枚举其所有内容)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有网络的LibMan阻止构建。 有本地后备选项吗? - LibMan without internet prevents build. Is there a local fallback option? 混淆VS2022中的Nuget和Libman - Confuse about Nuget and Libman in VS2022 Libman - 如何安装已安装库的依赖项 - Libman - How to install dependencies of installed library 如何使用libman而不是npm来下载typescript定义 - How to use libman instead of npm to download typescript definitions 利伯曼。 构建应用程序期间出现错误 LIB002 - Libman. Error LIB002 during build application 如何将我的Azure DevOps NPM Artifact提要用作libman.json中的提供者? - How do I use my Azure DevOps NPM Artifact feed as a provider in my libman.json? 如何在libman(库管理器)asp.net Core 2.1中使用Microsoft.jQuery.Unobtrusive.Ajax? - How do I use Microsoft.jQuery.Unobtrusive.Ajax with libman (Library manager) asp.net Core 2.1? Razor 页面路由和文件系统路由 - Razor page routing and FileSystem routing 使用 Azure Devops 将控制台应用程序部署到 Azure VM 上的文件系统 - Deploying a console app to the filesystem on an Azure VM using Azure Devops Azure 应用服务无法从 wwwroot 文件系统加载 pfx 证书 - An Azure App Service cannot load a pfx certificate from the wwwroot filesystem
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM