add spm support
Merge pull request #1647 from spmjs/develop

Add spm support