only enable actions when in a javascript file. closes #35
account for define statements with a module id. relates to #19
reuse code that resolves define arguments. closes #19