Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
8 changes: 8 additions & 0 deletions .cspell/code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
colspan
iframe
markdownlint
tbody
testid
tfoot
valign
webdev
3 changes: 3 additions & 0 deletions .cspell/my-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
genericembed
mycomponent
oldschool
37 changes: 37 additions & 0 deletions .cspell/names.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
adamwathan
anchorfm
Arellano
Buzzsprout
Cahllagerfeld
codepen
daisyui
Deezer
Drasner
Ennoriel
Hernández
João
Laubstein
Mandal
markdownlint
Matías
Maxime
mdsvex
Palmeiro
pauliescanlon
pnpm
purrfect
rehype
sdras
simplecast
smartypants
soundcloud
Souvik
stackblitz
svead
sveltekit
tailwindcss
vieria
vite
vitejs
youtube
Zencastr
44 changes: 22 additions & 22 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript'),
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript'),
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
}
23 changes: 15 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,42 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**

Add any other context about the problem here.
11 changes: 8 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

A clear and concise description of any alternative solutions or
features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
28 changes: 22 additions & 6 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
name: 'Tests: Unit'
on:
- push
- pull_request
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize]

jobs:
unit_tests:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest

steps:
- uses: actions/cache@v3
with:
path: ~/.pnpm-store
key:
${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 6.0.2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install pnpm
run: pnpm i
with:
node-version: 18.x
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
env:
PUBLIC_FATHOM_ID: ${{ secrets.PUBLIC_FATHOM_ID }}
PUBLIC_FATHOM_URL: ${{ secrets.PUBLIC_FATHOM_URL }}
- name: Test
run: pnpm run test:ci
- name: Check spelling
run: pnpm run cspell
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
18 changes: 12 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"printWidth": 70,
"arrowParens": "avoid",
"proseWrap": "always"
"useTabs": true,
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"printWidth": 70,
"arrowParens": "avoid",
"proseWrap": "always",
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [
{ "files": "*.svelte", "options": { "parser": "svelte" } }
]
}
14 changes: 7 additions & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"fivethree.vscode-svelte-snippets",
"svelte.svelte-vscode",
"ardenivanov.svelte-intellisense",
"bradlc.vscode-tailwindcss"
]
"recommendations": [
"streetsidesoftware.code-spell-checker",
"fivethree.vscode-svelte-snippets",
"svelte.svelte-vscode",
"ardenivanov.svelte-intellisense",
"bradlc.vscode-tailwindcss"
]
}
38 changes: 6 additions & 32 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
{
"css.validate": false,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"git.enableSmartCommit": true,
"git.postCommitCommand": "sync",
"cSpell.words": [
"adamwathan",
"allowtransparency",
"atrule",
"Cahllagerfeld",
"daisyui",
"deezer",
"Drasner",
"Drasner's",
"iframe",
"Mandal",
"mdsvex",
"noopener",
"pauliescanlon",
"purrfect",
"sdras",
"Souvik",
"spencee",
"spences",
"sveltejs",
"sveltkit",
"vieria",
"vite",
"zencastr",
"Zrzbx"
]
"css.validate": false,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"git.enableSmartCommit": true,
"git.postCommitCommand": "sync"
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export to `src/lib/index.ts`.
<!-- Links -->

[discussions]:
https://github.com/spences10/sveltekit-embed/discussions/new
https://github.com/spences10/sveltekit-embed/discussions/new
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Use like a normal Svelte component:

```html
<script>
import { AnchorFm } from 'sveltekit-embed'
import { AnchorFm } from 'sveltekit-embed'
</script>

<AnchorFm
height="165"
episodeUrl="purrfect-dev/embed/episodes/1-31---Delivering-Digital-Content-with-GraphCMS-e14g55c/a-a650v9a"
height="165"
episodeUrl="purrfect-dev/embed/episodes/1-31---Delivering-Digital-Content-with-GraphCMS-e14g55c/a-a650v9a"
/>
```

Expand Down Expand Up @@ -92,7 +92,7 @@ export { default as MyComponent } from './components/my-component.svelte'
Import the component locally into the `src/routes/+page.md` file:

```svelte
import { MyComponent } from '$lib'
import {MyComponent} from '$lib'
```

After importing the component, add it to the
Expand Down Expand Up @@ -154,7 +154,7 @@ the instructions are never there! 😅
npm login
# bump version with npm
npm version 0.0.8
# package with sveltkit
# package with sveltekit
pnpm run package
# publish from package directory
cd package
Expand Down
38 changes: 38 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "0.2",
"ignorePaths": [
"node_modules/**/*",
"pnpm-lock.yaml",
"package/**/*"
],
"dictionaryDefinitions": [
{
"name": "cambridge_dictionary",
"path": ".cspell/cambridge-dictionary-words.txt",
"addWords": true
},
{
"name": "my_words",
"path": ".cspell/my-words.txt",
"addWords": true
},
{
"name": "names",
"path": ".cspell/names.txt",
"addWords": true
},
{
"name": "code",
"path": ".cspell/code.txt",
"addWords": true
}
],
"dictionaries": [
"cambridge_dictionary",
"names",
"my_words",
"code"
],
"ignoreWords": [],
"import": []
}
Loading