jonschlinkert / cwd

Get the current working directory relative to the calling module.
https://github.com/jonschlinkert
MIT License
12 stars 2 forks source link
cwd dir directory file fs javascript jonschlinkert node nodejs path resolve

cwd NPM version NPM downloads Build Status

Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (node.js/javascript util)

Install

Install with npm:

$ npm install cwd --save

Usage

var cwd = require('cwd');
cwd();
cwd('one/two.js');
cwd('one', 'two.js');
cwd(['one', 'two.js']);

Related projects

You might also be interested in these projects:

Contributing

This document was generated by verb, please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install -g verb verb-readme-generator && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb, v0.9.0, on June 05, 2016.