Skip to content

Commit

Permalink
Restructure main collecting single methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
alinex committed May 12, 2014
1 parent 03ec97d commit 30de4da
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,34 +43,10 @@ afs.lstatSync = memoizee fs.lstatSync,

# Add extended functionality
# -------------------------------------------------

# ### Making directories with parents
mkdirs = require './mkdirs'
afs.mkdirs = mkdirs.async
afs.mkdirsSync = mkdirs.sync

# ### Find files
find = require './find'
afs.find = find.async
afs.findSync = find.sync

# ### Copy file or directory
copy = require './copy'
afs.copy = copy.async
afs.copySync = copy.sync

# ### Remove of entry with subentries
remove = require './remove'
afs.remove = remove.async
afs.removeSync = remove.sync

# ### Move file or directory
move = require './move'
afs.move = move.async
afs.moveSync = move.sync

# ### Find bin in npm packages
npmbin = require './npmbin'
afs.npmbin = npmbin.async
afs.npmbinSync = npmbin.sync

for name in [
'mkdirs', 'find', 'copy', 'remove', 'move'
'npmbin'
]
commands = require './' + name
afs[name] = commands.async
afs[name+'Sync'] = commands.sync

0 comments on commit 30de4da

Please sign in to comment.