zoukankan      html  css  js  c++  java
  • [NPM] Publish npm packages using npm publish

    In this lesson we will publish our package. We will first add a prepublish script that runs our buildscript; this will ensure the built folder gets added to npm when published. We will also add a .npmignore so that only our built files get installed. We need to run npm adduser to log in to an npm account. We can then run npm publish to publish our package and view it on npm.

    Note: if you want to actually publish the package from this course, you'll need to rename it since sensitive-words is already taken. You can use a scoped package name for this as well.

     

    Inside our .npmigore:

    src // ignore, therefore users install our package will not include src folder

    script:

    "prepublish": "npm run build",

    Add prepublish script, so that everytime we publish the lib, will make sure use the latest code.

  • 相关阅读:
    002-mybatis主配置文件
    001-mybatis框架
    mybatis学习
    tcp连接与释放
    浏览器输入url的全过程
    设备
    读写分离(三)
    读写分离(二)
    读写分离(一)
    主从复制(三)
  • 原文地址:https://www.cnblogs.com/Answer1215/p/7609291.html
Copyright © 2011-2022 走看看