Add `component.json`
Move `main.js` to `index.js`
Add npm test script target
Merge branch 'feature/add-component-support'

In fact, this update additionally moves `main` to `index`, and
adds an npm script for the test (`npm run test`).