Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: readable fields structure #9

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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