Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ng-schematics): Use WireIt for builds and tests #9356

Merged
merged 2 commits into from Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -20,7 +20,8 @@ generated/
/.cache/

# IDE Artifacts
.vscode
.vscode/*
!.vscode/extensions.json
.devcontainer

# Misc
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Expand Up @@ -21,7 +21,8 @@ generated/
/.cache/

# IDE Artifacts
.vscode
.vscode/*
!.vscode/extensions.json
.devcontainer

# Misc
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
@@ -0,0 +1,3 @@
{
"recommendations": ["google.wireit"]
}
54 changes: 47 additions & 7 deletions packages/ng-schematics/package.json
Expand Up @@ -3,13 +3,53 @@
"version": "0.1.0",
"description": "Puppeteer Angular schematics",
"scripts": {
"copy": "node copySchemaFiles.js",
"clean": "tsc -b --clean && rimraf lib",
"dev": "run-s clean copy && tsc -p tsconfig.json --watch",
"build": "run-s build:*",
"build:schematics": "npm run copy && tsc -p tsconfig.json",
"build:test": "tsc -p tsconfig.spec.json",
"test": "run-s clean build && mocha"
"dev": "npm run build --watch",
"dev:test": "npm run test --watch",
"copy": "wireit",
"build": "wireit",
"clean": "tsc --build --clean && rimraf lib",
"clean:test": "rimraf test/build",
"test": "wireit"
},
"wireit": {
"copy": {
"clean": "if-file-deleted",
"command": "node copySchemaFiles.js",
"files": [
"src/**/files/**",
"src/**/*.json"
],
"output": [
"lib/**/files/**",
"lib/**/*.json"
],
"dependencies": [
"clean"
]
},
"build": {
"command": "tsc -b",
"files": [
"src/**/*.ts",
"!src/**/files",
"!src/**/*.json"
],
"output": [
"lib/**",
"!lib/**/files",
"!lib/**/*.json"
],
"dependencies": [
"copy"
]
},
"test": {
"command": "mocha",
"dependencies": [
"clean:test",
"build"
]
}
},
"keywords": [
"angular",
Expand Down
3 changes: 2 additions & 1 deletion packages/ng-schematics/tsconfig.json
Expand Up @@ -14,5 +14,6 @@
"target": "ES6"
},
"include": ["src/**/*"],
"exclude": ["src/**/files/**/*"]
"exclude": ["src/**/files/**/*"],
"references": [{"path": "./tsconfig.spec.json"}]
}
2 changes: 1 addition & 1 deletion packages/ng-schematics/tsconfig.spec.json
Expand Up @@ -5,6 +5,6 @@
"outDir": "test/build/",
"types": ["node", "mocha"]
},
"include": ["test/**/*"],
"include": ["test/src/**/*"],
"exclude": ["test/build/**/*"]
}