Ask for best practices on css and js file directory structures! ! ! !

  node.js, question

Just half a year into my career, I usually have the following structure in my work, especially css. the more I write in style, the more I can’t remember the class names I used before. some pages have some slight differences that need to be distinguished. the current method is to add a unique id to the body of each page, and then distinguish it in style.css. js, some pages have few codes, but they are also written in main.js. Then every page is introduced to one side, and css style.css is also introduced to every page, which makes me feel disgusting. Do you have any better suggestions?


Js and css common to all pages are placed in common inside. For css styles of individual pages, they are separately written in the css file inside with the same name corresponding to this page. Only this page can be referenced.