-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue/116 Generate compile files on Compile command
- Loading branch information
Jaime Terreu
authored and
Jaime Terreu
committed
Sep 18, 2024
1 parent
db2cdb8
commit a98c089
Showing
10 changed files
with
251 additions
and
43 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/djelm/cookiecutters/entrypoint_template/cookiecutter.json
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,8 @@ | ||
{ | ||
"base_name": "", | ||
"base_path": "", | ||
"dir": "", | ||
"program_name": "", | ||
"scope": "", | ||
"view_name": "" | ||
} |
26 changes: 26 additions & 0 deletions
26
..._template/{{cookiecutter.dir}}/{{cookiecutter.base_name}}{{cookiecutter.program_name}}.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Do not manually edit this file, it was auto-generated by djelm | ||
https://github.com/Confidenceman02/djelm | ||
*/ | ||
import defo from "@icelab/defo"; | ||
|
||
const views = { | ||
djelmwidget{{cookiecutter.view_name}}: async (el: HTMLElement, data: any) => { | ||
//@ts-ignore | ||
const { Elm } = await import("../../../src/{{cookiecutter.base_path}}{{cookiecutter.program_name}}.elm") | ||
|
||
const app = Elm.Widgets.{{cookiecutter.program_name}}.init({ | ||
node: el, | ||
flags: data, | ||
}); | ||
|
||
return { | ||
// Called whenever the value of the `djelm` attribute changes | ||
update: (newData, oldData) => {}, | ||
// Called when the element (or its djelm attribute) is removed from the DOM | ||
destroy: () => {}, | ||
}; | ||
} | ||
} | ||
|
||
defo({ views, prefix: "{{cookiecutter.scope}}" }) |
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
Oops, something went wrong.