Skip to content

Commit b3ef465

Browse files
committed
feat(ngx-material-password-strength): init project
0 parents  commit b3ef465

File tree

103 files changed

+32619
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+32619
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = 0
13+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING
3+
-->
4+
### Bug Report or Feature Request (mark with an `x`)
5+
```
6+
- [ ] bug report -> please search issues before submitting
7+
- [ ] feature request
8+
```
9+
10+
### OS and Version?
11+
<!--
12+
> Windows 7, 8 or 10. Linux (which distribution).macOS(Yosemite ? El Capitan? Sierra ?)
13+
-->
14+
15+
### Versions
16+
<!--
17+
Output from: `ng --version`, in case you are using Angular CLI.
18+
Otherwise, output from: `node --version` , `npm --version` and Angular version.
19+
-->
20+
21+
22+
### Repro steps
23+
<!--
24+
Simple steps to reproduce this bug.
25+
Please include: commands run, packages added, related code changes.
26+
A link to a sample repo would help too.
27+
-->
28+
29+
30+
### The log given by the failure
31+
<!-- Normally this include a stack trace and some more information. -->
32+
33+
34+
### Desired functionality
35+
<!--
36+
What would like to see implemented?
37+
What is the usecase?
38+
-->
39+
40+
41+
### Mention any other details that might be useful
42+
<!-- Please include a link to the repo if this is related to an OSS project. -->

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
10+
# IDEs and editors
11+
/.idea
12+
.project
13+
.classpath
14+
.c9/
15+
*.launch
16+
.settings/
17+
*.sublime-workspace
18+
19+
# IDE - VSCode
20+
.vscode/*
21+
!.vscode/settings.json
22+
!.vscode/tasks.json
23+
!.vscode/launch.json
24+
!.vscode/extensions.json
25+
26+
# misc
27+
/.sass-cache
28+
/connect.lock
29+
/coverage
30+
/libpeerconnection.log
31+
npm-debug.log
32+
yarn-error.log
33+
testem.log
34+
/typings
35+
/config/gulp-tasks/README.md
36+
37+
# e2e
38+
/e2e/*.js
39+
/e2e/*.map
40+
41+
# System Files
42+
.DS_Store
43+
Thumbs.db

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
sudo: required
2+
dist: trusty
3+
4+
#install google chrome, using addons
5+
addons:
6+
apt:
7+
sources:
8+
- google-chrome
9+
packages:
10+
- google-chrome-stable
11+
12+
language: node_js
13+
node_js:
14+
- "6"
15+
16+
before_script:
17+
- export DISPLAY=:99.0
18+
- sh -e /etc/init.d/xvfb start
19+
- npm install --quiet -g gulp-cli
20+
21+
script: gulp test:ci
22+
23+
after_success: gulp coveralls
24+
25+
cache:
26+
yarn: true
27+

.yo-rc.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"generator-ngx-library": {
3+
"version": "5.7.1",
4+
"authorName": "anthonynahas",
5+
"authorEmail": "[email protected]",
6+
"githubUsername": "anthonynahas",
7+
"githubRepoName": "ngx-material-password-strength",
8+
"projectName": "ngx-material-password-strength",
9+
"projectVersion": "0.0.1",
10+
"projectDescription": "Material password strength meter to indicate how secure is the provided password",
11+
"projectKeywords": [
12+
"ngx",
13+
" angular",
14+
" material",
15+
" password",
16+
" password-strength",
17+
" strength-meter"
18+
],
19+
"ngVersion": "5.0.0",
20+
"ngModules": [
21+
"core",
22+
"common"
23+
],
24+
"otherDependencies": [],
25+
"dependenciesRange": "^",
26+
"ngPrefix": "my-lib",
27+
"testingFramework": "karma",
28+
"useGreenkeeper": true,
29+
"useCompodoc": true,
30+
"enforceNgGitCommitMsg": true,
31+
"exclusions": [
32+
"demo/src/jestGlobalMocks.ts",
33+
"demo/src/setupJest.ts",
34+
"config/jestGlobalMocks.ts",
35+
"config/setupJest.ts"
36+
]
37+
}
38+
}

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 anthonynahas
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<p align="center">
2+
<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">
3+
</p>
4+
5+
# ngx-material-password-strength - Material password strength meter to indicate how secure is the provided password
6+
7+
[![npm version](https://badge.fury.io/js/ngx-material-password-strength.svg)](https://badge.fury.io/js/ngx-material-password-strength),
8+
[![Build Status](https://travis-ci.org/anthonynahas/ngx-material-password-strength.svg?branch=master)](https://travis-ci.org/anthonynahas/ngx-material-password-strength)
9+
[![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)
10+
[![dependency Status](https://david-dm.org/anthonynahas/ngx-material-password-strength/status.svg)](https://david-dm.org/anthonynahas/ngx-material-password-strength)
11+
[![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)
12+
[![Greenkeeper Badge](https://badges.greenkeeper.io/anthonynahas/ngx-material-password-strength.svg)](https://greenkeeper.io/)
13+
14+
## Demo
15+
16+
View all the directives in action at https://anthonynahas.github.io/ngx-material-password-strength
17+
18+
## Dependencies
19+
* [Angular](https://angular.io) (*requires* Angular 2 or higher, tested with 2.0.0)
20+
21+
## Installation
22+
Install above dependencies via *npm*.
23+
24+
Now install `ngx-material-password-strength` via:
25+
```shell
26+
npm install --save ngx-material-password-strength
27+
```
28+
29+
---
30+
##### SystemJS
31+
>**Note**:If you are using `SystemJS`, you should adjust your configuration to point to the UMD bundle.
32+
In your systemjs config file, `map` needs to tell the System loader where to look for `ngx-material-password-strength`:
33+
```js
34+
map: {
35+
'ngx-material-password-strength': 'node_modules/ngx-material-password-strength/bundles/ngx-material-password-strength.umd.js',
36+
}
37+
```
38+
---
39+
40+
Once installed you need to import the main module:
41+
```js
42+
import { LibModule } from 'ngx-material-password-strength';
43+
```
44+
The only remaining part is to list the imported module in your application module. The exact method will be slightly
45+
different for the root (top-level) module for which you should end up with the code similar to (notice ` LibModule .forRoot()`):
46+
```js
47+
import { LibModule } from 'ngx-material-password-strength';
48+
49+
@NgModule({
50+
declarations: [AppComponent, ...],
51+
imports: [LibModule.forRoot(), ...],
52+
bootstrap: [AppComponent]
53+
})
54+
export class AppModule {
55+
}
56+
```
57+
58+
Other modules in your application can simply import ` LibModule `:
59+
60+
```js
61+
import { LibModule } from 'ngx-material-password-strength';
62+
63+
@NgModule({
64+
declarations: [OtherComponent, ...],
65+
imports: [LibModule, ...],
66+
})
67+
export class OtherModule {
68+
}
69+
```
70+
71+
## Usage
72+
73+
74+
75+
## License
76+
77+
Copyright (c) 2018 anthonynahas. Licensed under the MIT License (MIT)
78+

config/helpers.js

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
const os = require('os');
2+
const path = require('path');
3+
const exec = require('child_process').exec;
4+
5+
const _root = path.resolve(__dirname, '..');
6+
7+
8+
/**
9+
* Plaform independant path to an executable cmd
10+
* @param {string} path
11+
*/
12+
platformPath = (path) => {
13+
return /^win/.test(os.platform()) ? `${path}.cmd` : path;
14+
};
15+
16+
/**
17+
*
18+
* @param {string[]} args
19+
*/
20+
rootDir = (...args) => {
21+
return path.join.apply(path, [_root].concat(...args));
22+
};
23+
24+
/**
25+
*
26+
* @param {string} cmd
27+
*/
28+
binPath = (cmd) => {
29+
return platformPath(`/node_modules/.bin/${cmd}`);
30+
};
31+
32+
/**
33+
* Promisified child_process.exec
34+
*
35+
* @param cmd
36+
* @param opts See child_process.exec node docs
37+
* @returns {Promise<number>}
38+
*/
39+
execp = (cmd, opts) => {
40+
opts = Object.assign(opts || {}, {
41+
stdout: process.stdout,
42+
stderr: process.stderr
43+
});
44+
return new Promise((resolve, reject) => {
45+
const child = exec(cmd, opts,
46+
(err, stdout, stderr) => err ? reject(err.code) : resolve(0));
47+
48+
if (opts.stdout) {
49+
child.stdout.pipe(opts.stdout);
50+
}
51+
if (opts.stderr) {
52+
child.stderr.pipe(opts.stderr);
53+
}
54+
});
55+
};
56+
57+
/**
58+
* Install dependencies using yarn, if present, or npm otherwise.
59+
* @param opts See child_process.exec node docs
60+
* @returns {Promise<number>}
61+
*/
62+
installDependencies = (opts) => {
63+
return execp('yarn -v') // first try to install deps using yarn
64+
.then(exitCode => exitCode === 0 ? execp('yarn install', opts) : execp('npm install', opts));
65+
};
66+
67+
var exports = module.exports = {
68+
root: rootDir,
69+
execp: execp,
70+
binPath: binPath,
71+
platformPath: platformPath,
72+
installDependencies: installDependencies
73+
};

config/karma-test-shim.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Error.stackTraceLimit = Infinity;
2+
3+
require('core-js/es6');
4+
require('core-js/es7/reflect');
5+
6+
require('zone.js/dist/zone');
7+
require('zone.js/dist/long-stack-trace-zone');
8+
require('zone.js/dist/proxy');
9+
require('zone.js/dist/sync-test');
10+
require('zone.js/dist/jasmine-patch');
11+
require('zone.js/dist/async-test');
12+
require('zone.js/dist/fake-async-test');
13+
14+
var appContext = require.context('../src', true, /\.spec\.ts/);
15+
16+
appContext.keys().forEach(appContext);
17+
18+
var testing = require('@angular/core/testing');
19+
var browser = require('@angular/platform-browser-dynamic/testing');
20+
21+
testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());

0 commit comments

Comments
 (0)