Publishing a #javascript Library Online: The Definitive Guide
▻https://hackernoon.com/publishing-a-javascript-library-online-the-definitive-guide-142547baa70d
Background by UnsplashThis is a continuation of my previous guide. Refer it to learn how to publish code to npmThis article focuses on publishing code for use in a browser.There will be 2 sections to this guide :Publishing browser-native code ?Converting an npm module for use in a browser ?For both cases, we will eventually deploy the code to npm to leverage the power of the free CDN unpkg1. Publishing browser-native code ?This one is easier. As the code is already in browser-usable format, it just needs to be included in the HTML code via the <script> tags.This will make its variables and functions available to the browser automatically.To publish it to a CDN :Use npm init -y to initialize a package.json for the repository.Publish it to npm via the steps given here : Steps to (...)
#nodejs #post-javascript-library #publish-javascript #javascript-library