Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Practice to Organize Javascript Library & CSS Folder Structure [closed]

How do you organize your js & css folder in your web application?

My current project structure is like this one:

root/ ├── assets/ │   ├── js/ │   │   └──lib/ │   ├── css/ │   └── img/ └── index.html 

But it's more complicated when I use many javascript library & css plugin. Javascript plugin comes with its own .js file and sometimes with its own .css file.

For example, when I use JQuery with JQueryUI plugin, I put the jquery.js and jquery-ui.js inside js/lib directory. But JQueryUI comes with its own css file. Where should I put the css from javascript plugin for best practice? Should I put them inside lib folder, to distinguish my css and javascript css plugin? Or somewhere else?

I know it's a personal preferences, but I just wanna know how you guys organize your project folder.

Thanks in advance :)

like image 830
Willy Lazuardi Avatar asked Jun 13 '14 06:06

Willy Lazuardi


1 Answers

 root/    assets/       lib/-------------------------libraries--------------------           bootstrap/--------------Libraries can have js/css/images------------               css/               js/               images/             jquery/               js/           font-awesome/               css/               images/      common/--------------------common section will have application level resources                        css/           js/           img/   index.html 

This is how I organized my application's static resources.

like image 101
Akhlesh Avatar answered Oct 15 '22 07:10

Akhlesh