feat(index): add compile functionality and test