Closed enjoysmath closed 3 years ago
In fact, none of these work:
npm run build:js-dev generate the development bundle project_shortname.dev.js, use with app.run_server(debug=True) npm run build:py generate the python classes files for the components. npm run build:all generate both bundles and the languages classes files.
From the package.json
generated by cookiecutter
, the currently accepted scripts are:
"start": "webpack-serve --config ./webpack.serve.config.js --open",
"validate-init": "python _validate_init.py",
"prepublishOnly": "npm run validate-init",
"build:js": "webpack --mode production",
"build:py_and_r": "dash-generate-components ./src/lib/components dashified_arcgis -p package-info.json --r-prefix '' --jl-prefix ''",
"build:py_and_r-activated": "(. venv/bin/activate || venv\\scripts\\activate && npm run build:py_and_r)",
"build": "npm run build:js && npm run build:py_and_r",
"build:activated": "npm run build:js && npm run build:py_and_r-activated"
The docs currently show:
npm run build:js
: generate the production bundle project_shortname.min.jsnpm run build:js-dev
: generate the development bundle project_shortname.dev.js, use withapp.run_server(debug=True)
npm run build:py
generate the python classes files for the components.npm run build:all
generate both bundles and the languages classes files.
It seems that build:py_and_r
replaces build:py
, build
replaces build:all
, and build:js-dev
has been deprecated. It would make sense to update the docs to reflect this.
I have opened an issue for this in https://github.com/plotly/dash-docs/issues/1036.
Hi, it's possible to add it by adding
"build:js-dev": "webpack --mode development"
inside scripts
in package.json
. However, since there's already a .map
file being generated, the .dev.js
JavaScript files are no longer needed in debug mode.
As for the the other scripts, I opened a PR in the user guide to correct them so they will be up to date.
npm run build:js does work