Skip to content
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

Npm publish #49

Open
alex88 opened this issue Oct 4, 2016 · 8 comments
Open

Npm publish #49

alex88 opened this issue Oct 4, 2016 · 8 comments

Comments

@alex88
Copy link

alex88 commented Oct 4, 2016

Can you please publish this package on npm too?

@igal1c0de4n
Copy link

+1 thank you!

@wilcraig
Copy link

wilcraig commented Nov 3, 2016

I went ahead and published this package to NPM. Have submitted pull request to update readme

npm install ng-videosharing-embed

@igal1c0de4n
Copy link

igal1c0de4n commented Nov 3, 2016

@wilcraig thank you!

FYI there's an addition you can make to align this module with common npm-publishing conventions (see packages such as ngSanitize, ngAnimate, and more):

At the module's root add a short index.js file which contains:

require('./src/angular-embedplayer');
module.exports = 'videosharing-embed';

Then add a main key to package.json which points to the released module file:

  "main": "index.js",

Doing so will allow ES6 imports of the form:

import ngVideoSharingEmbed from 'ng-videosharing-embed/src/angular-embedplayer';
...
angular.module('myMapp', [ngVideoSharingEmbed, ...

Which is convenient..

@wilcraig
Copy link

wilcraig commented Nov 3, 2016

Ok great! I've added the index.js file and main key to package.json and pushed the changes as well as re-publishing to npm. Thanks @igalitarian

@igal1c0de4n
Copy link

igal1c0de4n commented Nov 3, 2016

@wilcraig Hey thanks for pushing the changes.
Unfortunately version 0.3.5 doesn't play videos. It appears that the changes I provided were partial. That's because the src/angular-embedplayer.js file doesn't pull with it the directive & filter files.

After some tinkering I got it to work with the following index.js:

require('./src/angular-embedplayer');
require('./src/directives/embedvideo');
require('./src/filters/videosettings');
require('./src/filters/whitelist');
module.exports = 'videosharing-embed';

@wilcraig
Copy link

wilcraig commented Nov 3, 2016

OK that makes sense. I was busy putting a lot of things into my build today so I didn't have a chance to test it together, but I'll update the index.js file again and push the changes. Thanks a ton!

@igal1c0de4n
Copy link

@wilcraig thanks, I confirm that v0.3.6 can be imported and works!

@karensg
Copy link

karensg commented Aug 8, 2017

Could you also release the latest version on npm?

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

No branches or pull requests

4 participants