Skip to content

🌏 A library which normalizes relative paths to project scope with ease

License

Notifications You must be signed in to change notification settings

GavinDmello/pfade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pfade

This is a basic route normalizing library. It helps in avoiding relative paths.

Installation

    npm install pfade

Usage

Instead of using the relative paths

    require('../../something.js')

you can use

    var Pfade = require('pfade')
    var pfade = new Pfade(__dirname) // specify the absolute path to your project
    var index = pfade.require('index.js')
    var handle = pfade.require('modules/handle.js')
    console.log(handle)

This reduces the ugly relative path requires. After the first instantiation, you won't have to provide the absolute address of the project.

You can just instantiate

    var Pfade = require('pfade')
    var pfade = new Pfade()

License

MIT

About

🌏 A library which normalizes relative paths to project scope with ease

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages