-
Notifications
You must be signed in to change notification settings - Fork 2
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
a10af3c
commit f03792a
Showing
11 changed files
with
68 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
--- | ||
force: true | ||
--- | ||
|
||
# Heart {{ name | capitalize }} | ||
|
||
_Heart {{ name | capitalize }}_ is a template module which goal is to serve as a codebase for new module creation. | ||
|
||
To create a new module, see the _[Create a new module](../../docs/CREATE_NEW_MODULE.md)_ guide. |
File renamed without changes.
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
8 changes: 7 additions & 1 deletion
8
modules/tpl/src/TplModule.ts → ...s/package/src/[name|pascal_case]Module.ts
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,12 @@ | ||
{% set class_name = name ~ 'Module' | pascal_case %} | ||
|
||
--- | ||
to: src//index.ts | ||
--- | ||
|
||
import type { ModuleIndex, ModuleMetadata } from "@fabernovel/heart-common" | ||
import { {{ class_name }} } from "./{{ class_name }}.js" | ||
|
||
export const initialize: ModuleIndex["initialize"] = (moduleMetadata: ModuleMetadata, verbose: boolean) => { | ||
return new {{ class_name }}(moduleMetadata, verbose) | ||
} |
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,31 @@ | ||
# https://moonrepo.dev/docs/config/template | ||
$schema: 'https://moonrepo.dev/schemas/template.json' | ||
|
||
# REQUIRED: Name of the template in a human readable format. | ||
title: 'Title' | ||
|
||
# REQUIRED: Description of what the template is for and other relevant information. | ||
description: 'Description of the template.' | ||
|
||
destination: modules/[name | slugify] | ||
|
||
# Mapping of variables that will be interpolated and rendered within template files. | ||
# Users will be prompted to provide a value when running the generator. | ||
variables: | ||
name: | ||
prompt: 'Name of your package' | ||
type: 'string' | ||
required: true | ||
order: 1 | ||
type: | ||
prompt: 'What does your module do?' | ||
type: 'enum' | ||
values: | ||
- label: Analyzes URLs using a third-party service | ||
value: analysis | ||
- label: Do thing with the results of the analysis | ||
value: listener | ||
- label: Trigger an analysis | ||
value: runner | ||
default: analysis | ||
order: 2 |
File renamed without changes.
File renamed without changes.
File renamed without changes.