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

please update 0.12 to npm ~ #3021

Closed
allmonday opened this issue Nov 26, 2014 · 21 comments
Closed

please update 0.12 to npm ~ #3021

allmonday opened this issue Nov 26, 2014 · 21 comments
Milestone

Comments

@allmonday
Copy link

npm's angular-bootstrap is still 0.11~~~~

@royaldark
Copy link

👍

1 similar comment
@leon
Copy link

leon commented Dec 11, 2014

+1

@pkozlowski-opensource
Copy link
Member

Guys, I'm sorry, but we are not publishing to npm officially. Please contact owner of the package.

@leon
Copy link

leon commented Dec 11, 2014

@ws-malysheva could you please let angular-ui take over angular-bootstrap npm project?
that way they can keep it in sync with the latest releases :)

@lindseydew
Copy link

It looks like this has been unpublished. Are there any plans to republish this on npm? We have a project that depends on it.

@theefer
Copy link

theefer commented Dec 12, 2014

Just to let you know that in order to fix our build, the simplest solution was to republish the package under a temporary name on npm as angular-bootstrap-temporary. I'll be delighted to unpublish that hacky package as soon as an official package is published by the angular-ui team, so please just ping me here!

Thanks,

@leon
Copy link

leon commented Jan 3, 2015

@pkozlowski-opensource any news on this?

@kentcdodds
Copy link

Would really like this on npm!

@leon
Copy link

leon commented Jan 19, 2015

I've published it at angular-bootstrap https://www.npmjs.com/package/angular-bootstrap

it's version 0.12.0 because 0.13.0-SNAPSHOT was already uploaded, but it's the same.

I've also invited the maintainers for angular-ui so that they can update the repo.

@kentcdodds
Copy link

Thanks for taking initiative @leon

@karianna
Copy link
Contributor

I'm going to reopen this so it's tracked on this side.

@karianna karianna reopened this Jan 19, 2015
@kentcdodds
Copy link

@leon, could the "main" be dist/ui-bootstrap-tpls.js instead of dist/ui-bootstrap-tpls.min.js? Any time I need to debug in ui-bootstrap, it just shows me minified code, and that's not helpful. Anyone using this via npm will definitely have a build process that could/should minify the code anyway.

@leon
Copy link

leon commented Jan 19, 2015

There are a couple of differences between the package I've deployed and the standard angular-boostrap

  1. It doesn't contain the version number in the dist/ files since npm handle the versions, the grunt and gulp build's shouldn't have to take into account that the filename of the generated files change.
  2. it also contains an updated package.json file

check the pull request #3201

@leon
Copy link

leon commented Jan 19, 2015

@kentcdodds What is the community standard for the "main" attribute?

@kentcdodds
Copy link

TL;DR - main should point to a single unminified file (best if it uses UMD) that exports the angular module name.

As I've been converting a project from bower to npm, I've noticed some point to a src file. This makes me a little uncomfortable because if they ever decide to move where the source files are located, they need to make sure to update main and if they miss that step, they break everyone. I much rather prefer them to point to a dist folder file.

But in most cases, the file that's pointed to is an unminified file. In many cases it's a UMD module. In an angular context, this isn't really important. However, I think the angular-ui-router project has it right when their export is the name of the module. This is nice because then I can do this:

angular.module('myModule', [
  require('angular-ui-router')
]);

And I don't even need to know the name of the module. I think that I would consider this a best practice and would hope that the entire community follows this project.

@kentcdodds
Copy link

Also, I should have mentioned, but just to be clear. That single file should be browser shippable on its own. So it should be a concat of all the files necessary as well as all the templates necessary (via $templateCache for example) for the module to function.

@leon
Copy link

leon commented Jan 19, 2015

@kentcdodds I'll change my pull request to point to the unminified version.

Does removing the version from the filename some how interfer with the bower release?

@kentcdodds
Copy link

The version should never be included as part of the filename because it prevents auto-updates from happening. Meaning, if I depend on version 1.0.1 then in my index.html (for example) I'll say:

<script src="my-dependency-1.0.1.js"></script>

Then if the maintainer of the project pushes a version 1.0.2, it breaks me or I don't get it, because bower would automatically update the package for me and unless the maintainer pushes all the previous versions as well, I'm going to break or not get it until I change to:

<script src="my-dependency-1.0.2.js"></script>

So the version should never be a part of the file name (unless you update the "main" but I would say that's just silly and just don't publish the file with the version number).

@leon
Copy link

leon commented Jan 19, 2015

@kentcdodds In my case the reference is in my gulp.js file, but the same applies there.

@kentcdodds
Copy link

@leon, just published this. Maybe it'll be helpful: How to distribute your AngularJS module

@Foxandxss
Copy link
Contributor

Done. Will update README soon.

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

10 participants