That could work, also this looks interesting: https://www.npmjs.org/package/ignore