diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..06dde11 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = 0 +trim_trailing_whitespace = false diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..e6ab003 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,42 @@ + +### Bug Report or Feature Request (mark with an `x`) +``` +- [ ] bug report -> please search issues before submitting +- [ ] feature request +``` + +### OS and Version? + + +### Versions + + + +### Repro steps + + + +### The log given by the failure + + + +### Desired functionality + + + +### Mention any other details that might be useful + diff --git a/.gitignore b/.gitignore index f6c88bf..a1c3836 100644 --- a/.gitignore +++ b/.gitignore @@ -1,45 +1,42 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules -jspm_packages -typings - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history - -# Generated files -app/**/*.js -app/**/*.js.map - -# VS Code settings -.vscode +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +testem.log +/typings +/config/gulp-tasks/README.md + +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..297b5a9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +sudo: required +dist: trusty + +#install google chrome, using addons +addons: + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + +language: node_js +node_js: + - "6" + +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - npm install --quiet -g gulp-cli + +script: gulp test:ci + +after_success: gulp coveralls diff --git a/.yo-rc.json b/.yo-rc.json new file mode 100644 index 0000000..6d2388c --- /dev/null +++ b/.yo-rc.json @@ -0,0 +1,26 @@ +{ + "generator-ngx-library": { + "authorName": "Jason Watmore", + "authorEmail": "webmaster@jasonwatmore.com", + "githubUsername": "cornflourblue", + "projectName": "ngx-alert-notifications", + "projectVersion": "0.0.1", + "projectDescription": "Alert notifications module for Angular.", + "projectKeywords": [ + "ng", + "angular", + "alert", + "notifications" + ], + "ngPrefix": "nga", + "ngVersion": "2.0.0", + "ngModules": [ + "core", + "common", + "router", + "platform-browser" + ], + "useGreenkeeper": false, + "useCompodoc": true + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE index 86edc01..25b0081 100644 --- a/LICENSE +++ b/LICENSE @@ -2,20 +2,21 @@ The MIT License (MIT) Copyright (c) 2017 Jason Watmore -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 73f843d..0b16b6e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,137 @@ -# angular2-alert-notifications +
+
+
Your alerts will appear here...
+- Angular 2/4 - Alert (Toaster) Notifications -
-- JasonWatmore.com -
-<p align="center">[^]+?)(
Install above dependencies via npm.
+Now install ngx-alert-notifications via:
+npm install --save ngx-alert-notifications
++Note:If you are using
+SystemJS, you should adjust your configuration to point to the UMD bundle. +In your systemjs config file,mapneeds to tell the System loader where to look forngx-alert-notifications:
+map:'ngx-alert-notifications': 'node_modules/ngx-alert-notifications/bundles/ngx-alert-notifications.umd.js'
Once installed you need to import the main module:
++;
The only remaining part is to list the imported module in your application module. The exact method will be slightly
+different for the root (top-level) module for which you should end up with the code similar to (notice NgaAlertModule.forRoot()):
+;@
Other modules in your application can simply import NgaAlertModule:
+;@
Once the module is imported, you can use the NgaAlertService in your component (i.e. HomeComponent) to display different types of notifications.
Here is how it works:
++;;@{{ '{' }} }{{ '{' }}thisalertService;}{{ '{' }}thisalertService;}{{ '{' }}thisalertService;}{{ '{' }}thisalertService;}{{ '{' }}thisalertServiceclear;}
and here, the related component template:
++<div class="container"><div class="row"><div class="col-md text-center"><button class="btn btn-success" click="success('Success!!')"><i class="fa fa-bell" aria-hidden="true"></i> Success</button><button class="btn btn-danger" click="error('Error :(')"><i class="fa fa-bell" aria-hidden="true"></i> Error</button><button class="btn btn-info" click="info('Some info....')"><i class="fa fa-bell" aria-hidden="true"></i> Info</button><button class="btn btn-warning" click="warn('Warning: ...')"><i class="fa fa-bell" aria-hidden="true"></i> Warn</button><button class="btn btn-default" click="clear()"><i class="fa fa-bell-slash" aria-hidden="true"></i> Clear</button></div><div class="col-md text-center"><p class="text-muted">Your alerts will appear here...</p><nga-alert></nga-alert></div></div>
Copyright (c) 2017 Jason Watmore. Licensed under the MIT License (MIT)
+ +Alert notifications module for Angular.
+Scroll down to see it in action!
+ + +Your alerts will appear here...
+