Skip to content

Refactoring todo list #34

@nickhsine

Description

@nickhsine

Optimization

  1. reuse common bundles, such as react, react-dom, draft-js, lodash, immutable, .etc, large bundles.
  2. lazy load optional webpack bundles, such as draft-js(more than 150kb)
  3. do not load unnecessary bundles(因為我們目前 bundles 產生是透過 packages/embed-code-generator,它的 main bundle 會有 feeback, qa-listquestionnaire 的程式碼,但使用者可能只需要 feedback 的 embed code )
  4. 把 bundles/chunks 上傳到我們的 CDN,而非透過 unpkg 來提供檔案;原因在於 unpkg 的網址包含 pkg version,不利於 CDN cache,只要我們一升版,網址改變,所有的 cache 都需要重來一遍。

Code Refactoring

  • make all codes pass eslint and prettier
  • add prettier, eslint commit hook
  • extract packages/questionnaire/src/react-components/draft to be an pkg (readr-media/draft-editor) under packages/draft-editor

Infrustructure

  • add CI to build and publish sub pkgs to npm registry, such as @readr-media/react-feedback if there are new commits in the repo.
  • automatically upgrade @readr-media/react-embed-code-generator pkg if there is any sub pkg (@readr-media/react-feedback, @readr-media/react-qa-list, @readr-media/react-questionnaire) upgraded.
  • automatically upgrade @readr-media/questionnaire and @readr-media/react-qa-list pkg if@readr-media/draft-editor is upgraded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions