-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets #868 #874
Assets #868 #874
Conversation
This reverts commit 43a45eb.
Co-Authored-By: alexcjohnson <johnson.alex.c@gmail.com>
Co-Authored-By: alexcjohnson <johnson.alex.c@gmail.com>
Co-Authored-By: alexcjohnson <johnson.alex.c@gmail.com>
Co-Authored-By: alexcjohnson <johnson.alex.c@gmail.com>
CONTRIBUTING.md
Outdated
|
||
For contributors with a primarily **Python** or **R** background, this section might help you understand more details about developing and debugging in Javascript world. | ||
|
||
After Dash 1.2, The renderer bundle and its peer dependencies can be packed and generated from the source code. The only version of the truth is defined in `dash-renderer\package.json` file. A build tool `renderer`, which is a tiny Python script defined as a Dash entry point, has few commands like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After Dash 1.2, The renderer bundle and its peer dependencies can be packed and generated from the source code. The only version of the truth is defined in `dash-renderer\package.json` file. A build tool `renderer`, which is a tiny Python script defined as a Dash entry point, has few commands like: | |
As of Dash 1.2, The renderer bundle and its peer dependencies can be packed and generated from the source code. Dependency files are no longer included in this repository, they are downloaded when needed based on the versions listed in `dash-renderer/package.json`. A build tool `renderer`, which is a tiny Python script installed by Dash as a command-line tool, has a few commands: |
CONTRIBUTING.md
Outdated
For contributors with a primarily **Python** or **R** background, this section might help you understand more details about developing and debugging in Javascript world. | ||
|
||
After Dash 1.2, The renderer bundle and its peer dependencies can be packed and generated from the source code. The only version of the truth is defined in `dash-renderer\package.json` file. A build tool `renderer`, which is a tiny Python script defined as a Dash entry point, has few commands like: | ||
1. `renderer npm` installs all the npm modules using this `package.json` files. Note that the `package-lock.json` file is the computed reference product for the versions defined with tilde(~) or caret(^) syntax in **npm** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. `renderer npm` installs all the npm modules using this `package.json` files. Note that the `package-lock.json` file is the computed reference product for the versions defined with tilde(~) or caret(^) syntax in **npm** | |
1. `renderer npm` installs all the npm modules using this `package.json` files. Note that the `package-lock.json` file is the computed reference product for the versions defined with tilde(~) or caret(^) syntax in **npm**. This is called by `npm run build`, or you can also call it directly if you add or update a dependency module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's slightly safer for people not family with js to call with renderer
as it will handle the location with os.chdir()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - I just wanted to give people some idea when to use each of these commands. So perhaps:
Call this if you add or update a dependency module.
npm run build
calls this andrenderer bundle
, but you can only call it from thedash-renderer
directory.
?
CONTRIBUTING.md
Outdated
|
||
After Dash 1.2, The renderer bundle and its peer dependencies can be packed and generated from the source code. The only version of the truth is defined in `dash-renderer\package.json` file. A build tool `renderer`, which is a tiny Python script defined as a Dash entry point, has few commands like: | ||
1. `renderer npm` installs all the npm modules using this `package.json` files. Note that the `package-lock.json` file is the computed reference product for the versions defined with tilde(~) or caret(^) syntax in **npm** | ||
2. `renderer bundles` parses the locked version JSON, copies all the peer dependencies into dash_renderer folder, bundles the renderer assets, and generates an `__init__.py` to map all the resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. `renderer bundles` parses the locked version JSON, copies all the peer dependencies into dash_renderer folder, bundles the renderer assets, and generates an `__init__.py` to map all the resources | |
2. `renderer bundles` parses the locked version JSON, copies all the peer dependencies into dash_renderer folder, bundles the renderer assets, and generates an `__init__.py` to map all the resources. This is called by `npm run build`, or you can call it directly if the renderer code has changed. |
Co-Authored-By: alexcjohnson <johnson.alex.c@gmail.com>
CONTRIBUTING.md
Outdated
After Dash 1.2, The renderer bundle and its peer dependencies can be packed and generated from the source code. The only version of the truth is defined in `dash-renderer\package.json` file. A build tool `renderer`, which is a tiny Python script defined as a Dash entry point, has few commands like: | ||
1. `renderer npm` installs all the npm modules using this `package.json` files. Note that the `package-lock.json` file is the computed reference product for the versions defined with tilde(~) or caret(^) syntax in **npm** | ||
2. `renderer bundles` parses the locked version JSON, copies all the peer dependencies into dash_renderer folder, bundles the renderer assets, and generates an `__init__.py` to map all the resources | ||
3. `renderer digest {renderer version}` computes the content hash of each asset in `dash_renderer` folder, prints out the result in logs, and dumps into a JSON file `digest.json` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should we say about when to use this? Just that we use it internally to test that the build has not changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, something the assets bundle check
I extracted this out as a single job, so we can reuse it when we want to do some simple compare from the hash
## Git | ||
|
||
Use the [GitHub flow][] when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the default branch). | ||
Use the [GitHub flow](https://guides.github.com/introduction/flow/) when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the default branch). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think I generally prefer links inline like this, but it did work the way it was, with the link defined at the end of the doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
this PR targets to clean the legacy dash-renderer assets present in git source repo. it closes #868
a new entry-point CLI tool is introduced as
renderer
, it has two jobs:npm
andbundles
.