Skip to content

Commit

Permalink
fix(source-filesystem): __filename usage
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed May 20, 2021
1 parent 4a86a1c commit 2f5a6a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"homepage": "https://github.com/sure-thing/presta#readme",
"dependencies": {
"ansi-colors": "^4.1.1",
"callsites": "^3.1.0",
"chokidar": "^3.4.3",
"debug": "^4.1.1",
"deepmerge": "^4.2.2",
Expand Down
4 changes: 1 addition & 3 deletions source-filesystem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const fs = require('fs-extra')
const path = require('path')
const matched = require('matched')
const callsites = require('callsites')
const chokidar = require('chokidar')
const match = require('picomatch')

Expand Down Expand Up @@ -36,7 +35,7 @@ function createDefaultExtensions ({ baseDir }) {
}
}

function source (globs, { baseDir = cwd, extensions } = {}) {
function source (globs, { baseDir = cwd, file: root, extensions } = {}) {
/*
* Current process variables
*/
Expand All @@ -47,7 +46,6 @@ function source (globs, { baseDir = cwd, extensions } = {}) {

const config = getCurrentConfig() // current process config
const { env, emitter } = config
const root = callsites()[1].getFileName() // file that just called source()

/*
* Normalize values
Expand Down

0 comments on commit 2f5a6a4

Please sign in to comment.