1.0.3 • Published 3 years ago
lesson1-task-creating-npm v1.0.3
Creating an NPM package and console log the name
To install run:
npm install task-creating-npm
To use in your project, create js folder with script.js file and link your index.html file to it.
Then in your JavaScript file import and call the function like this:
import consoleName from "../src/index.js";
consoleName("Your name");
*Note: You will need to use a bundler like Parcel or Webpack to import the package like this.