-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ngx-material-password-strength): init project
- Loading branch information
0 parents
commit b3ef465
Showing
103 changed files
with
32,619 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING | ||
--> | ||
### Bug Report or Feature Request (mark with an `x`) | ||
``` | ||
- [ ] bug report -> please search issues before submitting | ||
- [ ] feature request | ||
``` | ||
|
||
### OS and Version? | ||
<!-- | ||
> Windows 7, 8 or 10. Linux (which distribution).macOS(Yosemite ? El Capitan? Sierra ?) | ||
--> | ||
|
||
### Versions | ||
<!-- | ||
Output from: `ng --version`, in case you are using Angular CLI. | ||
Otherwise, output from: `node --version` , `npm --version` and Angular version. | ||
--> | ||
|
||
|
||
### Repro steps | ||
<!-- | ||
Simple steps to reproduce this bug. | ||
Please include: commands run, packages added, related code changes. | ||
A link to a sample repo would help too. | ||
--> | ||
|
||
|
||
### The log given by the failure | ||
<!-- Normally this include a stack trace and some more information. --> | ||
|
||
|
||
### Desired functionality | ||
<!-- | ||
What would like to see implemented? | ||
What is the usecase? | ||
--> | ||
|
||
|
||
### Mention any other details that might be useful | ||
<!-- Please include a link to the repo if this is related to an OSS project. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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 | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
/config/gulp-tasks/README.md | ||
|
||
# e2e | ||
/e2e/*.js | ||
/e2e/*.map | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 | ||
|
||
cache: | ||
yarn: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"generator-ngx-library": { | ||
"version": "5.7.1", | ||
"authorName": "anthonynahas", | ||
"authorEmail": "[email protected]", | ||
"githubUsername": "anthonynahas", | ||
"githubRepoName": "ngx-material-password-strength", | ||
"projectName": "ngx-material-password-strength", | ||
"projectVersion": "0.0.1", | ||
"projectDescription": "Material password strength meter to indicate how secure is the provided password", | ||
"projectKeywords": [ | ||
"ngx", | ||
" angular", | ||
" material", | ||
" password", | ||
" password-strength", | ||
" strength-meter" | ||
], | ||
"ngVersion": "5.0.0", | ||
"ngModules": [ | ||
"core", | ||
"common" | ||
], | ||
"otherDependencies": [], | ||
"dependenciesRange": "^", | ||
"ngPrefix": "my-lib", | ||
"testingFramework": "karma", | ||
"useGreenkeeper": true, | ||
"useCompodoc": true, | ||
"enforceNgGitCommitMsg": true, | ||
"exclusions": [ | ||
"demo/src/jestGlobalMocks.ts", | ||
"demo/src/setupJest.ts", | ||
"config/jestGlobalMocks.ts", | ||
"config/setupJest.ts" | ||
] | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 anthonynahas | ||
|
||
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 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<p align="center"> | ||
<img height="256px" width="256px" style="text-align: center;" src="https://cdn.rawgit.com/anthonynahas/ngx-material-password-strength/master/demo/src/assets/logo.svg"> | ||
</p> | ||
|
||
# ngx-material-password-strength - Material password strength meter to indicate how secure is the provided password | ||
|
||
[![npm version](https://badge.fury.io/js/ngx-material-password-strength.svg)](https://badge.fury.io/js/ngx-material-password-strength), | ||
[![Build Status](https://travis-ci.org/anthonynahas/ngx-material-password-strength.svg?branch=master)](https://travis-ci.org/anthonynahas/ngx-material-password-strength) | ||
[![Coverage Status](https://coveralls.io/repos/github/anthonynahas/ngx-material-password-strength/badge.svg?branch=master)](https://coveralls.io/github/anthonynahas/ngx-material-password-strength?branch=master) | ||
[![dependency Status](https://david-dm.org/anthonynahas/ngx-material-password-strength/status.svg)](https://david-dm.org/anthonynahas/ngx-material-password-strength) | ||
[![devDependency Status](https://david-dm.org/anthonynahas/ngx-material-password-strength/dev-status.svg?branch=master)](https://david-dm.org/anthonynahas/ngx-material-password-strength#info=devDependencies) | ||
[![Greenkeeper Badge](https://badges.greenkeeper.io/anthonynahas/ngx-material-password-strength.svg)](https://greenkeeper.io/) | ||
|
||
## Demo | ||
|
||
View all the directives in action at https://anthonynahas.github.io/ngx-material-password-strength | ||
|
||
## Dependencies | ||
* [Angular](https://angular.io) (*requires* Angular 2 or higher, tested with 2.0.0) | ||
|
||
## Installation | ||
Install above dependencies via *npm*. | ||
|
||
Now install `ngx-material-password-strength` via: | ||
```shell | ||
npm install --save ngx-material-password-strength | ||
``` | ||
|
||
--- | ||
##### SystemJS | ||
>**Note**:If you are using `SystemJS`, you should adjust your configuration to point to the UMD bundle. | ||
In your systemjs config file, `map` needs to tell the System loader where to look for `ngx-material-password-strength`: | ||
```js | ||
map: { | ||
'ngx-material-password-strength': 'node_modules/ngx-material-password-strength/bundles/ngx-material-password-strength.umd.js', | ||
} | ||
``` | ||
--- | ||
|
||
Once installed you need to import the main module: | ||
```js | ||
import { LibModule } from 'ngx-material-password-strength'; | ||
``` | ||
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 ` LibModule .forRoot()`): | ||
```js | ||
import { LibModule } from 'ngx-material-password-strength'; | ||
|
||
@NgModule({ | ||
declarations: [AppComponent, ...], | ||
imports: [LibModule.forRoot(), ...], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { | ||
} | ||
``` | ||
|
||
Other modules in your application can simply import ` LibModule `: | ||
|
||
```js | ||
import { LibModule } from 'ngx-material-password-strength'; | ||
|
||
@NgModule({ | ||
declarations: [OtherComponent, ...], | ||
imports: [LibModule, ...], | ||
}) | ||
export class OtherModule { | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
|
||
|
||
## License | ||
|
||
Copyright (c) 2018 anthonynahas. Licensed under the MIT License (MIT) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
const os = require('os'); | ||
const path = require('path'); | ||
const exec = require('child_process').exec; | ||
|
||
const _root = path.resolve(__dirname, '..'); | ||
|
||
|
||
/** | ||
* Plaform independant path to an executable cmd | ||
* @param {string} path | ||
*/ | ||
platformPath = (path) => { | ||
return /^win/.test(os.platform()) ? `${path}.cmd` : path; | ||
}; | ||
|
||
/** | ||
* | ||
* @param {string[]} args | ||
*/ | ||
rootDir = (...args) => { | ||
return path.join.apply(path, [_root].concat(...args)); | ||
}; | ||
|
||
/** | ||
* | ||
* @param {string} cmd | ||
*/ | ||
binPath = (cmd) => { | ||
return platformPath(`/node_modules/.bin/${cmd}`); | ||
}; | ||
|
||
/** | ||
* Promisified child_process.exec | ||
* | ||
* @param cmd | ||
* @param opts See child_process.exec node docs | ||
* @returns {Promise<number>} | ||
*/ | ||
execp = (cmd, opts) => { | ||
opts = Object.assign(opts || {}, { | ||
stdout: process.stdout, | ||
stderr: process.stderr | ||
}); | ||
return new Promise((resolve, reject) => { | ||
const child = exec(cmd, opts, | ||
(err, stdout, stderr) => err ? reject(err.code) : resolve(0)); | ||
|
||
if (opts.stdout) { | ||
child.stdout.pipe(opts.stdout); | ||
} | ||
if (opts.stderr) { | ||
child.stderr.pipe(opts.stderr); | ||
} | ||
}); | ||
}; | ||
|
||
/** | ||
* Install dependencies using yarn, if present, or npm otherwise. | ||
* @param opts See child_process.exec node docs | ||
* @returns {Promise<number>} | ||
*/ | ||
installDependencies = (opts) => { | ||
return execp('yarn -v') // first try to install deps using yarn | ||
.then(exitCode => exitCode === 0 ? execp('yarn install', opts) : execp('npm install', opts)); | ||
}; | ||
|
||
var exports = module.exports = { | ||
root: rootDir, | ||
execp: execp, | ||
binPath: binPath, | ||
platformPath: platformPath, | ||
installDependencies: installDependencies | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Error.stackTraceLimit = Infinity; | ||
|
||
require('core-js/es6'); | ||
require('core-js/es7/reflect'); | ||
|
||
require('zone.js/dist/zone'); | ||
require('zone.js/dist/long-stack-trace-zone'); | ||
require('zone.js/dist/proxy'); | ||
require('zone.js/dist/sync-test'); | ||
require('zone.js/dist/jasmine-patch'); | ||
require('zone.js/dist/async-test'); | ||
require('zone.js/dist/fake-async-test'); | ||
|
||
var appContext = require.context('../src', true, /\.spec\.ts/); | ||
|
||
appContext.keys().forEach(appContext); | ||
|
||
var testing = require('@angular/core/testing'); | ||
var browser = require('@angular/platform-browser-dynamic/testing'); | ||
|
||
testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting()); |
Oops, something went wrong.