angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

Scoped NPM packages #5877

Open dfsq opened 8 years ago

dfsq commented 8 years ago

I know as as of version 1 angular-ui-bootstrap npm package is distributed with src directory, which allows bundling of individual modules. This is nice. However, what do you guys think about scoped npm packages per module?

Basically publishing individual modules as packages, packed as UMD module (along with possible dependencies, HTML and CSS):

Then it would allow individual packages to be installed as

npm install @angular-ui-bootstrap/tooltip

and used as

import uibTooltip from '@angular-ui-bootstrap/tooltip'

angular.module('app', [uibTooltip])

I think i would be really convenient. What do you guys think?

wesleycho commented 8 years ago

This sounds like an awesome idea - what do you think @Foxandxss?

Foxandxss commented 8 years ago

I wanted that for ngbs for sure but I never thought about doing to for uibs.

whynot ¯(ツ)

radovanradic commented 8 years ago

It may be unrelated question to this topic/issue but wanted to ask. We were using version 0.14.3 and wanted to upgrade to 1.3.3. However, using npm install it does not give us minified versions and we need to copy manually minified versions. The process is automated and we would like to avoid manually copying min versions. Any options to resolve this issue, or maybe adding min files to the npm repo?

Thanks

Foxandxss commented 8 years ago

Normally you minify all external dependencies as well, that is why we decided not to give a minified version.

radovanradic commented 8 years ago

Yes, that works too. I just hoped we could use minified version, since got used to it in prev version and different other libs we use have minified version so we just bundle third part minified libs into one common file. But, as you said, we can just minify source file before concat all the files together.

Thanks