Skip to content

Commit 77dca59

Browse files
authored
Merge pull request #41 from taj54/main
chore: improve CI/CD and formatting
2 parents fb21ed7 + d133396 commit 77dca59

21 files changed

+3311
-872
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Publish to npm
2-
1+
name: Publish to npm
2+
33
on:
44
release:
55
types: [created]

.github/workflows/tag-after-merge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: |
6868
# Match lines starting with "## vX.Y.Z " until the next "## "
6969
awk "/^## v${{ env.version }}[[:space:]]/{flag=1; next} /^## /{flag=0} flag" CHANGELOG.md > RELEASE_NOTES.md
70-
70+
7171
echo "notes<<EOF" >> $GITHUB_ENV
7272
if [ "${{ env.release_type }}" = "major" ]; then
7373
echo "## 🚀 Major Release" >> $GITHUB_ENV
@@ -83,7 +83,7 @@ jobs:
8383
uses: softprops/action-gh-release@v2
8484
with:
8585
tag_name: v${{ env.version }}
86-
name: "Release v${{ env.version }}"
86+
name: 'Release v${{ env.version }}'
8787
body: ${{ env.notes }}
8888
env:
8989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/version-bump.yaml renamed to .github/workflows/version-bump.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ on:
1717
- minor
1818
- major
1919

20-
21-
2220
jobs:
2321
bump:
2422
runs-on: ubuntu-latest

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"ignores": ["node_modules", "dist"]
8+
}

CHANGELOG.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
98
## Unreleased
109

1110
## 0.1.0 - 2025-08-09
1211

1312
### Features
1413

15-
* `6b37d3b` feat: Add MIT license to build output and refactor component structure
16-
* `d44a709` feat: Refine target element mounting and bump version
17-
* `b89538d` feat: Allow specifying targetElementId for player mounting
18-
* `d1888ea` feat: Improve player initialization and build output
14+
- `6b37d3b` feat: Add MIT license to build output and refactor component structure
15+
- `d44a709` feat: Refine target element mounting and bump version
16+
- `b89538d` feat: Allow specifying targetElementId for player mounting
17+
- `d1888ea` feat: Improve player initialization and build output
1918

2019
### Chores
2120

22-
* `11e7138` chore: Bump package version to `0.1.0` to reflect the new feature and breaking change in rendering behavior.
23-
* `e919430` chore: Update examples/ExampleInteractiveVideo.vue
24-
* `47f4db5` chore: Update examples/package.json
21+
- `11e7138` chore: Bump package version to `0.1.0` to reflect the new feature and breaking change in rendering behavior.
22+
- `e919430` chore: Update examples/ExampleInteractiveVideo.vue
23+
- `47f4db5` chore: Update examples/package.json
2524

2625
## 0.0.2 - 2025-08-05
2726

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div
1010

1111
Examples of behavior that contributes to a positive environment for our community include:
1212

13-
* Demonstrating empathy and kindness toward other people
14-
* Being respectful of differing opinions, viewpoints, and experiences
15-
* Giving and gracefully accepting constructive feedback
16-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17-
* Focusing on what is best not just for us as individuals, but for the overall community
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
1818

1919
Examples of unacceptable behavior include:
2020

21-
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22-
* Trolling, insulting or derogatory comments, and personal or political attacks
23-
* Public or private harassment
24-
* Publishing others' private information, such as a physical or email address, without their explicit permission
25-
* Other conduct which can reasonably be considered inappropriate in a professional setting
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which can reasonably be considered inappropriate in a professional setting
2626

2727
## Enforcement Responsibilities
2828

@@ -67,4 +67,4 @@ Community leaders will follow these Community Impact Guidelines in determining t
6767
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
6868

6969
[homepage]: https://www.contributor-covenant.org
70-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
70+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

CONTRIBUTING.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ This project adheres to the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). By partici
2828

2929
If you find a bug, please open an issue on our [GitHub Issues page](https://github.com/interactive-video-labs/interactive-video-vue-wrapper/issues). When reporting a bug, please include:
3030

31-
- A clear and concise description of the bug.
32-
- Steps to reproduce the behavior.
33-
- Expected behavior.
34-
- Actual behavior.
35-
- Screenshots or videos if applicable.
36-
- Your environment (Vue version, browser, OS, etc.).
31+
- A clear and concise description of the bug.
32+
- Steps to reproduce the behavior.
33+
- Expected behavior.
34+
- Actual behavior.
35+
- Screenshots or videos if applicable.
36+
- Your environment (Vue version, browser, OS, etc.).
3737

3838
### Suggesting Enhancements
3939

4040
If you have an idea for a new feature or an improvement, please open an issue on our [GitHub Issues page](https://github.com/interactive-video-labs/interactive-video-vue-wrapper/issues). When suggesting an enhancement, please include:
4141

42-
- A clear and concise description of the proposed enhancement.
43-
- The problem it solves or the benefit it provides.
44-
- Any alternative solutions you've considered.
42+
- A clear and concise description of the proposed enhancement.
43+
- The problem it solves or the benefit it provides.
44+
- Any alternative solutions you've considered.
4545

4646
### Your First Code Contribution
4747

@@ -68,9 +68,9 @@ If you're looking to make your first code contribution, look for issues labeled
6868
6969
In your pull request description, please:
7070
71-
- Reference any related issues (e.g., `Fixes #123`, `Closes #456`).
72-
- Provide a clear explanation of your changes.
73-
- Include screenshots or GIFs if your changes affect the UI.
71+
- Reference any related issues (e.g., `Fixes #123`, `Closes #456`).
72+
- Provide a clear explanation of your changes.
73+
- Include screenshots or GIFs if your changes affect the UI.
7474
7575
## Development Setup
7676
@@ -82,18 +82,18 @@ For detailed instructions on setting up your development environment, installing
8282
8383
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for our commit messages. This helps with automated changelog generation and semantic versioning. Examples:
8484
85-
- `feat: add new video playback controls`
86-
- `fix: resolve autoplay issue on iOS`
87-
- `docs: update installation instructions`
88-
- `refactor: improve player initialization logic`
89-
- `test: add unit tests for cue points`
85+
- `feat: add new video playback controls`
86+
- `fix: resolve autoplay issue on iOS`
87+
- `docs: update installation instructions`
88+
- `refactor: improve player initialization logic`
89+
- `test: add unit tests for cue points`
9090
9191
### TypeScript Styleguide
9292
93-
- Follow existing code style and formatting.
94-
- Use clear and descriptive variable and function names.
95-
- Ensure proper type annotations for all functions, variables, and parameters.
96-
- Avoid `any` type unless absolutely necessary.
93+
- Follow existing code style and formatting.
94+
- Use clear and descriptive variable and function names.
95+
- Ensure proper type annotations for all functions, variables, and parameters.
96+
- Avoid `any` type unless absolutely necessary.
9797
9898
## License
9999

DEVELOPER.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This document provides essential information for developers looking to contribut
77
To get started with local development, follow these steps:
88

99
1. **Clone the repository:**
10+
1011
```bash
1112
git clone https://github.com/interactive-video-labs/interactive-video-vue-wrapper.git
1213
cd interactive-video-vue-wrapper
@@ -26,35 +27,35 @@ To get started with local development, follow these steps:
2627
2728
Here are the common development scripts available:
2829
29-
- **`pnpm build`**: Compiles the TypeScript source code into JavaScript (ESM and CommonJS formats) and generates declaration files (`.d.ts`). This command is run before publishing.
30+
- **`pnpm build`**: Compiles the TypeScript source code into JavaScript (ESM and CommonJS formats) and generates declaration files (`.d.ts`). This command is run before publishing.
3031
31-
```bash
32-
pnpm build
33-
```
32+
```bash
33+
pnpm build
34+
```
3435
35-
- **`pnpm dev`**: Starts the TypeScript compiler in watch mode, recompiling files on changes. Useful for active development.
36+
- **`pnpm dev`**: Starts the TypeScript compiler in watch mode, recompiling files on changes. Useful for active development.
3637
37-
```bash
38-
pnpm dev
39-
```
38+
```bash
39+
pnpm dev
40+
```
4041
41-
- **`pnpm test`**: Runs the unit tests using Vitest.
42+
- **`pnpm test`**: Runs the unit tests using Vitest.
4243
43-
```bash
44-
pnpm test
45-
```
44+
```bash
45+
pnpm test
46+
```
4647
47-
- **`pnpm clean`**: Removes the `dist` directory, clearing all compiled output.
48+
- **`pnpm clean`**: Removes the `dist` directory, clearing all compiled output.
4849
49-
```bash
50-
pnpm clean
51-
```
50+
```bash
51+
pnpm clean
52+
```
5253
53-
- **`pnpm prepare`**: This script is typically run after `pnpm install` and before `pnpm publish`. In this project, it simply runs `pnpm build`.
54+
- **`pnpm prepare`**: This script is typically run after `pnpm install` and before `pnpm publish`. In this project, it simply runs `pnpm build`.
5455
55-
```bash
56-
pnpm prepare
57-
```
56+
```bash
57+
pnpm prepare
58+
```
5859
5960
## Testing
6061

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# @interactive-video-labs/vue
2+
23
<p align="center">
34
<img src="https://raw.githubusercontent.com/interactive-video-labs/docs/main/logo.svg" width="200px" alt="Interactive Video Labs Logo" />
45
</p>
@@ -84,15 +85,15 @@ function handleAnalyticsEvent(event, payload) {
8485

8586
The component accepts the following props:
8687

87-
| Prop | Type | Required | Default | Description |
88-
| -------------------- | -------------------------------------------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------- |
89-
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. |
90-
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. |
91-
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
92-
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
93-
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
94-
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
95-
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
88+
| Prop | Type | Required | Default | Description |
89+
| ------------------ | ------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------- |
90+
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. |
91+
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. |
92+
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
93+
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
94+
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
95+
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
96+
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
9697

9798
Any additional attributes passed to the component will be forwarded to the underlying `@interactive-video-labs/core` player configuration.
9899

@@ -147,10 +148,7 @@ onMounted(() => {
147148
</script>
148149
149150
<template>
150-
<InteractiveVideo
151-
ref="videoPlayer"
152-
video-url="https://example.com/my-video.mp4"
153-
/>
151+
<InteractiveVideo ref="videoPlayer" video-url="https://example.com/my-video.mp4" />
154152
</template>
155153
```
156154

@@ -161,10 +159,11 @@ onMounted(() => {
161159
For detailed development setup, project structure, testing, build, and publishing instructions, please refer to our [Developer Guide](DEVELOPER.md).
162160

163161
---
162+
164163
## Contributing
165164

166165
Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) to get started.
167166

168167
## License
169168

170-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
169+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

eslint.config.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { defineConfig } from 'eslint/config';
2+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
3+
import prettier from 'eslint-plugin-prettier';
4+
import tsParser from '@typescript-eslint/parser';
5+
import path from 'node:path';
6+
import { fileURLToPath } from 'node:url';
7+
import js from '@eslint/js';
8+
import { FlatCompat } from '@eslint/eslintrc';
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default defineConfig([
19+
{
20+
ignores: ['node_modules/*', 'dist/*', 'examples/*', 'scripts/*', 'test/*'],
21+
},
22+
{
23+
extends: compat.extends(
24+
'eslint:recommended',
25+
'plugin:@typescript-eslint/recommended',
26+
'prettier',
27+
),
28+
29+
plugins: {
30+
'@typescript-eslint': typescriptEslint,
31+
prettier,
32+
},
33+
34+
languageOptions: {
35+
parser: tsParser,
36+
},
37+
38+
rules: {
39+
...typescriptEslint.configs.recommended.rules,
40+
'prettier/prettier': 'error',
41+
},
42+
},
43+
]);

0 commit comments

Comments
 (0)