diff --git a/examples/templates/example.html b/examples/templates/example.html index 5a0493d975..6e894f0ec7 100644 --- a/examples/templates/example.html +++ b/examples/templates/example.html @@ -170,7 +170,9 @@ - {{{ js.tag }}} +{{#each js.scripts}} + +{{/each}} - `, + scripts: [`${this.common}.js`, jsName], source: jsSource, }; @@ -339,7 +335,7 @@ export default class ExampleBuilder { ); } - const pkg = await getPackageInfo(); + data.olVersion = pkg.version; data.pkgJson = JSON.stringify( { name: data.name, @@ -369,14 +365,13 @@ export default class ExampleBuilder { if (cssSource) { data.css = { tag: ``, - source: cssSource, + source: this.ensureNewLineAtEnd(cssSource), }; assets[cssName] = cssSource; } // add additional resources if (data.resources) { - const pkg = await getPackageInfo(); const localResources = []; const remoteResources = []; data.resources.forEach((resource) => {