message: docs(docs): add development instructions
diff: @@ -41,3 +41,59 @@ Saladict 6 is a complete rewrite in React Typescript for both Chrome & Firefox.
  <p align="center">
  <a href="https://github.com/crimx/crx-saladict/releases/" target="_blank"><img src="https://github.com/crimx/ext-saladict/wiki/images/pin.gif" /></a>
  </p>
  +
  +# Development
  +
  +Clone the repo and run `yarn install`.
  +
  +## UI Tweaking
  +
  +`yarn start --main=[entry id]` to view a certain entry with WDS in a fake WebExtension environment.
  +
  +## Testing
  +
  +`yarn test` to run Jest.
  +
  +Toggle:
  +
  +- `--coverage`: Show coverage instead of watching.
  +
  +## Building
  +
  +`yarn devbuild` to start a quick build without compression.
  +
  +`yarn build` to start a full build.
  +
  +Toggle:
  +
  +- `--notypecheck`: Skip TypeScript full check.
  +- `--analyze`: Show detailed Webpack bundle analyzer.
  +
  +## Releasing
  +
  +`yarn release` to bump version and generate [CHANGELOG](./CHANGELOG.md).
  +
  +## How to add a dictionary
  +
  +1. Register the dictionary in [app config](./src/app-config/dicts.ts) so that TypeScript generates the correct typings. Dict ID should follow alphabetical order.
  +1. Create a directory at [`src/components/dictionaries/`](./src/components/dictionaries/), with the name of the dict ID.
  + 1. Use [Bing](./src/components/dictionaries/bing) as guidance. Copy the files to the new directory.
  + 1. Replace the favicon with a new 32x32 png.
  + 1. Update `_locales.json` with the new dictionary name. Add locales for options, if any.
  + 1. `engine.ts` exports a `search` function which is responsible for fetching, parsing and returning dictionary results. See the typings for more detail.
  + - If the dictionary supports pronunciation:
  + 1. Register the ID at [`config.autopron`](https://github.com/crimx/ext-saladict/blob/a88cfed84129418b65914351ca14b86d7b1b758b/src/app-config/index.ts#L202-L223).
  + 1. Include an [`audio`](https://github.com/crimx/ext-saladict/blob/a88cfed84129418b65914351ca14b86d7b1b758b/src/typings/server.ts#L5-L9) field in the object which search engine returns.
  + 1. Search result will ultimately be passed to a React PureComponent in `View.tsx`, which renders the result accordingly.
  + 1. Scope the styles in `_style.scss` following [ECSS](http://ecss.io/chapter5.html#anatomy-of-the-ecss-naming-convention)-ish naming convention.
  +
  +Add Testing
  +
  +1. Add response samples at `test/specs/components/dictionaries/[dictID]/response`.
  +1. Add `engine.spec.ts` to test the engine.
  +
  +Develop the dictionary UI live
  +
  +1. Intercept ajax calls in [`config/fake-env/fake-ajax.js`](./config/fake-env/fake-ajax.js). Use the testing response samples.
  +1. Edit [`src/components/__fake__/index.tsx`](./src/components/__fake__/index.tsx).
  +1. Run `yarn start --main=components`.
  