Good day! I need advice on organizing a project on Django using Bower.

Simplified project structure:

src ├── apps ├── base ├── common │  ├── static │  │  ├── css │  │  ├── img │  │  └── js │  ├── templates │  └── views ├── manage.py ├── requirements.txt └── utils 

Current scripts are stored in the directory.

 common/static/js 

Where to store libraries loaded with bower? (I know about the possibility of installing on the server from the manifest, but I plan to include them in the repository)

It is reasonable to change the default directory in bower settings with

  bower_components/ 

on

  common/script/js 

so that all scripts (external and samopisnye) were stored in one directory? Or is such an organization of the project incorrect?

Please share your comments and tips on the organization of the project structure.

    1 answer 1

    A couple of months have passed since my question, I learned a lot and will try to answer.

    Bower is minimalist and easy to learn, but for managing third-party libraries, npm is preferred, especially with the yarn add- in to prevent unwanted package updates.

    Developers consolidate around npm:

    enter image description here

    This picture and a more detailed answer can be seen in response to Quora.

    Third-party libraries obtained using NPM are best brought along with their scripts away from the backend code in their folders and stitched together by collectors, for example, webpack.