Skip to content

Commit

Permalink
fix: handle case when no code samples are available (#18)
Browse files Browse the repository at this point in the history
* fix: handle case when no code samples are available

* chore: run npm i in bundle script
  • Loading branch information
nilslice authored Aug 8, 2024
1 parent 40b7db9 commit 56c9764
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundle.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

npm run build
npm i && npm run build

rm -rf bundle
mkdir bundle
Expand Down
2 changes: 1 addition & 1 deletion template/src/main.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
*/
<% -%>
export function <%= ex.name %>Impl(<%- ex.input ? `input: ${toTypeScriptType(ex.input)}`: null %>)<%- ex.output ? `:${toTypeScriptType(ex.output)}` : null %> {
<% if (featureFlags['stub-with-code-samples']) { -%>
<% if (featureFlags['stub-with-code-samples'] && codeSamples(ex, 'typescript').length > 0) { -%>
<%- codeSamples(ex, 'typescript')[0].source %>
<% } else { -%>
// TODO: fill out your implementation here
Expand Down

0 comments on commit 56c9764

Please sign in to comment.