Skip to content

Commit 8934172

Browse files
authored
Build Update (#5)
* Build Update * Fix Background v3 Worker for Mozilla
1 parent 5b1d6f0 commit 8934172

15 files changed

+4495
-501
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build
22

33
on:
44
workflow_dispatch:
5+
release:
6+
types: [published]
57

68
jobs:
79
build:
@@ -13,6 +15,14 @@ jobs:
1315
- name: "Checkout"
1416
uses: actions/checkout@v3
1517

18+
- name: "Setup Node 18"
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
23+
- name: "Node Install"
24+
run: npm install
25+
1626
- name: "Update Firefox Manifest"
1727
id: manifest
1828
run: |
@@ -31,7 +41,7 @@ jobs:
3141
id: setup-chrome
3242
uses: browser-actions/setup-chrome@v1
3343
with:
34-
chrome-version: latest
44+
chrome-version: "1191187"
3545

3646
- name: "Build Chrome"
3747
run: |

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.idea/
22
*.iml
3+
.vscode/
4+
**/dist/
35
build/
46
node_modules/
57
web-ext-artifacts/
6-
manifest.json
8+
src/manifest.json

gulpfile.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const gulp = require('gulp')
2+
3+
gulp.task('bootstrap', () => {
4+
return gulp
5+
.src([
6+
'node_modules/bootstrap/dist/css/bootstrap.min.css',
7+
'node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',
8+
])
9+
.pipe(gulp.dest('src/dist/bootstrap'))
10+
})
11+
12+
gulp.task('clipboard', () => {
13+
return gulp
14+
.src('node_modules/clipboard/dist/clipboard.min.js')
15+
.pipe(gulp.dest('src/dist/clipboard'))
16+
})
17+
18+
gulp.task('fontawesome', () => {
19+
return gulp
20+
.src(
21+
[
22+
'node_modules/@fortawesome/fontawesome-free/css/all.min.css',
23+
'node_modules/@fortawesome/fontawesome-free/js/all.min.js',
24+
'node_modules/@fortawesome/fontawesome-free/webfonts/**/*',
25+
],
26+
{ base: 'node_modules/@fortawesome/fontawesome-free' }
27+
)
28+
.pipe(gulp.dest('src/dist/fontawesome'))
29+
})
30+
31+
gulp.task('jquery', () => {
32+
return gulp
33+
.src('node_modules/jquery/dist/jquery.min.js')
34+
.pipe(gulp.dest('src/dist/jquery'))
35+
})
36+
37+
gulp.task('polyfill', () => {
38+
return gulp
39+
.src('node_modules/webextension-polyfill/dist/browser-polyfill.min.js')
40+
.pipe(gulp.dest('src/dist/polyfill'))
41+
})
42+
43+
gulp.task(
44+
'default',
45+
gulp.parallel('bootstrap', 'clipboard', 'fontawesome', 'jquery', 'polyfill')
46+
)

manifest-chrome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Django Files",
33
"description": "Django Files Chrome Extension",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"manifest_version": 3,
66
"permissions": [
77
"notifications",

manifest-firefox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Django Files",
33
"description": "Django Files Firefox Extension",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"manifest_version": 3,
66
"permissions": [
77
"notifications",
@@ -15,7 +15,7 @@
1515
"open_in_tab": true
1616
},
1717
"background": {
18-
"scripts": ["js/service-worker.js"]
18+
"page": "html/background-page.html"
1919
},
2020
"action": {
2121
"default_popup": "html/popup.html",

0 commit comments

Comments
 (0)