[英]how to get the url for a package in npmjs.com instead of installing with npm
I am creating a reactjs based html page. 我正在创建一个基于reactjs的html页面。
I want to use normalizr for my data. 我想对我的数据使用normalizr。
I can get the reactjs directly in the html by the following: 我可以通过以下方式直接在html中获取reactjs:
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.js"></script>
But how to get normalizr. 但是如何获得normalizr。 I didnt find any such link.
我没有找到任何这样的链接。 Because it says to install using npm.
因为它说要使用npm安装。
I want to directly use in the html like reactjs as above so is it possible 我想像上面的reactjs这样直接在html中使用,所以有可能
You can use unpkg to any file from any npm library as a link. 您可以将unpkg用作任何npm库中的任何文件的链接。
For normalizr
, the URL would be 对于
normalizr
,URL为
https://unpkg.com/normalizr@3.3.0/dist/normalizr.min.js https://unpkg.com/normalizr@3.3.0/dist/normalizr.min.js
If you need any other file from normalizer
repo, you can file the link for the file here 如果您需要
normalizer
库中的任何其他文件,则可以在此处归档文件的链接
https://unpkg.com/normalizr@3.3.0/dist/ https://unpkg.com/normalizr@3.3.0/dist/
unpkg is super-fast and better than most cdns out there. Unpkg超级快,比那里的大多数CDN都要好。
Apart from normalizer, you can also use: 除了规范化器,您还可以使用:
npm-cdn
https://npm-cdn.herokuapp.com/normalizr@3.3.0/dist/normalizr.min.js https://npm-cdn.herokuapp.com/normalizr@3.3.0/dist/normalizr.min.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.