angular-multi-select
angular-multi-select copied to clipboard
main must be a string
see: https://docs.npmjs.com/files/package.json#main
having an array makes it impossible to use with browserify - it blows up.
Hi,
May I know then how browserify include the css?
And how do people who don't use browserify (say normal bower or such) can have the css file included automatically?
Sure, I only know about browserify and nodejs, I cant speak to webpack or any other type of a build system, but seeing how the spec calls for a string, I would expect them to also blow up in some way.
Anyway, browserify uses transforms to convert things that arent js into js. Some people use those to require the css files and have them be converted into js that will automagically add them to the style of the head.
Personally I @include them from sass with a custom loader.
bower is a different matter. The build that uses bower is vastly different. People usually use a lib called wiredep to automatically generate a list of js and css files from all their bower deps and add them into the index file.
If you look at the package.json spec there are other places you can put your css. the files bucket jumps out. This doesnt mean that you your files will get included unless whatever build system supports it. Take a look at bootstrap's package.json. They appear to use jspm which I know nothing about, but here it is:
https://github.com/twbs/bootstrap/blob/master/package.json
Hi,
Thanks for the explanation.
Well I guess my concern is simply whether this update will work for other package managers as well. Specifically on Bower, I had similar request in the past, and people complained;
https://github.com/isteven/angular-multi-select/pull/90 https://github.com/isteven/angular-multi-select/pull/93 https://github.com/isteven/angular-multi-select/pull/105
+1. I'm using JSPM to pull this into my angular app and it requires the npm package.json conventions. JSPM has its own suite of plugins ( https://github.com/systemjs/plugin-text, https://github.com/systemjs/plugin-css, https://github.com/systemjs/plugin-image ) which I have not used yet but I believe are used to pull in non-js components from npm/github packages that jspm pulls in through its module loading.
@isteven you can have an array in bower.json but package.json should be a string per this. This shouldn't break any other package managers.
:+1: Please merge this. Like @sgwatgit I am also using JSPM and this causes issues.