Skip to content

Please publish UI Grid to NPM #3402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jinder opened this issue May 1, 2015 · 27 comments
Closed

Please publish UI Grid to NPM #3402

jinder opened this issue May 1, 2015 · 27 comments
Assignees
Milestone

Comments

@jinder
Copy link

jinder commented May 1, 2015

Could you please publish the new UI Grid to NPM? I can't seem to find it on there at the moment.

@c0bra
Copy link
Contributor

c0bra commented May 1, 2015

We'll take that under advisement. Is there a reason that the bower package doesn't work for you? Would you want just the bower package duplicated to npm or something different?

@jinder
Copy link
Author

jinder commented May 2, 2015

Yes, the existing bower package pushed to NPM should be fine. An increasing number of front-end projects now publish directly to NPM (http://blog.npmjs.org/post/101775448305/npm-and-front-end-packaging). Angular and other Angular-ui projects now have official NPM distributions too.

Two reasons for me personally: 1) I prefer having just one package manager for all my dependencies 2) we have an internal corporate mirror of the NPM registry, but not one for bower. I understand this is probably not a concern for others :)

@andrexx
Copy link

andrexx commented May 5, 2015

@LoicMahieu
Copy link

+1 Like @jinder I prefer use only NPM as package manager and I was surprised to not found ui-grid on NPM as ui-router is already in place.
Please publish it with the same convention than ui-router: his package name is angular-ui-router. (Current package.json looks: ui-grid)

@LoicMahieu
Copy link

Workaround is to install via Github: npm install angular-ui/ng-grid

@LoicMahieu
Copy link

Maybe the better way would be to publish https://github.com/angular-ui/bower-ui-grid on npm which contains builded files.

@PaulL1
Copy link
Contributor

PaulL1 commented May 16, 2015

@c0bra: whilst this might help some people, it's not that it doesn't work with bower. Will this make our release process longer/more complex, or does it just get automated with the rest and remain largely push button? If the latter then I guess I'm supportive, but probably not as a high priority.

@adamthesax
Copy link

+1 to this. I echo @jinder sentiments. I wouldn't think this would make releases any more complex. It's essentially just publishing the same package you do to bower to the npm registry. Also FYI ui-grid is still an available on npm. May want to snatch it: https://www.npmjs.com/package/ui-grid

@theodorejb
Copy link

Hopefully ui-grid can be added to npm as part of the 3.0 release. We use npm exclusively to manage our front-end dependencies, and this is the only dependency that isn't available there.

@c0bra
Copy link
Contributor

c0bra commented Jun 2, 2015

@rewiredpictures Thanks for the tip. I think we can use the base of the bower repo build task for doing the same thing on NPM.

@aciccarello
Copy link

+1 for npm publish.

@tuchk4
Copy link

tuchk4 commented Jun 23, 2015

+1

@adamthesax
Copy link

It looks like this package made it's way into npm. Yay thanks! One problem is that the main property in the package.json is set to multiple files which is not supported by npm.

@aciccarello
Copy link

Ah, I see. Its published as angular-ui-grid.

And as @rewiredpictures said, the "main" should point to just one file. I think it should point to an index.js file requiring the source code and exporting the name like the angular sub-modules do.

require('./ui-grid');
module.exports = 'ui.grid';

A "repository" and "bugs" property in package.json along with a proper README.md would probably be good for viewing on the npm website too.

@c0bra
Copy link
Contributor

c0bra commented Jul 23, 2015

@aciccarello Thanks for the notes. I'll get this done for the next release. The README, repo and bugs

  • Use single file for main prop in npm package.json

@JLLeitschuh JLLeitschuh added this to the 3.0.1 milestone Jul 27, 2015
@benoror
Copy link
Contributor

benoror commented Jul 29, 2015

+1 for supporting CommonJS package management!

Motivation

I'm in the process of refactoring an app to support modern JS tooling like NPM-only, Webpack & ES6.

Code Change

A small change is needed to support CommonJS:

I have done PRs for some of my own dependencies:

Since ui-grid uses several modules I'm not sure how to proceed, but I am willing to help if needed 😄

Sources

@JLLeitschuh
Copy link
Contributor

There are lots of things that need to be taken care of and not enough developers to go around at the moment. If you know how to make the build better please join us on gitter.
We welcome help making this project better.

@benoror
Copy link
Contributor

benoror commented Jul 30, 2015

Just as a note, I was able to include it in Webpack + ES6 with:

import uigrid from 'angular-ui-grid/ui-grid.js';
import 'angular-ui-grid/ui-grid.css';

/** ... **/

export default angular.module('app.module.xyz', [
    'ui.grid',
    'ui.grid.autoResize',
    'ui.grid.pagination',
    'ui.grid.selection',
    'ui.grid.edit',
    'ui.grid.rowEdit'
   /** etc **/
  ])
  .name

@Avien
Copy link

Avien commented Aug 4, 2015

@benoror I am trying to import ui-grid to my webpack project but I get this error:

ERROR in ../app-ui-common//angular-ui-grid/ui-grid.ttf?
Module parse failed: /Users/avi/SVN/afs/app-ui-common/node_modules/angular-ui-grid/ui-grid.ttf? Line 1: Unexpected token ILLEGAL
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./
/css-loader!../app-ui-common/~/angular-ui-grid/ui-grid.min.css 2:14784-14809

However I do have the proper loader for images and fonts:
{ test: /.(ttf|eot|svg|otf)$/, loader: "file?" },

Any ideas?
Thanks

@Avien
Copy link

Avien commented Aug 4, 2015

Solved it
Since I am using the extract-text-webpack-plugin I was missing the file-loader in the extract method:

{ test: /\.css$/, loader: ExtractTextPlugin.extract("css","file")}

@JLLeitschuh
Copy link
Contributor

This is still a problem because travis doesn't do a push automatically yet.

@icfantv
Copy link

icfantv commented Dec 24, 2015

@c0bra - i am still not seeing an index.js file in the source or in the package provided by NPM. would you accept a PR for this? thanks.

@pimenovoleg
Copy link

@d-amit
Copy link

d-amit commented Jul 29, 2016

+1

@mportuga
Copy link
Member

@icfantv We are definitely willing to accept a PR for this.

@ManiAmuthan
Copy link

ManiAmuthan commented Mar 24, 2017

when i tried to import in my Angualr2 component " import * as uiGrid from "angular-ui-grid"; ". i got the below issue.
cannot find module 'angular-ui-grid'.

After searching over internet it suggested me to install "@types/angular-ui-grid" but i got the below issue.
'@types/angular-ui-grid' is not in the npm registry.
You should bug the author to publish it

is there is any other option to fix this.
My requirement is to create a simple ui-grid using Angular2 and web pack2.

@icfantv
Copy link

icfantv commented Mar 24, 2017

@ManiAmuthan, please do not hijack threads with your own support requests. This is considered very poor form. You would be better served by posting your question to stackoverflow.

@jinder jinder closed this as completed Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests