bluehawk
Namespaces
Enumerations
Classes
Interfaces
- ActionArgs
- ActionReporter
- AnyTag
- BlockCommentTokenConfiguration
- BlockTagNode
- CheckArgs
- CheckResult
- CopyArgs
- EmphasizeRange
- EmphasizeSourceAttributes
- IParser
- IVisitor
- LanguageSpecification
- LineTagNode
- ListStatesArgs
- ListTagArgs
- ParseResult
- PayloadQuery
- PluginArgs
- ProcessOptions
- ProcessRequest
- Project
- PushParserPayload
- PushParserTokenConfiguration
- SnipArgs
- VisitorResult
Type Aliases
AnyTagNode
Ƭ AnyTagNode: LineTagNode
| BlockTagNode
Defined in
BinaryFileEvent
Ƭ BinaryFileEvent: FileEvent
Defined in
bluehawk/actions/ActionReporter.ts:51
BluehawkErrorsEvent
Ƭ BluehawkErrorsEvent: FileEvent
& { errors
: BluehawkError
[] }
Defined in
bluehawk/actions/ActionReporter.ts:90
CopyArgsCli
Ƭ CopyArgsCli: Omit
<CopyArgs
, "rename"
> & { rename?
: string
}
Defined in
FileErrorEvent
Ƭ FileErrorEvent: FileEvent
& { error
: Error
}
Defined in
bluehawk/actions/ActionReporter.ts:82
FileEvent
Ƭ FileEvent: Object
Type declaration
Name | Type |
---|---|
inputPath | string |
Defined in
bluehawk/actions/ActionReporter.ts:47
FileParsedEvent
Ƭ FileParsedEvent: FileEvent
& { parseResult
: ParseResult
}
Defined in
bluehawk/actions/ActionReporter.ts:53
FileWrittenEvent
Ƭ FileWrittenEvent: FileEvent
& { outputPath
: string
; type
: "text"
| "binary"
}
Defined in
bluehawk/actions/ActionReporter.ts:57
IdRequiredAttributes
Ƭ IdRequiredAttributes: Object
Type declaration
Name | Type |
---|---|
id | string [] |
Defined in
IdsRequiredAttributes
Ƭ IdsRequiredAttributes: Object
Type declaration
Name | Type |
---|---|
id | string [] |
Defined in
IdsUnusedEvent
Ƭ IdsUnusedEvent: Object
Type declaration
Name | Type |
---|---|
ids | string [] |
paths | string [] |
Defined in
bluehawk/actions/ActionReporter.ts:73
Listener
Ƭ Listener: (result
: ProcessResult
) => void
| Promise
<void
>
Type declaration
▸ (result
): void
| Promise
<void
>
Parameters
Name | Type |
---|---|
result | ProcessResult |
Returns
void
| Promise
<void
>
Defined in
bluehawk/processor/Processor.ts:102
LoadedPlugin
Ƭ LoadedPlugin: Plugin
& { path
: string
}
Defined in
NoAttributes
Ƭ NoAttributes: null
Defined in
OnBinaryFileFunction
Ƭ OnBinaryFileFunction: (file
: string
) => void
| Promise
<void
>
Type declaration
▸ (file
): void
| Promise
<void
>
Parameters
Name | Type |
---|---|
file | string |
Returns
void
| Promise
<void
>
Defined in
bluehawk/OnBinaryFileFunction.ts:1
ParserNotFoundEvent
Ƭ ParserNotFoundEvent: FileEvent
& { error
: Error
}
Defined in
bluehawk/actions/ActionReporter.ts:78
Plugin
Ƭ Plugin: Object
A plugin is a Node module that exports a register() function.
A plugin can be a simple JS file or a transpiled Node module, as long as it exports the register() function:
// MyPlugin.js
exports.register = (args) => {
// Add a new CLI option
args.yargs.option("myNewOption", { string: true });
// Add Bluehawk listener
args.bluehawk.subscribe((result) => {
console.log("Plugin called for file", result.document.path);
});
};
You can then call bluehawk --plugin /path/to/MyPlugin.js
to use the plugin.
Type declaration
Name | Type |
---|---|
register | (args : PluginArgs ) => void | Promise <void > |
Defined in
StateNotFoundEvent
Ƭ StateNotFoundEvent: Object
Type declaration
Name | Type |
---|---|
paths | string [] |
state | string |
Defined in
bluehawk/actions/ActionReporter.ts:68
StatesFoundEvent
Ƭ StatesFoundEvent: Object
Type declaration
Name | Type |
---|---|
action | string |
paths | string [] |
statesFound | string [] |
Defined in
bluehawk/actions/ActionReporter.ts:62
WithActionReporter
Ƭ WithActionReporter<T
>: T
& { reporter
: ActionReporter
}
Creates a type with a required ActionReporter field.
Type parameters
Name |
---|
T |
Defined in
bluehawk/actions/ActionReporter.ts:7
WriteFailedEvent
Ƭ WriteFailedEvent: FileWrittenEvent
& { error
: Error
}
Defined in
bluehawk/actions/ActionReporter.ts:86
Variables
EmphasizeTag
• Const
EmphasizeTag: AnyTag
Defined in
bluehawk/tags/EmphasizeTag.ts:19
IdRequiredAttributesSchema
• Const
IdRequiredAttributesSchema: JSONSchemaType
<IdRequiredAttributes
>
Defined in
IdsRequiredAttributesSchema
• Const
IdsRequiredAttributesSchema: JSONSchemaType
<IdsRequiredAttributes
>
Defined in
NoAttributesSchema
• Const
NoAttributesSchema: JSONSchemaType
<NoAttributes
>
Defined in
RENAME_ERR
• Const
RENAME_ERR: "Rename flag does not support specifying a path argument. If you would like to see this functionality, please submit an issue or pull request."
Defined in
RemoveTag
• Const
RemoveTag: AnyTag
Defined in
ReplaceTag
• Const
ReplaceTag: AnyTag
Defined in
bluehawk/tags/ReplaceTag.ts:10
SnippetTag
• Const
SnippetTag: AnyTag
Defined in
bluehawk/tags/SnippetTag.ts:65
StateRemoveTag
• Const
StateRemoveTag: AnyTag
Defined in
bluehawk/tags/StateRemoveTag.ts:9
StateTag
• Const
StateTag: AnyTag
Defined in
System
• Const
System: Object
Type declaration
Name | Type |
---|---|
fs | __module |
useJsonFs | (directoryJson : DirectoryJSON ) => void |
useMemfs | () => void |
useRealfs | () => void |
Defined in
UncommentTag
• Const
UncommentTag: AnyTag
Defined in
bluehawk/tags/UncommentTag.ts:6
Functions
check
▸ check(args
): Promise
<void
>
Parameters
Name | Type |
---|---|
args | WithActionReporter <CheckArgs > |
Returns
Promise
<void
>
Defined in
commandDir
▸ commandDir<T
>(argv
, directory
, options?
): yargs.Argv
<T
>
Loads a directory as yargs commands while supporting TypeScript for development. See yargs.commandDir().
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
argv | Argv <T > |
directory | string |
options? | RequireDirectoryOptions |
Returns
yargs.Argv
<T
>
Defined in
conditionalForkWithState
▸ conditionalForkWithState(request
): void
If we are not processing in a state file, fork a file for each state listed in our tag node.
Parameters
Name | Type |
---|---|
request | ProcessRequest <BlockTagNode > |
Returns
void