angular-animations
Advanced tools
Comparing version 0.0.0 to 0.0.1-beta.0
{ | ||
"name": "angular-animations", | ||
"version": "0.0.0", | ||
"version": "0.0.1-beta.0", | ||
"description": "Angular Animations Utilities", | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"start": "npm run demo-app", | ||
"demo-app": "cd demo-app && ng serve", | ||
"build": "npx tsc", | ||
"prepublish": "npm run lint && npm test && npm run build", | ||
"release": "np", | ||
"test": "npx tsc --noEmit", | ||
"prettier": "prettier \"lib/**/*.ts\" --config \"./.prettierrc.json\" -l", | ||
"prettier-fix": "prettier \"**/*.ts\" --config \"./.prettierrc.json\" --write", | ||
"tslint": "tslint -p ./tsconfig.json -c tslint.json", | ||
"tslint-fix": "tslint -p ./tsconfig.json -c tslint.json --fix", | ||
"tslint-demo-app": "cd demo-app && npm run lint", | ||
"tslint-demo-app-fix": "cd demo-app && npm run lint-fix", | ||
"lint-fix": "npm run tslint-fix && npm run prettier-fix", | ||
"lint": "npm run tslint && npm run tslint-demo-app && npm run prettier" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "npm run lint", | ||
"pre-push": "npm run lint" | ||
} | ||
}, | ||
"repository": { | ||
@@ -13,8 +33,27 @@ "type": "git", | ||
}, | ||
"keywords": [ | ||
"angular", | ||
"animations", | ||
"library", | ||
"untility", | ||
"animate" | ||
], | ||
"author": "Chris Filipowski", | ||
"license": "ISC", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/filipows/angular-animations/issues" | ||
}, | ||
"homepage": "https://github.com/filipows/angular-animations#readme" | ||
"homepage": "https://github.com/filipows/angular-animations#readme", | ||
"devDependencies": { | ||
"@angular/animations": "^6.0.0", | ||
"husky": "^1.1.2", | ||
"np": "^3.0.4", | ||
"prettier": "1.14.3", | ||
"tslint": "^5.11.0", | ||
"tslint-config-prettier": "^1.15.0", | ||
"typescript": "^3.1.3" | ||
}, | ||
"peerDependencies": { | ||
"@angular/animations": "^6.0.0" | ||
} | ||
} |
@@ -1,5 +0,78 @@ | ||
# angular-animations | ||
# Angular-Animations | ||
This is a placeholder for angular animations utility library for Angular 4.2+ | ||
Angular Animations utility library for Angular 4.2+ | ||
It is based on [animate.css](https://daneden.github.io/animate.css/), but can be used in a declarative manner with an angular app | ||
Stay tuned. | ||
## Prerequisites | ||
Make sure you import `BrowserAnimationModule` in your angular app. | ||
```bash | ||
npm i @angular/animations@latest --save | ||
``` | ||
Import `BrowserAnimationsModule` from `@angular/platform-browser/animations` in your root NgModule | ||
```ts | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
``` | ||
```ts | ||
@NgModule({ | ||
declarations: [ | ||
... | ||
], | ||
imports: [ | ||
... | ||
BrowserAnimationsModule | ||
], | ||
}) | ||
export class AppModule { } | ||
``` | ||
## Installation and Usage | ||
```bash | ||
npm i angular-animations --save | ||
``` | ||
### Animations on enter / on leave | ||
Animations on enter / on leave are triggered in a moment when element is added to or removed from the dom. | ||
Basic example would be with using `*ngIf` template directive. | ||
Import animation functions that you want to use and add them to the component `animations` declaration: | ||
```ts | ||
import { fadeInOnEnterAnimation, fadeOutOnLeaveAnimation } from 'angular-animations'; | ||
@Component({ | ||
selector: '...', | ||
templateUrl: '...', | ||
styleUrls: ['...'], | ||
animations: [ | ||
fadeInOnEnterAnimation(), | ||
fadeOutOnLeaveAnimation() | ||
] | ||
}) | ||
``` | ||
and use them in the template: | ||
```html | ||
<div *ngIf="CONDITION" [@fadeInOnEnter] [@fadeOutOnLeave]></div> | ||
``` | ||
## Running Demo App | ||
``` | ||
npm start | ||
``` | ||
## Authors | ||
- **Chris Filipowski** - [filipows](https://github.com/filipows) | ||
## License | ||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
173533
196
3513
1
79
1
7