Skip to content

Commit

Permalink
feat: update templates for saucer 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Aug 10, 2024
1 parent f02b3c8 commit c4237b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": [
"saucer"
],
"version": "4.2.3",
"version": "5.0.0",
"license": "MIT",
"author": "Curve (https://github.com/Curve)",
"type": "module",
Expand Down
8 changes: 5 additions & 3 deletions src/templates/all.eta
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once
#include <map>

#include <string>
#include <unordered_map>

#include <saucer/webview.hpp>

<% it.files.forEach(function(file){ %>
Expand All @@ -11,10 +13,10 @@ namespace saucer::embedded
{
inline auto all()
{
std::map<std::string, embedded_file> rtn;
std::unordered_map<std::string, embedded_file> rtn;

<% it.files.forEach(function(file){ %>
rtn.emplace("<%= file.path %>", embedded_file{"<%= file.mime %>", <%= file.name %>});
rtn.emplace("<%= file.path %>", embedded_file{saucer::stash<>::view(<%= file.name %>), "<%= file.mime %>"});
<% }) %>

return rtn;
Expand Down
1 change: 1 addition & 0 deletions src/templates/embed.eta
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once

#include <array>
#include <cstdint>

Expand Down

0 comments on commit c4237b0

Please sign in to comment.