-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Include /src and /template when publishing to npm #4016
Comments
If one wants to consume those directories directly, one should specify the repository and the particular commit/tag/branch one desires to use instead of using the semvar from npm. Otherwise, we do not intend on supporting this any further. |
@wesleycho |
It unnecessarily bloats the package, when those consuming from semvar typically consume a distribution version. There is an already existing workaround for those who want to access the raw files. |
Using the workaround looses the ability to run npm outdated as a downside. |
@wesleycho Is true that the people using semVar in other package manager as Bower only use the dist version, but if you are using the package from NPM, it's probably that you are using something like Bowersify or Webpack. That allow you require part of the code and not all of it. In my case, I use some feature of angular-strap and other from angular-ui-bootstrap, I dont want to import both dependencies at all, only parts of it, with aungular-strap is easy (Only import the repsective module and his dependencies) and the final package size is a lot less, why? They add the src in the npm repository I'm really interested in this feature (Only in NPM, I do not need the Bower repo with the sources), my current workaround is awful... If need some help to implement it, i can make a pull request. |
@marduke182 It is a way of publishing which weslycho already commented they have no interest in supporting. It is not a question of needing help implementing, they simply don't want it. As a workaround, you can fork the repo and republish to npm yourself with the source. If you want piece meal access you don't even need their compilation steps, just publish the raw /src and /template directory. |
@chad-autry we may be able to support it if we publish this repository to npm along side of the |
Closing in favor of #4739. |
angular-ui-bootstrap is laid out very logically,
by including /src and /template a developer using npm for dependency on angular-ui-bootstrap can pick and choose just the modules required for inclusion in the dependent project. (One method of inclusion being browserify). This is how the former angular-ui was published.
When publishing to npm, simply copy the /src and /template directories into the dist directory before executing the publish. Examining the repo, npm publishing appears to be a manual task at the moment.
The text was updated successfully, but these errors were encountered: