Github actions: now builds for Firefox and Chrome

master
guusvanmeerveld 3 years ago
parent 62e5e5c71a
commit c583a66909

@ -6,7 +6,7 @@ on:
- master - master
jobs: jobs:
typescript: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Setup checkout - name: Setup checkout
@ -17,5 +17,7 @@ jobs:
node-version: 15 node-version: 15
- name: Install Dependencies - name: Install Dependencies
run: yarn install run: yarn install
- name: Check for syntax errors - name: Build for Chrome
run: yarn build run: yarn build -t chrome
- name: Build for Firefox
run: yarn build -t firefox

@ -14,7 +14,7 @@ target();
if (config.interpreter) { if (config.interpreter) {
config.interpreter.forEach((interpreter) => { config.interpreter.forEach((interpreter) => {
const input = join(srcDir, interpreter.input); const input = join(srcDir, interpreter.input);
const output = join(distDir, interpreter.output); const output = join(distDir, process.env.TARGET_BROWSER, interpreter.output);
builder(input, output, interpreter.type); builder(input, output, interpreter.type);
}); });

@ -30,7 +30,7 @@ watcher.on('change', async (path) => {
if (conf) { if (conf) {
const fileType = path.split('.').pop(); const fileType = path.split('.').pop();
const outPath = join(distDir, conf.output); const outPath = join(distDir, process.env.TARGET_BROWSER, conf.output);
await fileBuilder(path, outPath, fileType); await fileBuilder(path, outPath, fileType);
} }

Loading…
Cancel
Save