Skip to content

Commit

Permalink
Use the cli's new flags. Fixes #86
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjoelkemp committed Dec 21, 2014
1 parent 0d9379f commit cd5ac50
Show file tree
Hide file tree
Showing 12 changed files with 1,485 additions and 111 deletions.
24 changes: 16 additions & 8 deletions node_dependents.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,40 @@

def get_dependents(options):
try:
args = [options['filename'], options['root']]
args = ['--directory=' + options['root']]
except:
t('Misc_Error', {
"type": "filename or root not supplied"
"type": "root not supplied"
})

try:
if options['config']:
args.append(options['config'])
args.append('--config=' + options['config'])
except:
p('Dependents: Config not supplied')

try:
if options['exclude']:
args.append(options['exclude'])
args.append('--exclude=' + options['exclude'])
except:
p('Dependents: exclude list not supplied')

args.append(options['filename'])

return exec_script('dependents.js', args).split('\n')


def alias_lookup(options):
try:
args = [options['config'], options['module']]
except:
args['', options['module']]
args = []

# if 'config' not in options:
# show_error('An error occurred. Please file an issue with the following:\n\n' + str(e), True)

if 'config' in options:
args.append('--config=' + options['config'])

if 'module' in options:
args.append(options['module'])

return exec_script('dependencyLookup.js', args).strip()

Expand Down
24 changes: 14 additions & 10 deletions node_modules/dependents/README.md

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

13 changes: 11 additions & 2 deletions node_modules/dependents/bin/dependencyLookup.js

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

47 changes: 33 additions & 14 deletions node_modules/dependents/bin/dependents.js

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

63 changes: 28 additions & 35 deletions node_modules/dependents/index.js

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

4 changes: 2 additions & 2 deletions node_modules/dependents/lib/util.js

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

Loading

0 comments on commit cd5ac50

Please sign in to comment.