File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed
libs/nx-angular-mf/src/builders Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 1
- import { PromiseExecutor } from '@nx/devkit' ;
1
+ import { BuilderContext , createBuilder } from '@angular-devkit/architect' ;
2
+
2
3
import { BuildExecutorSchema } from './schema' ;
3
4
4
- const runExecutor : PromiseExecutor < BuildExecutorSchema > = async ( options ) => {
5
- console . log ( 'Executor ran for build' , options ) ;
6
- return {
5
+ export async function * runBuilder (
6
+ options : BuildExecutorSchema ,
7
+ context : BuilderContext
8
+ ) {
9
+ context . logger . info ( 'Run build mf' ) ;
10
+ yield {
7
11
success : true ,
8
12
} ;
9
- } ;
13
+ }
10
14
11
- export default runExecutor ;
15
+ export default createBuilder ( runBuilder ) ;
Original file line number Diff line number Diff line change 1
- import { PromiseExecutor } from '@nx/devkit' ;
2
- import { IndexExecutorSchema } from './schema' ;
1
+ import { BuilderContext , createBuilder } from '@angular-devkit/architect' ;
3
2
4
- const runExecutor : PromiseExecutor < IndexExecutorSchema > = async ( options ) => {
5
- console . log ( 'Executor ran for build' , options ) ;
6
- return {
3
+ import { ServeExecutorSchema } from './schema' ;
4
+
5
+ export async function * runBuilder (
6
+ options : ServeExecutorSchema ,
7
+ context : BuilderContext
8
+ ) {
9
+ context . logger . info ( 'Run serve mf' ) ;
10
+ yield {
7
11
success : true ,
8
12
} ;
9
- } ;
13
+ }
10
14
11
- export default runExecutor ;
15
+ export default createBuilder ( runBuilder ) ;
You can’t perform that action at this time.
0 commit comments