Skip to content

Commit 3f13c90

Browse files
committed
refactor: add Prettier, rxjs-tslint-rules
- fix lint builder config - use NodeJS 14 by default - set engines to NodeJS 12+ and NPM 6+
1 parent 6759ffe commit 3f13c90

35 files changed

+2910
-1459
lines changed

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
14

Diff for: .prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package.json
2+
dist

Diff for: README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Angular Material, the Angular Component Dev Kit (CDK), and the Angular Flex Layo
1515
Additionally, we provide guidance on using pure CSS Grid and Flexbox for layout, migration of
1616
theming features, services, typography, and more.
1717

18-
Learn more in the [AngularJS Material Migration Guide](https://material.angularjs.org/latest/migration).
18+
Learn more in the [AngularJS Material Migration Guide](https://material.angularjs.org/latest/migration).
1919

2020
## Caveats found so far
2121

2222
- Different `selector` formatting and conversions between AngularJS and Angular. It depends on which
23-
is referring to the component, not which the component is build for.
23+
is referring to the component, not which the component is build for.
2424
- AngularJS referring to any component: `appComponent`
2525
- Angular referring to any component: `app-component`
2626
- ngUpgrade projects that work on StackBlitz, don’t work in the CLI and vice versa.
@@ -38,6 +38,7 @@ Learn more in the [AngularJS Material Migration Guide](https://material.angularj
3838
- [Example](https://github.com/Splaktar/angularjs-angular-material-hybrid-demo/blob/a77f0567b1795529c1859f1b70fafc5ab5e998be/src/angularjs/tabs.component.ts#L7-L11)
3939

4040
### AngularJS Components w/ templateUrl
41+
4142
`templateUrl` in AngularJS components does not work out of the box with Angular CLI.
4243
The following steps will configure a module that loads `$templateCache` at build time:
4344

Diff for: angular.json

+3-9
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,8 @@
2929
"index": "src/index.html",
3030
"main": "src/main.ts",
3131
"tsConfig": "src/tsconfig.app.json",
32-
"assets": [
33-
"src/favicon.ico",
34-
"src/assets"
35-
],
36-
"styles": [
37-
"src/styles.scss",
38-
"node_modules/angular-material/angular-material.scss"
39-
],
32+
"assets": ["src/favicon.ico", "src/assets"],
33+
"styles": ["src/styles.scss", "node_modules/angular-material/angular-material.scss"],
4034
"scripts": []
4135
},
4236
"configurations": {
@@ -90,7 +84,7 @@
9084
"lint": {
9185
"builder": "@angular-devkit/build-angular:tslint",
9286
"options": {
93-
"tsConfig": [],
87+
"tsConfig": ["src/tsconfig.app.json"],
9488
"exclude": []
9589
}
9690
},

Diff for: firebase.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
{
44
"target": "app",
55
"public": "dist/",
6-
"ignore": [
7-
"firebase.json",
8-
"**/.*",
9-
"**/node_modules/**"
10-
],
6+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
117
"appAssociation": "AUTO",
128
"rewrites": [
139
{

Diff for: gulpfile.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ const htmlmin = require('gulp-htmlmin');
33
const templateCache = require('gulp-angular-templatecache');
44

55
gulp.task('templates', () => {
6-
return gulp.src('src/angularjs/**/*.html')
7-
.pipe(htmlmin({collapseWhitespace: true}))
8-
.pipe(templateCache('templates.js', {standalone: true}))
9-
.pipe(gulp.dest('src/angularjs/templates'));
6+
return gulp
7+
.src('src/angularjs/**/*.html')
8+
.pipe(htmlmin({ collapseWhitespace: true }))
9+
.pipe(templateCache('templates.js', { standalone: true }))
10+
.pipe(gulp.dest('src/angularjs/templates'));
1011
});

0 commit comments

Comments
 (0)