简体   繁体   English

nodejs npm软件包教程

[英]nodejs npm package tutorials

Looking for some tutorials where we have all the information about writing first npm package from scratch, looking forward things like 寻找一些教程,其中提供了有关从头开始编写第一个npm包的所有信息,并期待诸如

  1. Mandate folder structure if any 委托文件夹结构(如果有)
  2. Initiating package 启动包
  3. Add dependencies 添加依赖项
  4. bin folder (why do we need it?) bin文件夹(为什么需要它?)
  5. Any AMD dependency 任何AMD依赖

Moreover how do we convert a common JS api to npm enabled? 此外,我们如何将常见的JS api转换为启用npm?

Any pointer or help should be appreciated. 任何指针或帮助,应表示赞赏。

I was able to get things out myself, hence successfully registered the npm package @ https://npmjs.org/package/javascript-boilerplate 我本人可以解决问题,因此成功注册了npm软件包@ https://npmjs.org/package/javascript-boilerplate

Kindly find the answer in the same order as I have asked. 请按照我要求的顺序找到答案。

  1. There is no mandate for particular folder structure 没有特定文件夹结构的要求
  2. npm adduse and npm publish does the job to register the package npm adduse和npm publish完成注册软件包的工作
  3. Here I was getting the issue, which was essentially driven from jquery 1.8.3 npm package, just removed it and ship the jQuery with my bundle only 在这里,我遇到了这个问题,它实际上是由jquery 1.8.3 npm包驱动的,只是将其删除并仅将jQuery与我的捆绑包一起提供
  4. I didn't need the bin folder 我不需要bin文件夹
  5. I don't think so there is any, it may be needed for global npm install 我认为没有,全球npm安装可能需要

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM