-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from hatemhosny/releases/v0.3.0
Prepare release v0.3.0
- Loading branch information
Showing
47 changed files
with
1,522 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: comment | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['livecodes'] # the workflow that created the artifact | ||
types: | ||
- completed | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
if: > | ||
github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- uses: live-codes/pr-comment-from-artifact@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: livecodes | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build_and_prepare: | ||
runs-on: ubuntu-latest | ||
name: Generate Playgrounds | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and generate | ||
uses: live-codes/preview-in-livecodes@v1 | ||
with: | ||
install-command: 'npm install' | ||
build-command: 'npm run build' | ||
base-url: 'https://deploy-preview-{{LC::PR}}--racingbars.netlify.app/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"title": "JavaScript (ESM)", | ||
"activeEditor": "script", | ||
"markup": { | ||
"language": "html", | ||
"content": "<div id=\"race\">Loading...</div>" | ||
}, | ||
"style": { | ||
"language": "css", | ||
"content": "#race {\n height: 80vh;\n}\n" | ||
}, | ||
"script": { | ||
"language": "javascript", | ||
"content": "import { race } from \"racing-bars\";\n\n/** @type {import('racing-bars').Options} */\nconst options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n};\n\nrace(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n" | ||
}, | ||
"customSettings": { | ||
"imports": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", | ||
"racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", | ||
"racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" | ||
}, | ||
"types": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"title": "JavaScript (UMD)", | ||
"activeEditor": "script", | ||
"markup": { | ||
"language": "html", | ||
"content": "<div id=\"race\">Loading...</div>\n\n<script src=\"{{LC::TO_URL(./lib/racing-bars.umd.js)}}\"></script>" | ||
}, | ||
"style": { | ||
"language": "css", | ||
"content": "#race {\n height: 80vh;\n}\n" | ||
}, | ||
"script": { | ||
"language": "javascript", | ||
"content": "const options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n};\n\nracingBars.race(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n" | ||
}, | ||
"customSettings": { | ||
"imports": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", | ||
"racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", | ||
"racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" | ||
}, | ||
"types": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "React", | ||
"activeEditor": "script", | ||
"style": { | ||
"language": "css", | ||
"content": ".race {\n height: 80vh;\n}\n" | ||
}, | ||
"script": { | ||
"language": "jsx", | ||
"content": "import RacingBars from \"racing-bars/react\";\n\nexport default function App() {\n /** @type {import('racing-bars').Options} */\n const options = {\n dataUrl: \"{{LC::TO_URL(./data/population.csv)}}\",\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n };\n\n return <RacingBars className=\"race\" {...options}>Loading...</RacingBars>;\n}\n" | ||
}, | ||
"customSettings": { | ||
"imports": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", | ||
"racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", | ||
"racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" | ||
}, | ||
"types": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"title": "Svelte", | ||
"activeEditor": "script", | ||
"script": { | ||
"language": "svelte", | ||
"content": "<script>\n import { onMount } from \"svelte\";\n import { race } from \"racing-bars\";\n\n const options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n };\n\n onMount(() => {\n race(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n });\n</script>\n\n<div id=\"race\">Loading...</div>\n\n<style>\n #race {\n height: 80vh;\n }\n</style>\n" | ||
}, | ||
"customSettings": { | ||
"imports": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", | ||
"racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", | ||
"racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" | ||
}, | ||
"types": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"title": "TypeScript", | ||
"activeEditor": "script", | ||
"markup": { | ||
"language": "html", | ||
"content": "<div id=\"race\">Loading...</div>" | ||
}, | ||
"style": { | ||
"language": "css", | ||
"content": "#race {\n height: 80vh;\n}\n" | ||
}, | ||
"script": { | ||
"language": "typescript", | ||
"content": "import { race, type Options } from \"racing-bars\";\n\nconst options: Options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n};\n\nrace(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n" | ||
}, | ||
"customSettings": { | ||
"imports": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", | ||
"racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", | ||
"racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" | ||
}, | ||
"types": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"title": "Vue", | ||
"activeEditor": "script", | ||
"script": { | ||
"language": "vue", | ||
"content": "<script setup>\n import RacingBars from \"racing-bars/vue\";\n\n const options = {\n dataUrl: \"{{LC::TO_URL(./data/population.csv)}}\",\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n };\n</script>\n\n<template>\n <RacingBars class=\"race\" v-bind=\"options\">Loading...</RacingBars>\n</template>\n\n<style scoped>\n .race {\n height: 80vh;\n }\n</style>\n" | ||
}, | ||
"customSettings": { | ||
"imports": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", | ||
"racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", | ||
"racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" | ||
}, | ||
"types": { | ||
"racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.