Skip to content

Commit

Permalink
feat: readable fields structure (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkz authored Nov 21, 2024
1 parent 0fdfc5f commit abd6221
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ export async function rollupOptions(config) {
let frontHtml = '';
frontHtml += `<div data-at-version="${packageJson.version}" id="at-root"></div>`;
frontHtml += `<style>${files?.css?.map(({ source }) => source).join('')}</style>`;
frontHtml += `<div id="at-fields" style="display:none;">${buildFields()}</div>`;
frontHtml += `
<div id="at-fields" style="display:none;">
${buildFields()}
</div>
`;
frontHtml +=
files.js
?.map(({ code }) => `<script>${code}</script>`)
Expand Down Expand Up @@ -183,12 +187,12 @@ export async function rollupOptions(config) {
return options.fields
.map(
(field) =>
`<div id="at-field-${field}">${envValue(
` <div id="at-field-${field}">${envValue(
`{{${field}}}`,
release[config.id].notes[0].fields[field] || '',
)}</div>`,
)
.join('');
.join('\n');
}

function buildEntry() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "anki-templates",
"type": "module",
"version": "1.0.7",
"version": "1.0.8",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit abd6221

Please sign in to comment.