Skip to content

Commit

Permalink
chore: add prepare deploy (#19)
Browse files Browse the repository at this point in the history
* chore(videojs.dev): add vite setup for videojs.dev package

* chore: add prepare deploy script

---------

Co-authored-by: Dzianis Dashkevich <ddashkevich@brightcove.com>
  • Loading branch information
dzianis-dashkevich and Dzianis Dashkevich authored Sep 5, 2024
1 parent e016531 commit 0317536
Show file tree
Hide file tree
Showing 21 changed files with 1,074 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ bower_components

build/Release

deploy

# Dependency directories

node_modules/
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
>
> This project is under active development!
[![Netlify Status](https://api.netlify.com/api/v1/badges/9717430f-7ee5-41d2-b7af-cbb37472ab12/deploy-status)](https://app.netlify.com/sites/videojsdev/deploys)

Video.js is a full-featured, open source video player for all web-based platforms.

Right out of the box, Video.js supports all common media formats used on the web including streaming formats like HLS and DASH. It works on desktops, mobile devices, tablets, and web-based Smart TVs.
Expand Down
22 changes: 22 additions & 0 deletions cli/prepare-deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable no-console */
import { cp, mkdir } from 'node:fs';

const copyApiReferences = (pckg) => {
cp(`packages/${pckg}/dist-api-reference`, `deploy/api-references/${pckg}`, { recursive: true }, (err) => {
if (err) {
console.log(`Failed to copy ${pckg} api reference dist. See error: `, err);
}
});
};

mkdir('deploy', () => {
cp('packages/videojs.dev/dist', 'deploy/', { recursive: true }, (err) => {
if (err) {
console.log(`Failed to copy videojs.dev dist. See error: `, err);
}
});

copyApiReferences('dash-parser');
copyApiReferences('hls-parser');
copyApiReferences('playback');
});
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default [
*/
...ts.configs.recommended.map((config) => ({
...config,
files: ['**/*.ts'],
files: ['**/*.{ts,tsx}'],
})),

/**
Expand Down Expand Up @@ -86,7 +86,7 @@ export default [
* typescript specific rules:
*/
{
files: ['**/*.ts'],
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
Expand Down
Loading

0 comments on commit 0317536

Please sign in to comment.