First things first
Once upon a time, there was a programmer that needed to load a YAML configuration file in a NodeJS project. This programmer was very annoyed by the fact that he needed to load that file using a relative path from each file that needed it. In this time of boredom despair, a hero appears to rescue the princess programmer: nnLoader!
Jokes aside, nnLoader is a library that helps you to load static files using a path relative to the package root.
Installation
The library can be easily installed with a package manager like yarn (yarn add nnloader
) or npm (npm i nnloader
).
How do I use it?
The library is very easy to use, all you need is to follow three simple fast steps!
-
Install the package.
-
Import the package. You can use commonJS syntax (
const nnLoader = require('nnloader');
) or ES6 syntax (import nnLoader from 'nnloader';
). -
Use one of its functions.
Keep reading to know more.