Inject dependencies and run js files in a directory