Skip to content

Commit

Permalink
⬆️ update deps and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath committed May 17, 2024
1 parent df0c1ac commit 92d6198
Show file tree
Hide file tree
Showing 5 changed files with 2,144 additions and 2,224 deletions.
2 changes: 1 addition & 1 deletion examples/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
</script>
</head>
<body>
<json-resume gist_id="9e7a7ceb9425336c6aa08d58afb63b8d"></json-resume>
<json-resume gist_id="54682f0aa17453d46cdc74bdef3172a3"></json-resume>
</body>
</html>
33 changes: 33 additions & 0 deletions examples/browser/stylesheet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Scott Nath's Resume</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<script type="importmap">
{
"imports": {
"lit": "https://esm.run/lit",
"@lit/task": "https://esm.run/@lit/task"
}
}
</script>
<script type="module">
import 'https://esm.run/jsonresume-component'
// imports a stylesheet to a variable
import evenTheme from 'https://unpkg.com/[email protected]/dist/style.css' with { type: "css" };
// converts stylesheet to a string
const themeString = Array.from(evenTheme.cssRules).map(rule => rule.cssText).join('\n')
// get the json-resume instance
const jsonresume = document.getElementById('jsonresume');
// configure the stylesheet property
jsonresume.stylesheet = themeString
</script>
</head>
<body>
<json-resume
id="jsonresume"
gist_id="54682f0aa17453d46cdc74bdef3172a3"
></json-resume>
</body>
</html>
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,17 @@
"@storybook/addon-links": "^8.1.1",
"@storybook/blocks": "^8.1.1",
"@storybook/test": "^8.1.1",
"@storybook/test-runner": "^0.18.0",
"@storybook/test-runner": "^0.18.1",
"@storybook/web-components": "^8.1.1",
"@storybook/web-components-vite": "^8.1.1",
"chromatic": "^11.3.5",
"commander": "^12.0.0",
"esbuild": "^0.21.2",
"esbuild": "^0.21.3",
"esbuild-plugin-inline-import": "^1.0.4",
"fs-extra": "^11.2.0",
"html-validate": "8.18.2",
"jsdoc-to-markdown": "^8.0.1",
"json-schema-to-typescript": "14.0.4",
"micromark": "^4.0.0",
"profile-components": "^0.4.1",
"storybook": "^8.1.1",
"storybook-addon-render-modes": "^0.0.11",
Expand All @@ -76,7 +75,7 @@
"customElements": "custom-elements.json",
"dependencies": {
"@lit/task": "^1.0.0",
"jsonresume-theme-microdata": "^0.0.6-next.7",
"jsonresume-theme-microdata": "^0.0.7",
"lit": "^3.1.3"
}
}
11 changes: 5 additions & 6 deletions src/web-component.stories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { html } from 'lit';
import {micromark} from 'micromark'
import { microdata } from '@cucumber/microdata';
import { expect } from '@storybook/test';
import { within as shadowWithin } from 'shadow-dom-testing-library';
Expand All @@ -22,9 +21,9 @@ const changeSummary = (summary, json = resumeFixtureLorem) => {
...json,
basics: {
...json.basics,
summary: micromark(`**${summary}**
summary: `**${summary}**
${json.basics.summary}`),
${json.basics.summary}`,
}
}
}
Expand All @@ -37,13 +36,13 @@ export default {

export const GistID = {
args: {
gist_id: '9e7a7ceb9425336c6aa08d58afb63b8d'
gist_id: '54682f0aa17453d46cdc74bdef3172a3'
},
};

export const JsonUrl = {
args: {
json_url: 'https://gist.githubusercontent.com/scottnath/9e7a7ceb9425336c6aa08d58afb63b8d/raw'
json_url: 'https://gist.githubusercontent.com/scottnath/54682f0aa17453d46cdc74bdef3172a3/raw/resume.json'
},
};

Expand Down Expand Up @@ -207,6 +206,6 @@ export const BadGist = {

export const BadUrl = {
args: {
json_url: 'https://gist.githubusercontent.com/scottnath/9e7a7ceb9425336c6aa08d58afb63b8d'
json_url: 'https://gist.githubusercontent.com/scottnath/54682f0aa17453d46cdc74bdef3172a3'
},
};
Loading

0 comments on commit 92d6198

Please sign in to comment.