Update index.js

Added support for type `requirejs`
This will add optional 4th option to generated script tag as an attribute.