Skip to content

Commit

Permalink
ci: new true builder as a private package (#12390)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hansl authored and vikerman committed Sep 27, 2018
1 parent fabcac1 commit 8150838
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .monorepo.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"version": "0.9.0-beta.4",
"hash": "a9b1f213a4069f789d20021bda616775"
},
"@_/builders": {
"version": "0.9.0-beta.4",
"hash": ""
},
"devkit": {
"version": "0.9.0-beta.4",
"hash": "30ac66398ef7b4f7a5dbd3192d24c665"
Expand Down
10 changes: 10 additions & 0 deletions packages/_/builders/builders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "../architect/src/builders-schema.json",
"builders": {
"true": {
"class": "./src/true",
"schema": "./src/noop-schema.json",
"description": "Always succeed."
}
}
}
12 changes: 12 additions & 0 deletions packages/_/builders/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@_/builders",
"version": "0.0.0",
"description": "CLI tool for Angular",
"main": "src/index.js",
"typings": "src/index.d.ts",
"builders": "builders.json",
"private": true,
"dependencies": {
"rxjs": "6.3.3"
}
}
4 changes: 4 additions & 0 deletions packages/_/builders/src/noop-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "http://json-schema.org/schema",
"type": "object"
}
20 changes: 20 additions & 0 deletions packages/_/builders/src/true.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Observable, of } from 'rxjs';

export class TrueBuilder {
constructor() {}

run(): Observable<{ success: boolean }> {
return of({
success: true,
});
}
}

export default TrueBuilder;

0 comments on commit 8150838

Please sign in to comment.