refactor: unify package.jsons
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
1bbe19522c
commit
9b6b5547ba
6 changed files with 1008 additions and 2142 deletions
22
Earthfile
22
Earthfile
|
@ -7,18 +7,18 @@ avsync-video-components:
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser && mkdir /home/pptruser && chown -R pptruser:pptruser /home/pptruser
|
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser && mkdir /home/pptruser && chown -R pptruser:pptruser /home/pptruser
|
||||||
USER pptruser
|
USER pptruser
|
||||||
COPY av-sync/package.json av-sync/pnpm-lock.yaml /av-sync
|
COPY package.json pnpm-lock.yaml /site
|
||||||
WORKDIR /av-sync
|
WORKDIR /site
|
||||||
CACHE /home/pptruser/.local/share/pnpm
|
CACHE --id=pnpm /home/pptruser/.local/share/pnpm
|
||||||
RUN pnpm install
|
RUN pnpm install --frozen-lockfile
|
||||||
COPY av-sync /av-sync
|
COPY . /site
|
||||||
ARG FPS=60
|
ARG FPS=60
|
||||||
ARG CYCLES=16
|
ARG CYCLES=16
|
||||||
ARG SIZE=1200
|
ARG SIZE=1200
|
||||||
RUN pnpm serve-render --fps $FPS --cycles 1 --size $SIZE --output frames
|
RUN pnpm av:render:video --fps $FPS --cycles 1 --size $SIZE --output /var/tmp/frames
|
||||||
RUN pnpm render-audio -i beep.wav -o track.wav --repeats $CYCLES
|
RUN pnpm av:render:audio -i beep.wav -o /var/tmp/track.wav --repeats $CYCLES
|
||||||
SAVE ARTIFACT frames
|
SAVE ARTIFACT /var/tmp/frames
|
||||||
SAVE ARTIFACT track.wav
|
SAVE ARTIFACT /var/tmp/track.wav
|
||||||
|
|
||||||
avsync-video:
|
avsync-video:
|
||||||
FROM debian:bookworm
|
FROM debian:bookworm
|
||||||
|
@ -36,8 +36,8 @@ site:
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
COPY package.json pnpm-lock.yaml /site
|
COPY package.json pnpm-lock.yaml /site
|
||||||
WORKDIR /site
|
WORKDIR /site
|
||||||
CACHE $HOME/.local/share/pnpm
|
CACHE --id=pnpm $HOME/.local/share/pnpm
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile --prod
|
||||||
COPY . /site
|
COPY . /site
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
SAVE ARTIFACT build AS LOCAL build
|
SAVE ARTIFACT build AS LOCAL build
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
"name": "av-sync",
|
|
||||||
"private": true,
|
|
||||||
"version": "0.0.0",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vite",
|
|
||||||
"build": "vite build",
|
|
||||||
"preview": "vite preview",
|
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
||||||
"render": "node render.js",
|
|
||||||
"serve-render": "concurrently -P -k -s command-1 \"pnpm run dev --port 8626\" \"wait-on http://localhost:8626 && pnpm run render --url http://localhost:8626 {@}\" --",
|
|
||||||
"render-audio": "node render-audio.js"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
|
||||||
"@tsconfig/svelte": "^5.0.2",
|
|
||||||
"commander": "^12.0.0",
|
|
||||||
"concurrently": "^8.2.2",
|
|
||||||
"node-wav": "^0.0.2",
|
|
||||||
"puppeteer": "^22.1.0",
|
|
||||||
"svelte": "^4.2.10",
|
|
||||||
"svelte-check": "^3.6.3",
|
|
||||||
"tslib": "^2.6.2",
|
|
||||||
"typescript": "^5.2.2",
|
|
||||||
"vite": "^5.1.0",
|
|
||||||
"wait-on": "^7.2.0"
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -40,7 +40,7 @@ for (let frame = 0; frame < totalFrames; frame++) {
|
||||||
const path = `${options.output}/${frame.toString().padStart(Math.log10(totalFrames) + 1, '0')}.png`;
|
const path = `${options.output}/${frame.toString().padStart(Math.log10(totalFrames) + 1, '0')}.png`;
|
||||||
await page.screenshot({ path, omitBackground: true });
|
await page.screenshot({ path, omitBackground: true });
|
||||||
let end = Date.now();
|
let end = Date.now();
|
||||||
console.log(`Captured frame ${frame}/${totalFrames} (took ${end - start}ms)`);
|
console.log(`Captured frame ${frame + 1}/${totalFrames} (took ${end - start}ms)`);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Done.');
|
console.log('Done.');
|
27
package.json
27
package.json
|
@ -9,32 +9,41 @@
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
"lint": "prettier --check . && eslint .",
|
"lint": "prettier --check . && eslint .",
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write .",
|
||||||
|
"av:dev": "cd av-sync && vite",
|
||||||
|
"av:render:video": "cd av-sync && concurrently -P -k -s command-1 \"vite --port 8626\" \"wait-on http://localhost:8626 && node render-video.js --url http://localhost:8626 {@}\" --",
|
||||||
|
"av:render:audio": "cd av-sync && node render-audio.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-auto": "^3.0.0",
|
"@tsconfig/svelte": "^5.0.2",
|
||||||
"@sveltejs/kit": "^2.0.0",
|
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
|
||||||
"@types/eslint": "8.56.0",
|
"@types/eslint": "8.56.0",
|
||||||
"@types/lodash": "^4.14.202",
|
"@types/lodash": "^4.14.202",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||||
"@typescript-eslint/parser": "^6.0.0",
|
"@typescript-eslint/parser": "^6.0.0",
|
||||||
|
"commander": "^12.0.0",
|
||||||
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-svelte": "^2.35.1",
|
"eslint-plugin-svelte": "^2.35.1",
|
||||||
|
"node-wav": "^0.0.2",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-svelte": "^3.1.2",
|
"prettier-plugin-svelte": "^3.1.2",
|
||||||
"svelte": "^4.2.7",
|
"puppeteer": "^22.1.0",
|
||||||
"svelte-check": "^3.6.0",
|
"svelte-check": "^3.6.0",
|
||||||
"tslib": "^2.4.1",
|
"wait-on": "^7.2.0"
|
||||||
"typescript": "^5.0.0",
|
|
||||||
"vite": "^5.0.3"
|
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/b612": "^5.0.8",
|
"@fontsource/b612": "^5.0.8",
|
||||||
|
"@sveltejs/adapter-auto": "^3.0.0",
|
||||||
"@sveltejs/adapter-static": "^3.0.1",
|
"@sveltejs/adapter-static": "^3.0.1",
|
||||||
|
"@sveltejs/kit": "^2.0.0",
|
||||||
|
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"normalize.css": "^8.0.1"
|
"normalize.css": "^8.0.1",
|
||||||
|
"svelte": "^4.2.7",
|
||||||
|
"tslib": "^2.4.1",
|
||||||
|
"typescript": "^5.0.0",
|
||||||
|
"vite": "^5.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1004
pnpm-lock.yaml
1004
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue