Skip to content

Commit 8150838

Browse files
hanslvikerman
authored andcommitted
ci: new true builder as a private package (angular#12390)
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 fabcac1 commit 8150838

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

.monorepo.json

+4
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

+10
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

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
"dependencies": {
10+
"rxjs": "6.3.3"
11+
}
12+
}
+4
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

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 { Observable, of } from 'rxjs';
9+
10+
export class TrueBuilder {
11+
constructor() {}
12+
13+
run(): Observable<{ success: boolean }> {
14+
return of({
15+
success: true,
16+
});
17+
}
18+
}
19+
20+
export default TrueBuilder;

0 commit comments

Comments
 (0)