Open alex88 opened 7 years ago
+1 thank you!
I went ahead and published this package to NPM. Have submitted pull request to update readme
npm install ng-videosharing-embed
@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..
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
@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';
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!
@wilcraig thanks, I confirm that v0.3.6 can be imported and works!
Could you also release the latest version on npm?
Can you please publish this package on npm too?