Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0d0a905

Browse files
fix(schematics): include ng-add files (testing-library#221)
1 parent 97a7878 commit 0d0a905

File tree

6 files changed

+25
-4
lines changed

6 files changed

+25
-4
lines changed

‎angular.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@
134134
"command": "ng run testing-library:build-package"
135135
},
136136
{
137-
"command": "cpy ./README.md ./dist/@testing-library/angular"
137+
"command": "npm run build:schematics"
138138
},
139139
{
140-
"command": "cpy schematics/**/*.json ../../dist/@testing-library/angular --cwd=./projects/testing-library --parents"
140+
"command": "cpy ./README.md ./dist/@testing-library/angular"
141141
}
142142
]
143143
}

‎package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"nx": "nx",
77
"postinstall": "ngcc",
88
"start": "ng serve",
9+
"prebuild": "rimraf dist",
910
"build": "nx run-many --target=build --projects=testing-library,jest-utils",
11+
"build:schematics": "tsc -p ./projects/testing-library/tsconfig.schematics.json",
1012
"test": "nx run-many --target=test --all",
1113
"lint": "nx workspace-lint && ng lint",
1214
"e2e": "ng e2e",

‎projects/testing-library/ng-package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../dist/@testing-library/angular",
44
"deleteDestPath": false,
5+
"assets": ["schematics/**/*.json"],
56
"lib": {
67
"entryFile": "index.ts"
78
},
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
22

33
export default function (): Rule {
4-
return (_host: Tree, context: SchematicContext) => {
4+
return (host: Tree, context: SchematicContext) => {
55
context.logger.info(
66
`Correctly installed @testing-library/angular.
77
See our docs at https://testing-library.com/docs/angular-testing-library/intro/ to get started.`,
88
);
9+
return host;
910
};
1011
}

‎projects/testing-library/schematics/ng-add/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/schema",
33
"$id": "SchematicsTestingLibraryAngular",
4-
"title": "testing-library-anguular",
4+
"title": "testing-library-angular",
55
"type": "object",
66
"properties": {},
77
"required": []
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"strict": true,
5+
"target": "es6",
6+
"module": "commonjs",
7+
"moduleResolution": "node",
8+
"esModuleInterop": true,
9+
"resolveJsonModule": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"outDir": "../../dist/@testing-library/angular/schematics/ng-add",
12+
"removeComments": true,
13+
"skipLibCheck": true,
14+
"sourceMap": false
15+
},
16+
"include": ["schematics/**/*.ts"]
17+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /