【问题标题】:Where do the html, css and other files go after converting angular project to npm module and how is a project converted to npm module?将angular项目转为npm模块后的html、css等文件去哪了,项目如何转为npm模块?
【发布时间】:2019-06-03 11:42:41
【问题描述】:

我想通过更改项目的基本 html 和 css 来自定义 ngx-material-timepicker 节点模块。但是node_modules->ngx-material-timepicker文件夹里没有html、css文件,只有ts文件。

所以我将它分叉到我的 github 存储库,然后在对其进行自定义后,我尝试使用 npm install mygitrepo.git --save 将它安装到我的 Angular 项目中,但之后我无法将该模块包含到我的 Angular 项目中。

【问题讨论】:

    标签: angularjs angular typescript github


    【解决方案1】:

    在默认的 npm 安装中,注册表设置为 https://registry.npmjs.org/。当你运行 npm install 时,npm 将从这里下载包。

    您可以使用命令 npm set registry 将 repo 位置的值修改为自定义 repo。重置注册表后,npm 只会从中获取包。

    但您可能不想完全更改注册表。您还可以使用组织特定范围来放置要获取的包。 https://docs.npmjs.com/about-scopes

    这是一个关于发布模块的简短博客。 https://hackernoon.com/publish-your-own-npm-package-946b19df577e

    【讨论】:

      猜你喜欢
      • 2017-03-13
      • 2011-11-30
      • 1970-01-01
      • 2017-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-10
      • 2018-11-05
      相关资源
      最近更新 更多