material icon indicating copy to clipboard operation
material copied to clipboard

publish to npm

Open btford opened this issue 12 years ago • 23 comments

now that angular* packages are on npm, this should be too!

btford avatar Oct 08 '14 23:10 btford

+1

maxwellium avatar Oct 08 '14 23:10 maxwellium

:+1: awesome!!

marcysutton avatar Oct 09 '14 01:10 marcysutton

@btford - I understand the goal for symmetry of deployment. Here is question that illustrates my confusion:

It was my understanding the npm is is critical for NodeJS components and build tools/packages. For client-side libraries, etc, I typically use bower. Since AngularJS is (currently) client-side framework, what is the reasoning for its installation via npm (in addition to bower)?

ThomasBurleson avatar Oct 09 '14 17:10 ThomasBurleson

npm is just a package manager. It doesn't care where the code runs.

Why not also publish to npm and give users a choice of how to consume it?

btford avatar Oct 09 '14 17:10 btford

Fair enough. Thx

ThomasBurleson avatar Oct 09 '14 18:10 ThomasBurleson

Will this happen? :D

gustavohenke avatar Jan 10 '15 01:01 gustavohenke

Please? Want all of my stuff to be from npm. Right now I'm just installing straight from git. Would love to not have to do that :-)

kentcdodds avatar Jan 18 '15 03:01 kentcdodds

+1

shprink avatar Jan 21 '15 19:01 shprink

+1

jamlfy avatar Jan 21 '15 19:01 jamlfy

We'll do this with 0.7.1 release

naomiblack avatar Jan 29 '15 18:01 naomiblack

OMG! Thanks @naomiblack :)

shprink avatar Jan 29 '15 18:01 shprink

Thank you @naomiblack :+1:

colin-ch avatar Jan 30 '15 10:01 colin-ch

Glad to hear it! Now that I'm bundling my dependencies, I'm looking forward to grabbing everything as a module.

jaawerth avatar Jan 30 '15 20:01 jaawerth

Closing this issue since npm install angular-material now works. :) Note, however that I didn't get the readme updated, so the doc at npmjs.org is confusing/incorrect until we push 0.8. In the meantime, look here for instructions: https://github.com/angular/bower-material/blob/master/README.md

naomiblack avatar Feb 03 '15 05:02 naomiblack

@naomiblack - I am reopening due to issues. Using npm install angular-material:

  1. Incorrectly installs globally (for me in ~/node_modules)
  2. Does not install in a hidden .node_modules directory
  3. Does not install the library dependencies
"dependencies": {
    "angular": "1.3.x",
    "angular-animate": "1.3.x",
    "angular-aria": "1.3.x"
  },

ThomasBurleson avatar Feb 03 '15 13:02 ThomasBurleson

Note, I would recommend using peerDependencies rather than dependencies and be as loose as you can about it. For more info see: http://blog.nodejs.org/2013/02/07/peer-dependencies/ It will save consumers a great deal of headache when trying to use your package.

kentcdodds avatar Feb 03 '15 18:02 kentcdodds

@ThomasBurleson About 3: devDependencies are only installed if you directly run npm install inside the package directory. If you don't want this behavior, you should use npm install -d <package>.

gustavohenke avatar Feb 03 '15 18:02 gustavohenke

@gustavohenke - under what scenarios would you want to install Angular Material but not the required AngularJS libraries?

ThomasBurleson avatar Feb 03 '15 19:02 ThomasBurleson

I think I didn't understand your problem previously posted:

Does not install the dev dependencies

The bower.json located in the bower-material repository doesn't have any devDependencies; so why would that be a problem?

gustavohenke avatar Feb 03 '15 19:02 gustavohenke

@gustavohenke - Now I understand. When NPM installs Angular Material, it should also install the required AngularJS libraries. I corrected the verbiage in my earlier comment.

ThomasBurleson avatar Feb 03 '15 20:02 ThomasBurleson