Skip to content

[Feature] Package the project as a ng library and more #1

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tinesoft
Copy link

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 :) ) :

image

A bit more info:

  • i named the library ngx-alert-notifications, to make @IgorMinar happy! (#ItsJustAngular)
  • i prefixed most classes by Nga and components by nga to follow naming conventions and best practices (see ng-bootstrap project for example)

To play around locally with the PR:

  • yarn or npm install from root folder
  • gulp build to build the library
  • yarn or npm install from demo/ folder
  • gulp 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/config file 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.json files (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!

@tinesoft
Copy link
Author

tinesoft commented Oct 1, 2017

Hi,

Any plan on integrating this PR?

@dhilt
Copy link

dhilt commented Dec 30, 2017

@tinesoft You did realy good work, don't you want to publish it to npm by yourself?

@tinesoft
Copy link
Author

@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.

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

Successfully merging this pull request may close these issues.

2 participants