Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Include /src and /template when publishing to npm #4016

Closed
chad-autry opened this issue Jul 26, 2015 · 8 comments
Closed

Include /src and /template when publishing to npm #4016

chad-autry opened this issue Jul 26, 2015 · 8 comments

Comments

@chad-autry
Copy link

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.

@wesleycho
Copy link
Contributor

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.

@chad-autry
Copy link
Author

@wesleycho
Is the reasoning behind not publishing the src that the individual files might have breaking changes, but the package as a whole might just be a minor semvar update?

@wesleycho
Copy link
Contributor

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.

@chad-autry
Copy link
Author

Using the workaround looses the ability to run npm outdated as a downside.

@marduke182
Copy link

@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.

@chad-autry
Copy link
Author

@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.

@wesleycho
Copy link
Contributor

@chad-autry we may be able to support it if we publish this repository to npm along side of the bootstrap-bower repository & make the necessary adjustments here.

@wesleycho wesleycho reopened this Sep 25, 2015
@wesleycho
Copy link
Contributor

Closing in favor of #4739.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants