Skip to content

Commit 27c34f1

Browse files
committed
ci: new true builder as a private package
This is useful for testing things with a builder that always succeeds. In a project, use "devkit-admin build && npm install $DEVKIT_PATH/dist/___builder.tgz" and you have a "@_/builders" package that contains a true builder. This is not published on NPM so I scope this as ci.
1 parent 4d46c4a commit 27c34f1

File tree

5 files changed

+53
-0
lines changed

5 files changed

+53
-0
lines changed

.monorepo.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
"version": "0.9.0-beta.4",
4646
"hash": "a9b1f213a4069f789d20021bda616775"
4747
},
48+
"@_/builders": {
49+
"version": "0.9.0-beta.4",
50+
"hash": ""
51+
},
4852
"devkit": {
4953
"version": "0.9.0-beta.4",
5054
"hash": "30ac66398ef7b4f7a5dbd3192d24c665"

packages/_/builders/builders.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "../architect/src/builders-schema.json",
3+
"builders": {
4+
"true": {
5+
"class": "./src/true",
6+
"schema": "./src/noop-schema.json",
7+
"description": "Always succeed."
8+
}
9+
}
10+
}

packages/_/builders/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "@_/builders",
3+
"version": "0.0.0",
4+
"description": "CLI tool for Angular",
5+
"main": "src/index.js",
6+
"typings": "src/index.d.ts",
7+
"builders": "builders.json",
8+
"private": true
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "http://json-schema.org/schema",
3+
"type": "object"
4+
}

packages/_/builders/src/true.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
import {
9+
Builder,
10+
BuilderConfiguration,
11+
BuilderContext,
12+
BuildEvent
13+
} from '@angular-devkit/architect';
14+
import { Observable, of } from 'rxjs';
15+
16+
export class TrueBuilder implements Builder<{}> {
17+
constructor(public context: BuilderContext) {}
18+
19+
run(builderConfig: BuilderConfiguration<{}>): Observable<BuildEvent> {
20+
return of({
21+
success: true,
22+
});
23+
}
24+
}
25+
26+
export default TrueBuilder;

0 commit comments

Comments
 (0)