ng-auto-animate 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +13 -0
- package/.eslintignore +1 -0
- package/.eslintrc.json +48 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/auto_assign.yml +17 -0
- package/.github/workflows/ci.yml +24 -0
- package/.github/workflows/npm-publish.yml +23 -0
- package/.github/workflows/release.yml +32 -0
- package/.node-version +1 -0
- package/.prettierignore +7 -0
- package/.prettierrc +8 -0
- package/.vscode/extensions.json +10 -0
- package/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/README.md +24 -107
- package/apps/.gitkeep +0 -0
- package/apps/demo/.eslintrc.json +33 -0
- package/apps/demo/jest.config.ts +22 -0
- package/apps/demo/project.json +84 -0
- package/apps/demo/src/app/app.component.ts +148 -0
- package/apps/demo/src/app/app.config.ts +12 -0
- package/apps/demo/src/app/app.routes.ts +3 -0
- package/apps/demo/src/assets/.gitkeep +0 -0
- package/apps/demo/src/favicon.ico +0 -0
- package/apps/demo/src/index.html +14 -0
- package/apps/demo/src/main.ts +5 -0
- package/apps/demo/src/styles.scss +1 -0
- package/apps/demo/src/test-setup.ts +8 -0
- package/apps/demo/tsconfig.app.json +10 -0
- package/apps/demo/tsconfig.editor.json +7 -0
- package/apps/demo/tsconfig.json +32 -0
- package/apps/demo/tsconfig.spec.json +11 -0
- package/apps/demo-e2e/.eslintrc.json +10 -0
- package/apps/demo-e2e/cypress.config.ts +6 -0
- package/apps/demo-e2e/project.json +30 -0
- package/apps/demo-e2e/src/e2e/app.cy.ts +13 -0
- package/apps/demo-e2e/src/fixtures/example.json +4 -0
- package/apps/demo-e2e/src/support/app.po.ts +1 -0
- package/apps/demo-e2e/src/support/commands.ts +33 -0
- package/apps/demo-e2e/src/support/e2e.ts +17 -0
- package/apps/demo-e2e/tsconfig.json +16 -0
- package/jest.config.ts +5 -0
- package/jest.preset.js +3 -0
- package/libs/.gitkeep +0 -0
- package/libs/ng-auto-animate/.eslintrc.json +33 -0
- package/libs/ng-auto-animate/README.md +131 -0
- package/libs/ng-auto-animate/jest.config.ts +22 -0
- package/libs/ng-auto-animate/ng-package.json +7 -0
- package/libs/ng-auto-animate/package.json +21 -0
- package/libs/ng-auto-animate/project.json +43 -0
- package/libs/ng-auto-animate/src/lib/ng-auto-animate.directive.spec.ts +2 -0
- package/libs/ng-auto-animate/src/lib/ng-auto-animate.directive.ts +45 -0
- package/libs/ng-auto-animate/src/test-setup.ts +8 -0
- package/libs/ng-auto-animate/tsconfig.json +29 -0
- package/libs/ng-auto-animate/tsconfig.lib.json +12 -0
- package/libs/ng-auto-animate/tsconfig.lib.prod.json +9 -0
- package/libs/ng-auto-animate/tsconfig.spec.json +11 -0
- package/nx.json +59 -0
- package/package.json +77 -33
- package/release.config.js +40 -0
- package/tools/tsconfig.tools.json +12 -0
- package/tsconfig.base.json +22 -0
- package/esm2022/index.mjs +0 -2
- package/esm2022/lib/ng-auto-animate.directive.mjs +0 -55
- package/esm2022/ng-auto-animate.mjs +0 -5
- package/fesm2022/ng-auto-animate.mjs +0 -61
- package/fesm2022/ng-auto-animate.mjs.map +0 -1
- package/lib/ng-auto-animate.directive.d.ts +0 -14
- /package/{index.d.ts → libs/ng-auto-animate/src/index.ts} +0 -0
package/.editorconfig
ADDED
|
@@ -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 = off
|
|
13
|
+
trim_trailing_whitespace = false
|
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
node_modules
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": ["**/*"],
|
|
4
|
+
"plugins": ["@nx"],
|
|
5
|
+
"overrides": [
|
|
6
|
+
{
|
|
7
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
8
|
+
"rules": {
|
|
9
|
+
"@nx/enforce-module-boundaries": [
|
|
10
|
+
"error",
|
|
11
|
+
{
|
|
12
|
+
"enforceBuildableLibDependency": true,
|
|
13
|
+
"allow": [],
|
|
14
|
+
"depConstraints": [
|
|
15
|
+
{
|
|
16
|
+
"sourceTag": "*",
|
|
17
|
+
"onlyDependOnLibsWithTags": ["*"]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"files": ["*.ts", "*.tsx"],
|
|
26
|
+
"extends": ["plugin:@nx/typescript"],
|
|
27
|
+
"rules": {
|
|
28
|
+
"@typescript-eslint/no-extra-semi": "error",
|
|
29
|
+
"no-extra-semi": "off"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"files": ["*.js", "*.jsx"],
|
|
34
|
+
"extends": ["plugin:@nx/javascript"],
|
|
35
|
+
"rules": {
|
|
36
|
+
"@typescript-eslint/no-extra-semi": "error",
|
|
37
|
+
"no-extra-semi": "off"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
|
|
42
|
+
"env": {
|
|
43
|
+
"jest": true
|
|
44
|
+
},
|
|
45
|
+
"rules": {}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: 'bug: X does not work when Y'
|
|
5
|
+
labels: bug, unverified
|
|
6
|
+
assignees: ajitzero
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Version Info (please complete the following information):**
|
|
27
|
+
- Angular: [e.g. v14.3.0]
|
|
28
|
+
- Node: [e.g. 18.4.0]
|
|
29
|
+
- ng-auto-animate: [e.g. 0.0.2]
|
|
30
|
+
|
|
31
|
+
**Additional context**
|
|
32
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: 'feat: Support X when Y'
|
|
5
|
+
labels: enhancement, unconfirmed
|
|
6
|
+
assignees: ajitzero
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Set to true to add reviewers to pull requests
|
|
2
|
+
addReviewers: true
|
|
3
|
+
|
|
4
|
+
# Set to true to add assignees to pull requests
|
|
5
|
+
addAssignees: true
|
|
6
|
+
|
|
7
|
+
# A list of reviewers to be added to pull requests (GitHub user name)
|
|
8
|
+
reviewers:
|
|
9
|
+
- ajitzero
|
|
10
|
+
|
|
11
|
+
# A list of keywords to be skipped the process that add reviewers if pull requests include it
|
|
12
|
+
skipKeywords:
|
|
13
|
+
- wip
|
|
14
|
+
|
|
15
|
+
# A number of reviewers added to the pull request
|
|
16
|
+
# Set 0 to add all the reviewers (default: 0)
|
|
17
|
+
numberOfReviewers: 1
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- '*'
|
|
6
|
+
- '*/*'
|
|
7
|
+
- '**'
|
|
8
|
+
- '!main'
|
|
9
|
+
jobs:
|
|
10
|
+
main:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v2
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- uses: nrwl/nx-set-shas@v3
|
|
17
|
+
- name: Install deps
|
|
18
|
+
run: npm ci --legacy-peer-deps
|
|
19
|
+
- name: Lint affected
|
|
20
|
+
run: npx nx affected -t lint
|
|
21
|
+
# - name: Test affected
|
|
22
|
+
# run: npx nx affected -t test --configuration=ci
|
|
23
|
+
- name: Build affected
|
|
24
|
+
run: npx nx affected -t build
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on: [workflow_dispatch]
|
|
7
|
+
# on:
|
|
8
|
+
# release:
|
|
9
|
+
# types: [created]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish-npm:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-node@v3
|
|
17
|
+
with:
|
|
18
|
+
node-version: 22
|
|
19
|
+
registry-url: https://registry.npmjs.org/
|
|
20
|
+
- run: npm ci
|
|
21
|
+
- run: npm publish
|
|
22
|
+
env:
|
|
23
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: RELEASE
|
|
2
|
+
|
|
3
|
+
on: [workflow_dispatch]
|
|
4
|
+
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read # for checkout
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
main:
|
|
10
|
+
name: Version and Publish
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout
|
|
14
|
+
uses: actions/checkout@v3
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
- name: Setup Node.js
|
|
18
|
+
uses: actions/setup-node@v3
|
|
19
|
+
with:
|
|
20
|
+
node-version-file: .node-version
|
|
21
|
+
- uses: nrwl/nx-set-shas@v3
|
|
22
|
+
- name: Install deps
|
|
23
|
+
run: npm ci
|
|
24
|
+
- name: Lint
|
|
25
|
+
run: npx nx run-many -t lint
|
|
26
|
+
# - name: Test
|
|
27
|
+
# run: npx nx run-many -t test --configuration=ci
|
|
28
|
+
- name: Release
|
|
29
|
+
run: npx semantic-release
|
|
30
|
+
env:
|
|
31
|
+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
32
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.node-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v22.3.0
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
## [0.2.0](https://github.com/ajitzero/ng-auto-animate/compare/v0.1.2...v0.2.0) (2023-07-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **ci:** added GitHub Action for release ([e2c021c](https://github.com/ajitzero/ng-auto-animate/commit/e2c021cf9f78d4605a3665d4c13526c882662b2c)), closes [#4](https://github.com/ajitzero/ng-auto-animate/issues/4)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Ajit Panigrahi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,124 +1,41 @@
|
|
|
1
1
|
# ng-auto-animate
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Mono-repo for the library and demo app.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Library:
|
|
6
|
+
- ⭐️ [Source & README](https://github.com/ajitzero/ng-auto-animate/tree/main/libs/ng-auto-animate) (Visit here first)
|
|
7
|
+
- [NPM](https://www.npmjs.com/package/ng-auto-animate).
|
|
8
|
+
- Demo app, deployed via Netlify:
|
|
9
|
+
- [Source](https://github.com/ajitzero/ng-auto-animate/tree/main/apps/demo)
|
|
10
|
+
- [Live Demo](https://ng-auto-animate.netlify.app/)
|
|
11
|
+
- Original library docs:
|
|
12
|
+
- ⭐️ [Source & README](https://github.com/formkit/auto-animate) (For everything else)
|
|
13
|
+
- [Live Demo](https://auto-animate.formkit.com)
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
- ✅ Custom `InjectionToken` for configuring global settings and plugins.
|
|
15
|
+
### Missing support for something?
|
|
9
16
|
|
|
10
|
-
|
|
17
|
+
Go through existing issues if your problem is already being tracked, otherwise [raise an issue!](https://github.com/ajitzero/ng-auto-animate/issues/new)
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
### License
|
|
13
20
|
|
|
14
|
-
[
|
|
15
|
-
|
|
16
|
-
If there is a simpler solution, I would be willing to submit a PR with my changes here to the original project, especially the support for global options/plugin via an `InjectionToken`.
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
1. Install the peer dependency.
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm i @formkit/auto-animate
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
1. Install this package.
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npm i ng-auto-animate
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
|
|
34
|
-
### Principle
|
|
35
|
-
|
|
36
|
-
Add the directive to the parent tag, within which DOM elements are being shown or hidden dynamically.
|
|
37
|
-
|
|
38
|
-
Adding the directive to the same tag which is being hidden will do nothing since it will look for changes in child nodes only.
|
|
39
|
-
|
|
40
|
-
### Variants
|
|
41
|
-
|
|
42
|
-
1. Default usage:
|
|
43
|
-
|
|
44
|
-
```html
|
|
45
|
-
<article auto-animate>
|
|
46
|
-
<p *ngFor="let paragraph of paragraphs">
|
|
47
|
-
{{ paragraph }}
|
|
48
|
-
</p>
|
|
49
|
-
</article>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
1. Pass one-off options:
|
|
53
|
-
|
|
54
|
-
```html
|
|
55
|
-
<article [auto-animate]="{ duration: 750 }">
|
|
56
|
-
<p *ngFor="let paragraph of paragraphs">
|
|
57
|
-
{{ paragraph }}
|
|
58
|
-
</p>
|
|
59
|
-
</article>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
1. Configure global default options:
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
// src/app/app.config.ts
|
|
66
|
-
import { ApplicationConfig } from '@angular/core';
|
|
67
|
-
import { GLOBAL_AUTO_ANIMATE_OPTIONS } from 'ng-auto-animate';
|
|
68
|
-
|
|
69
|
-
export const appConfig: ApplicationConfig = {
|
|
70
|
-
providers: [
|
|
71
|
-
{
|
|
72
|
-
provide: GLOBAL_AUTO_ANIMATE_OPTIONS,
|
|
73
|
-
useValue: {
|
|
74
|
-
duration: 750,
|
|
75
|
-
easing: 'ease-out',
|
|
76
|
-
// etc.
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
// other providers
|
|
80
|
-
],
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// main.ts
|
|
84
|
-
import { bootstrapApplication } from '@angular/platform-browser';
|
|
85
|
-
import { appConfig } from './app/app.config';
|
|
86
|
-
import { AppComponent } from './app/app.component';
|
|
87
|
-
|
|
88
|
-
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
|
89
|
-
console.error(err)
|
|
90
|
-
);
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
```html
|
|
94
|
-
<article auto-animate> <!-- Default usage -->
|
|
95
|
-
<p *ngFor="let paragraph of paragraphs">
|
|
96
|
-
{{ paragraph }}
|
|
97
|
-
</p>
|
|
98
|
-
</article>
|
|
99
|
-
```
|
|
21
|
+
[MIT](https://github.com/ajitzero/ng-auto-animate/blob/main/LICENSE).
|
|
100
22
|
|
|
101
|
-
|
|
102
|
-
> See the example here in the [demo app](https://github.com/ajitzero/ng-auto-animate/blob/0f305d97a9a30ab715b1c41304572519f0d27894/apps/demo/src/app/app.component.ts#L68) for a "bouncy" effect.
|
|
23
|
+
Built by [Ajit Panigrahi](https://github.com/ajitzero). Original library by [Justin Schroeder](https://github.com/justin-schroeder) and many contributors.
|
|
103
24
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```
|
|
25
|
+
---
|
|
26
|
+
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
|
|
107
27
|
|
|
108
|
-
|
|
109
|
-
<article [auto-animate]="customPlugin">...</article>
|
|
110
|
-
```
|
|
28
|
+
✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨
|
|
111
29
|
|
|
112
|
-
## Missing support for something?
|
|
113
30
|
|
|
114
|
-
|
|
31
|
+
## Start the demo app
|
|
115
32
|
|
|
116
|
-
|
|
33
|
+
To start the development server run `nx serve demo`. Open your browser and navigate to http://localhost:4200/. Happy coding!
|
|
117
34
|
|
|
118
|
-
|
|
35
|
+
## Want better Editor Integration?
|
|
119
36
|
|
|
120
|
-
|
|
37
|
+
Have a look at the [Nx Console extensions](https://nx.dev/nx-console). It provides autocomplete support, a UI for exploring and running tasks & generators, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.
|
|
121
38
|
|
|
122
|
-
|
|
39
|
+
## Ready to deploy?
|
|
123
40
|
|
|
124
|
-
|
|
41
|
+
Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/` directory, ready to be deployed.
|
package/apps/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../.eslintrc.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"rules": {
|
|
8
|
+
"@angular-eslint/directive-selector": [
|
|
9
|
+
"error",
|
|
10
|
+
{
|
|
11
|
+
"type": "attribute",
|
|
12
|
+
"prefix": "ngAutoAnimate",
|
|
13
|
+
"style": "camelCase"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"@angular-eslint/component-selector": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"type": "element",
|
|
20
|
+
"prefix": "ng-auto-animate",
|
|
21
|
+
"style": "kebab-case"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"files": ["*.html"],
|
|
29
|
+
"extends": ["plugin:@nx/angular-template"],
|
|
30
|
+
"rules": {}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export default {
|
|
3
|
+
displayName: 'demo',
|
|
4
|
+
preset: '../../jest.preset.js',
|
|
5
|
+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
6
|
+
coverageDirectory: '../../coverage/apps/demo',
|
|
7
|
+
transform: {
|
|
8
|
+
'^.+\\.(ts|mjs|js|html)$': [
|
|
9
|
+
'jest-preset-angular',
|
|
10
|
+
{
|
|
11
|
+
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
12
|
+
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
|
17
|
+
snapshotSerializers: [
|
|
18
|
+
'jest-preset-angular/build/serializers/no-ng-attributes',
|
|
19
|
+
'jest-preset-angular/build/serializers/ng-snapshot',
|
|
20
|
+
'jest-preset-angular/build/serializers/html-comment',
|
|
21
|
+
],
|
|
22
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "demo",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"projectType": "application",
|
|
5
|
+
"prefix": "ng-auto-animate",
|
|
6
|
+
"sourceRoot": "apps/demo/src",
|
|
7
|
+
"tags": [],
|
|
8
|
+
"targets": {
|
|
9
|
+
"build": {
|
|
10
|
+
"executor": "@angular-devkit/build-angular:browser",
|
|
11
|
+
"outputs": ["{options.outputPath}"],
|
|
12
|
+
"options": {
|
|
13
|
+
"outputPath": "dist/apps/demo",
|
|
14
|
+
"index": "apps/demo/src/index.html",
|
|
15
|
+
"main": "apps/demo/src/main.ts",
|
|
16
|
+
"tsConfig": "apps/demo/tsconfig.app.json",
|
|
17
|
+
"assets": ["apps/demo/src/favicon.ico", "apps/demo/src/assets"],
|
|
18
|
+
"styles": ["apps/demo/src/styles.scss"],
|
|
19
|
+
"scripts": []
|
|
20
|
+
},
|
|
21
|
+
"configurations": {
|
|
22
|
+
"production": {
|
|
23
|
+
"budgets": [
|
|
24
|
+
{
|
|
25
|
+
"type": "initial",
|
|
26
|
+
"maximumWarning": "500kb",
|
|
27
|
+
"maximumError": "1mb"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "anyComponentStyle",
|
|
31
|
+
"maximumWarning": "2kb",
|
|
32
|
+
"maximumError": "4kb"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"outputHashing": "all"
|
|
36
|
+
},
|
|
37
|
+
"development": {
|
|
38
|
+
"buildOptimizer": false,
|
|
39
|
+
"optimization": false,
|
|
40
|
+
"vendorChunk": true,
|
|
41
|
+
"extractLicenses": false,
|
|
42
|
+
"sourceMap": true,
|
|
43
|
+
"namedChunks": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"defaultConfiguration": "production"
|
|
47
|
+
},
|
|
48
|
+
"serve": {
|
|
49
|
+
"executor": "@angular-devkit/build-angular:dev-server",
|
|
50
|
+
"configurations": {
|
|
51
|
+
"production": {
|
|
52
|
+
"buildTarget": "demo:build:production"
|
|
53
|
+
},
|
|
54
|
+
"development": {
|
|
55
|
+
"buildTarget": "demo:build:development"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"defaultConfiguration": "development"
|
|
59
|
+
},
|
|
60
|
+
"extract-i18n": {
|
|
61
|
+
"executor": "@angular-devkit/build-angular:extract-i18n",
|
|
62
|
+
"options": {
|
|
63
|
+
"buildTarget": "demo:build"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"lint": {
|
|
67
|
+
"executor": "@nx/eslint:lint",
|
|
68
|
+
"outputs": ["{options.outputFile}"]
|
|
69
|
+
},
|
|
70
|
+
"test": {
|
|
71
|
+
"executor": "@nx/jest:jest",
|
|
72
|
+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
73
|
+
"options": {
|
|
74
|
+
"jestConfig": "apps/demo/jest.config.ts"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"serve-static": {
|
|
78
|
+
"executor": "@nx/web:file-server",
|
|
79
|
+
"options": {
|
|
80
|
+
"buildTarget": "demo:build"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|