Skip to content

Commit 7312a1f

Browse files
committed
chore(init): init
1 parent 1aa66e6 commit 7312a1f

35 files changed

+9351
-2069
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package.json
2+
dist

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to Transloco
1+
# Contributing to Forms Manager
22

3-
🙏 We would ❤️ for you to contribute to Transloco and help make it even better than it is today!
3+
🙏 We would ❤️ for you to contribute to Forms Manager and help make it even better than it is today!
44

55
# Developing
66

@@ -14,7 +14,6 @@ Run the tests:
1414

1515
```bash
1616
npm test
17-
npm run e2e
1817
```
1918

2019
Run the playground app:

PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Please check if your PR fulfills the following requirements:
44

5-
- [ ] The commit message follows our guidelines: https://github.com/ngneat/transloco/blob/master/CONTRIBUTING.md#commit
5+
- [ ] The commit message follows our guidelines: https://github.com/ngneat/forms-manager/blob/master/CONTRIBUTING.md#commit
66
- [ ] Tests for the changes have been added (for bug fixes / features)
77
- [ ] Docs have been added / updated (for bug fixes / features)
88

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![coc-badge](https://img.shields.io/badge/codeof-conduct-ff69b4.svg?style=flat-square)]()
1111
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e5079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
1212
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
13-
[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)
13+
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
1414

1515
<hr />
1616

@@ -24,17 +24,19 @@ This is powerful, as it gives you the following abilities:
2424

2525
The goal in creating this was to work with the existing Angular form ecosystem, and save you the trouble of learning a new API. Let’s see how it works:
2626

27+
First, install the library:
28+
29+
## Installation
30+
31+
```
32+
npm i @ngenat/forms-manager
33+
```
34+
35+
Then, create a component with a form:
36+
2737
```ts
2838
import { NgFormsManager } from '@ngneat/forms-manager';
2939

30-
export interface FormsState {
31-
onboarding: {
32-
name: string;
33-
age: number;
34-
city: string;
35-
};
36-
}
37-
3840
@Component({
3941
template: `
4042
<form [formGroup]="onboardingForm">
@@ -46,7 +48,7 @@ export interface FormsState {
4648
})
4749
export class OnboardingComponent {
4850
constructor(
49-
private formsManager: NgFormsManager<FormsState>,
51+
private formsManager: NgFormsManager,
5052
private builder: FormBuilder
5153
) {}
5254

angular.json

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,8 @@
2222
"main": "src/main.ts",
2323
"polyfills": "src/polyfills.ts",
2424
"tsConfig": "src/tsconfig.app.json",
25-
"assets": [
26-
"src/favicon.ico",
27-
"src/assets"
28-
],
29-
"styles": [
30-
"src/styles.scss"
31-
],
25+
"assets": ["src/favicon.ico", "src/assets"],
26+
"styles": ["src/styles.scss"],
3227
"scripts": []
3328
},
3429
"configurations": {
@@ -82,26 +77,16 @@
8277
"polyfills": "src/polyfills.ts",
8378
"tsConfig": "src/tsconfig.spec.json",
8479
"karmaConfig": "src/karma.conf.js",
85-
"styles": [
86-
"src/styles.scss"
87-
],
80+
"styles": ["src/styles.scss"],
8881
"scripts": [],
89-
"assets": [
90-
"src/favicon.ico",
91-
"src/assets"
92-
]
82+
"assets": ["src/favicon.ico", "src/assets"]
9383
}
9484
},
9585
"lint": {
9686
"builder": "@angular-devkit/build-angular:tslint",
9787
"options": {
98-
"tsConfig": [
99-
"src/tsconfig.app.json",
100-
"src/tsconfig.spec.json"
101-
],
102-
"exclude": [
103-
"**/node_modules/**"
104-
]
88+
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
89+
"exclude": ["**/node_modules/**"]
10590
}
10691
}
10792
}
@@ -127,13 +112,44 @@
127112
"builder": "@angular-devkit/build-angular:tslint",
128113
"options": {
129114
"tsConfig": "e2e/tsconfig.e2e.json",
130-
"exclude": [
131-
"**/node_modules/**"
132-
]
115+
"exclude": ["**/node_modules/**"]
116+
}
117+
}
118+
}
119+
},
120+
"@ngneat/forms-manager": {
121+
"root": "projects/ngneat/forms-manager",
122+
"sourceRoot": "projects/ngneat/forms-manager/src",
123+
"projectType": "library",
124+
"prefix": "lib",
125+
"architect": {
126+
"build": {
127+
"builder": "@angular-devkit/build-ng-packagr:build",
128+
"options": {
129+
"tsConfig": "projects/ngneat/forms-manager/tsconfig.lib.json",
130+
"project": "projects/ngneat/forms-manager/ng-package.json"
131+
}
132+
},
133+
"test": {
134+
"builder": "@angular-devkit/build-angular:karma",
135+
"options": {
136+
"main": "projects/ngneat/forms-manager/src/test.ts",
137+
"tsConfig": "projects/ngneat/forms-manager/tsconfig.spec.json",
138+
"karmaConfig": "projects/ngneat/forms-manager/karma.conf.js"
139+
}
140+
},
141+
"lint": {
142+
"builder": "@angular-devkit/build-angular:tslint",
143+
"options": {
144+
"tsConfig": [
145+
"projects/ngneat/forms-manager/tsconfig.lib.json",
146+
"projects/ngneat/forms-manager/tsconfig.spec.json"
147+
],
148+
"exclude": ["**/node_modules/**"]
133149
}
134150
}
135151
}
136152
}
137153
},
138154
"defaultProject": "ngneat-forms-manager"
139-
}
155+
}

commitlint.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* To check all configuration options, please visit
3+
* https://commitlint.js.org/#/reference-rules
4+
*/
5+
module.exports = {
6+
extends: ['@commitlint/config-conventional'],
7+
};

0 commit comments

Comments
 (0)