Updated build script to detect all attributes in templates