-
-
Notifications
You must be signed in to change notification settings - Fork 1
chore: improve CI/CD and formatting #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Publish to npm | ||
name: Publish to npm | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ on: | |
- minor | ||
- major | ||
|
||
|
||
|
||
jobs: | ||
bump: | ||
runs-on: ubuntu-latest | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"ignores": ["node_modules", "dist"] | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,5 @@ | ||||||||||||||||||||||||||||||||||||||||
# @interactive-video-labs/vue | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
<p align="center"> | ||||||||||||||||||||||||||||||||||||||||
<img src="https://raw.githubusercontent.com/interactive-video-labs/docs/main/logo.svg" width="200px" alt="Interactive Video Labs Logo" /> | ||||||||||||||||||||||||||||||||||||||||
</p> | ||||||||||||||||||||||||||||||||||||||||
|
@@ -84,15 +85,15 @@ function handleAnalyticsEvent(event, payload) { | |||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
The component accepts the following props: | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
| Prop | Type | Required | Default | Description | | ||||||||||||||||||||||||||||||||||||||||
| -------------------- | -------------------------------------------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------- | | ||||||||||||||||||||||||||||||||||||||||
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. | | ||||||||||||||||||||||||||||||||||||||||
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. | | ||||||||||||||||||||||||||||||||||||||||
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. | | ||||||||||||||||||||||||||||||||||||||||
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. | | ||||||||||||||||||||||||||||||||||||||||
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. | | ||||||||||||||||||||||||||||||||||||||||
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. | | ||||||||||||||||||||||||||||||||||||||||
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). | | ||||||||||||||||||||||||||||||||||||||||
| Prop | Type | Required | Default | Description | | ||||||||||||||||||||||||||||||||||||||||
| ------------------ | ------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------- | | ||||||||||||||||||||||||||||||||||||||||
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. | | ||||||||||||||||||||||||||||||||||||||||
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. | | ||||||||||||||||||||||||||||||||||||||||
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. | | ||||||||||||||||||||||||||||||||||||||||
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. | | ||||||||||||||||||||||||||||||||||||||||
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. | | ||||||||||||||||||||||||||||||||||||||||
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. | | ||||||||||||||||||||||||||||||||||||||||
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). | | ||||||||||||||||||||||||||||||||||||||||
Comment on lines
+88
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Props table: add missing targetElementId and fix cues description grammar. -| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. |
+| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events that can be updated dynamically. |
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
+| `targetElementId` | `string` | `false` | - | ID of an existing DOM element to mount the player into (optional). | 📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[style] ~91-~91: To form a complete sentence, be sure to include a subject. (MISSING_IT_THERE) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
Any additional attributes passed to the component will be forwarded to the underlying `@interactive-video-labs/core` player configuration. | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
|
@@ -147,10 +148,7 @@ onMounted(() => { | |||||||||||||||||||||||||||||||||||||||
</script> | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
<template> | ||||||||||||||||||||||||||||||||||||||||
<InteractiveVideo | ||||||||||||||||||||||||||||||||||||||||
ref="videoPlayer" | ||||||||||||||||||||||||||||||||||||||||
video-url="https://example.com/my-video.mp4" | ||||||||||||||||||||||||||||||||||||||||
/> | ||||||||||||||||||||||||||||||||||||||||
<InteractiveVideo ref="videoPlayer" video-url="https://example.com/my-video.mp4" /> | ||||||||||||||||||||||||||||||||||||||||
</template> | ||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
|
@@ -161,10 +159,11 @@ onMounted(() => { | |||||||||||||||||||||||||||||||||||||||
For detailed development setup, project structure, testing, build, and publishing instructions, please refer to our [Developer Guide](DEVELOPER.md). | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
## Contributing | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) to get started. | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
## License | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. | ||||||||||||||||||||||||||||||||||||||||
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { defineConfig } from 'eslint/config'; | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import prettier from 'eslint-plugin-prettier'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import js from '@eslint/js'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default defineConfig([ | ||
{ | ||
ignores: ['node_modules/*', 'dist/*', 'examples/*', 'scripts/*', 'test/*'], | ||
}, | ||
{ | ||
extends: compat.extends( | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
), | ||
|
||
plugins: { | ||
'@typescript-eslint': typescriptEslint, | ||
prettier, | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
}, | ||
|
||
rules: { | ||
...typescriptEslint.configs.recommended.rules, | ||
'prettier/prettier': 'error', | ||
}, | ||
}, | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace unsupported "ignores" with .prettierignore.
Prettier config doesn’t support an "ignores" key; it’ll be ignored. Use a .prettierignore file instead to exclude paths like dist.
Apply this diff to the config and add an ignore file:
.new file: .prettierignore
🤖 Prompt for AI Agents