Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,6 @@
'use strict';
var callsites = require('callsites');
module.exports = function () {
return callsites()[2].getFileName();
};

View File

@@ -0,0 +1,76 @@
{
"_args": [
[
"caller-path@0.1.0",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "caller-path@0.1.0",
"_id": "caller-path@0.1.0",
"_inBundle": false,
"_integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=",
"_location": "/react-scripts/caller-path",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "caller-path@0.1.0",
"name": "caller-path",
"escapedName": "caller-path",
"rawSpec": "0.1.0",
"saveSpec": null,
"fetchSpec": "0.1.0"
},
"_requiredBy": [
"/react-scripts/require-uncached"
],
"_resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
"_spec": "0.1.0",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/caller-path/issues"
},
"dependencies": {
"callsites": "^0.2.0"
},
"description": "Get the path of the caller module",
"devDependencies": {
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/caller-path#readme",
"keywords": [
"caller",
"calling",
"module",
"path",
"parent",
"callsites",
"callsite",
"stacktrace",
"stack",
"trace",
"function",
"file"
],
"license": "MIT",
"name": "caller-path",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/caller-path.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.1.0"
}

View File

@@ -0,0 +1,36 @@
# caller-path [![Build Status](https://travis-ci.org/sindresorhus/caller-path.svg?branch=master)](https://travis-ci.org/sindresorhus/caller-path)
> Get the path of the caller module
You can't use [`module.parent`](http://nodejs.org/api/modules.html#modules_module_parent) as modules are cached and it will return the first caller module, not necessarily the current one.
## Install
```
$ npm install --save caller-path
```
## Usage
```js
// foo.js
var callerPath = require('caller-path');
module.exports = function () {
console.log(callerPath());
//=> /Users/sindresorhus/dev/unicorn/bar.js
}
```
```js
// bar.js
var foo = require('./foo');
foo();
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)