node-root
Node Root helps you get away from dot hell like `require('../../../lib/')`
Last updated 5 years ago by kchan .
MIT · Original npm · Tarball · package.json
$ cnpm install node-root 
SYNC missed versions from official npm registry.

Node Root

Node Root helps you get away from dot hell like require('../../../lib/')

Usage

Simply install via npm install node-root -S

If you have a project tree like this:

/your/project/home
├─library
│   └─components
│       └─header.jsx
└─node_modules
    └─node-root

you can easily locate that header.jsx

import root from 'node-root'

import header from root('library/components/header.jsx')

The directory where you install node-root will be recognized as project's root, eg: node_modules/other is the root for node_modules/other/node_modules/node-root.

License

MIT.

Current Tags

  • 0.0.22                                ...           latest (5 years ago)

6 Versions

  • 0.0.22                                ...           5 years ago
  • 0.0.21                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.11                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |