couple of tweaks

This commit is contained in:
Brahim Hadriche committed 2023-07-05 16:48:19 -04:00
1 parent 6531650a39
commit bd312484a9
7 files changed
+19 -9

No files matched your search

-1
View File
@@ -1 +0,0 @@
engine-strict=true
+1 -1
View File
@@ -2,7 +2,7 @@
<!-- markdownlint-disable MD033 --> <!-- markdownlint-disable MD033 -->
<p align="center"> <p align="center">
<img src="banner.png" style="display:block;text-align:center" alt="Playlet Logo" width="800"/> <img src="docs/banner.png" style="display:block;text-align:center" alt="Playlet Logo" width="800"/>
<br/><br/> <br/><br/>
<a href="https://github.com/iBicha/playlet/actions/workflows/release.yml?query=branch%3Amain"> <a href="https://github.com/iBicha/playlet/actions/workflows/release.yml?query=branch%3Amain">
<img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/iBicha/playlet/release.yml.svg?branch=main"/> <img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/iBicha/playlet/release.yml.svg?branch=main"/>
View File
File renamed without changes.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

+12
View File
@@ -0,0 +1,12 @@
const dotenv = require('dotenv');
const fs = require('fs');
export default function getEnvVars() {
let envVars = process.env;
if (fs.existsSync('.vscode/.env')) {
const envConfig = dotenv.parse(fs.readFileSync('.vscode/.env'));
envVars = { ...envVars, ...envConfig };
}
return envVars;
}
+2 -2
View File
@@ -3,12 +3,12 @@
const { ArgumentParser } = require('argparse') const { ArgumentParser } = require('argparse')
const fs = require('fs'); const fs = require('fs');
const dotenv = require('dotenv'); const getEnvVars = require('./get-env-vars');
const spawn = require('child_process').spawn; const spawn = require('child_process').spawn;
const express = require('express') const express = require('express')
const ip = require('ip'); const ip = require('ip');
const config = dotenv.parse(fs.readFileSync('.vscode/.env')); const config = getEnvVars();
const PLAYLEY_SERVER = `http://${config.ROKU_DEV_TARGET}:8888`; const PLAYLEY_SERVER = `http://${config.ROKU_DEV_TARGET}:8888`;
async function importInvidiousProfile(invidiousInstance, token, profile) { async function importInvidiousProfile(invidiousInstance, token, profile) {
+2 -2
View File
@@ -1,7 +1,7 @@
const rokuDeploy = require('roku-deploy'); const rokuDeploy = require('roku-deploy');
const dotenv = require('dotenv');
const fs = require('fs'); const fs = require('fs');
const { exit } = require('process'); const { exit } = require('process');
const getEnvVars = require('./get-env-vars');
if(process.argv.length !== 3) { if(process.argv.length !== 3) {
console.error("Invalid usage! usage: npm run screenshot -- filename"); console.error("Invalid usage! usage: npm run screenshot -- filename");
@@ -9,7 +9,7 @@ if(process.argv.length !== 3) {
} }
const filename = process.argv[2]; const filename = process.argv[2];
const config = dotenv.parse(fs.readFileSync('.vscode/.env')); const config = getEnvVars();
const options = { const options = {
host: config.ROKU_DEV_TARGET, host: config.ROKU_DEV_TARGET,
+2 -3
View File
@@ -1,8 +1,7 @@
const dotenv = require('dotenv'); const getEnvVars = require('./get-env-vars');
const fs = require('fs');
const rokuDeploy = require('roku-deploy'); const rokuDeploy = require('roku-deploy');
const config = dotenv.parse(fs.readFileSync('.vscode/.env')); const config = getEnvVars();
const options = { const options = {
host: config.ROKU_DEV_TARGET, host: config.ROKU_DEV_TARGET,