angular2-alert-notifications
angular2-alert-notifications copied to clipboard
[Feature] Package the project as a ng library and more
Hi @cornflourblue ,
Thanks for this project! I was about to write something very similar, when i came accross your blog. The project has almost everything i needed and is very well written, Good job 👍
One little caveat though, the project is a bit cumbersome to integrate in a real-world ng project (need to copy/paste files around :(, ... )
So i'm submitting this PR, which basically makes a library out-of your code, for easy integration in ng projects, like any other angular libraries.
This was pretty straightforward, using a tool i created for that exact purpose.
So, what you'll get out of the box:
- AOT compatible distributed files
- publication to npm --> allows installation via
npm install <lib-name> - integrated demo app to showcase the library + deployment on project's github page
- source documentation via
compodoc - integration with
Travis CI - ready-to-use build system with
gulp - and more
Here is what the demo app looks like (notice the brand new logo :) ) :

A bit more info:
- i named the library
ngx-alert-notifications, to make @IgorMinar happy! (#ItsJustAngular) - i prefixed most classes by
Ngaand components byngato follow naming conventions and best practices (see ng-bootstrap project for example)
To play around locally with the PR:
yarnornpm installfrom root foldergulp buildto build the libraryyarnornpm installfromdemo/foldergulp serve:demo(from root folder) to see the demo app (http:localhost:4200)
If you merge the PR, here are a couple of things you must adjust:
- Rename the repository into
ngx-alert-notifications - edit the
.git/configfile in the project folder, to point to the new URL :https://github.com/cornflourblue/ngx-alert-notifications.git - correct your email in
.yo-rc.json,package.jsonfiles (this is not mandatory) - create yourself an account on npmjs.com (to be abbe to publish your library there)
- create yourself an account on Travis (Travis CI support is needed to release)
To publish:
gulp release version=major
That it!
I plan to submit more PRs to improve the library in the future.
If you have a question, drop me a line!
Cheers!
Hi,
Any plan on integrating this PR?
@tinesoft You did realy good work, don't you want to publish it to npm by yourself?
@dhilt Thank you 👍 , and sorry for the delay in responding.
Yes i'd like to, but i don't want to take away any credits, as the most important job has been done by @cornflourblue. It would be better if the library was published under his name/repo.