detroitblacktech / webportal

2 stars 4 forks source link

Add `package.json` to static content directory #6

Open dr-edmond-merkle opened 4 years ago

dr-edmond-merkle commented 4 years ago

I believe that we would prefer to have the javascript dependencies for the framework managed by npm rather than to have the manually added to the repository.

I have found a couple different implementation perspectives:

  1. https://stackoverflow.com/questions/24514936/how-can-i-serve-npm-packages-using-flaskhttps://itnext.io/a-template-for-creating-a-full-stack-web-application-with-flask-npm-webpack-and-reactjs-be2294b111bd

  2. https://flask-webpackext.readthedocs.io/en/latest/usage.html

I think next steps are to init npm / package.json in the static directory of the project, and move all the *.js dependencies there.

dr-edmond-merkle commented 4 years ago

Also, an interesting perspective on repository structure from a node perspective https://medium.com/@iaacek/vue-js-node-js-project-structure-51c27211ed2d