npm run dev and npm run build are empty strings now? #4200
-
I'm just syncing my fork to the latest changes from the repo, and I see that package.json changed a fair bit with the webpack change. Specifically, this change happened:
When I make that change locally and call |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Our We programmatically update the
|
Beta Was this translation helpful? Give feedback.
-
Ah, that makes sense! I skipped over post_gen_project when I was looking through the Webpack PR as I didn't realize template changes happened there too. Sorry for making you explain! |
Beta Was this translation helpful? Give feedback.
Our
package.json
in the template is a valid JSON file which contains all dependencies (Gulp + Webpack). This is to be able to receive Dependabot updates, which -if I'm not mistaken- don't work with Jinja tags.We programmatically update the
package.json
file in the post-gen hooks to remove the dependencies which aren't needed and set the npm scripts:Gulp:
cookiecutter-django/hooks/post_gen_project.py
Lines 159 to 162 in e601467
Webpack:
cookiecutter-django/hooks/post_gen_project.py
Lines 166 to 169 in e601467