Skip to content

Commit

Permalink
remove useless self reference add method
Browse files Browse the repository at this point in the history
  • Loading branch information
rubeniskov committed Nov 14, 2020
1 parent d71c4ba commit 77963ae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function DepperSync(opts) {
*/
DepperSync.prototype.add = function(filename) {
var basedir = path.dirname(filename = path.resolve(filename))
var self = this
var exports = []
var imports = []

Expand All @@ -49,18 +48,18 @@ DepperSync.prototype.add = function(filename) {

this._deps.push(dep)
var src = this.readFile(filename)
var trs = self.getTransformsForFile(filename)
self.emit('file', filename)
src = self.applyTransforms(filename, src, trs)
var trs = this.getTransformsForFile(filename)
this.emit('file', filename)
src = this.applyTransforms(filename, src, trs)
dep.source = src
extractPreprocessors(dep.source, imports, exports)

self._resolveImports(imports, {
this._resolveImports(imports, {
basedir: basedir,
deps: dep.deps
})

return self._deps
return this._deps
}

/**
Expand Down

0 comments on commit 77963ae

Please sign in to comment.