Skip to content

[Feature Request] Make all js dependencies as assets #868

@byronz

Description

@byronz

Is your feature request related to a problem? Please describe.
the dash-renderer repo includes both source code and binary assets/bundles for historical reasons. This is in general not good practices:

  1. the repo is bigger than it's needed
  2. the bundles and assets breaks the clean environment rule and make some development confusion/issues from time to time
  3. it also makes the CI job slower and polluted

Describe the solution you'd like
a similar solution as proposed in plotly/dash-core-components#597

the repo should only contain source code, from the clean env, we do the build from a python script:

  • run npm i --ignore-scripts
  • parses the package-lock.json, copy the required bundles into dash_core_components, compute the content hash and dump all the fingerprint in a json file. this file can be included in the release as an alternative way than version to check the assets correctness.
  • update __init__.py, so we have the single version of truth from npm
  • run npm run build
    at this point, we should be able to dev and test from pip install -e .

apply the same procedure in circleci, and see how it applies for the release automation

Additional context
the script should work in both python2 and 3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions