-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
979b1ba
commit 4229c73
Showing
7 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"executors": { | ||
"echo": { | ||
"implementation": "./src/executors/echo/executor", | ||
"schema": "./src/executors/echo/schema.json", | ||
"description": "echo executor" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ExecutorContext } from '@nx/devkit'; | ||
|
||
import { EchoExecutorSchema } from './schema'; | ||
import executor from './executor'; | ||
|
||
const options: EchoExecutorSchema = {}; | ||
const context: ExecutorContext = { | ||
root: '', | ||
cwd: process.cwd(), | ||
isVerbose: false, | ||
}; | ||
|
||
describe('Echo Executor', () => { | ||
it('can run', async () => { | ||
const output = await executor(options, context); | ||
expect(output.success).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { PromiseExecutor } from '@nx/devkit'; | ||
import { EchoExecutorSchema } from './schema'; | ||
|
||
const runExecutor: PromiseExecutor<EchoExecutorSchema> = async (options) => { | ||
console.log('Executor ran for Echo', options); | ||
return { | ||
success: true, | ||
}; | ||
}; | ||
|
||
export default runExecutor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export interface EchoExecutorSchema {} // eslint-disable-line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/schema", | ||
"version": 2, | ||
"title": "Echo executor", | ||
"description": "", | ||
"type": "object", | ||
"properties": {}, | ||
"required": [] | ||
} |