Update index.js

Added support for type `requirejs`
This will add optional 4th option to generated script tag as an attribute.
For JS block type:
Any attributes which come after the file name will be added to resulting script tag
For JS block type:
Any attributes which come after the file name will be added to resulting script tag

Added  ?: to regex
Merge pull request #13 from xmlking/master

Added support for type `requirejs`