Skip to content

Conversation

@bradley-erickson
Copy link

This commit adds automatic detection of css files in the distribution folder {{cookiecutter.project_shortname}}. The codes adds all *.css files to the MANIFEST.in file. Additionally, the code walks over the distribution folder to find each *.css file and append it to the _css_dist list in {{cookiecutter.project_shortname}}/__init__.py

Copy link

@emptynonsens emptynonsens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working automatic css detection. One remark to README, so the information exists.

- The Dash team uses these types of integration tests extensively. Browse the Dash component code on GitHub for more examples of testing (e.g. https://github.com/plotly/dash-core-components)
- Add custom styles to your component by putting your custom CSS files into your distribution folder (`{{cookiecutter.project_shortname}}`).
- Make sure that they are referenced in `MANIFEST.in` so that they get properly included when you're ready to publish your component.
- Make sure the stylesheets are added to the `_css_dist` dict in `{{cookiecutter.project_shortname}}/__init__.py` so dash will serve them automatically when the component suite is requested.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This info might come in handy:

  • styles from the distribution folder are automatically referenced in 'MANIFEST.in' and the _css_dist dictionary in {{cookiecutter.project_shortname}}/init.py. If a custom reference is needed, make an analogous reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants