widget-ts-cookiecutter
widget-ts-cookiecutter copied to clipboard
Building yarn package on install
I was curious if people know why the setup.py builds the package on install: https://github.com/jupyter-widgets/widget-ts-cookiecutter/blob/f8c4f1d2c61374811423eb724b9eb11c6e2f10b1/%7B%7Bcookiecutter.github_project_name%7D%7D/setup.py#L60
It looks like nbextension and labextension are both pre-built and bundled, so it isn't necessary to run npm and build:prod on install. This has also been breaking for people who do not have yarn or npm installed.
On a related note, it looks like jupyter_packaging does not support the sdist packaging in the docs:
https://github.com/jupyter/jupyter-packaging/blob/master/README.md#usage-notes
A short term fix is to us skip_if_exists to skip the npm build if one of the built files exists. A better solution is to adopt the jupyter_packaging backend in this cookiecutter.
Fix at #107