mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-24 19:59:36 +00:00
Compress extension in build
This commit is contained in:
19
build.js
19
build.js
@@ -1,7 +1,8 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
import { rollup } from 'rollup';
|
import { rollup } from 'rollup';
|
||||||
import { readFileSync, writeFileSync, mkdirSync, unlinkSync, cpSync } from 'fs';
|
import { readFileSync, writeFileSync, mkdirSync, unlinkSync, cpSync, createWriteStream } from 'fs';
|
||||||
|
import archiver from 'archiver';
|
||||||
|
|
||||||
const spriteSheets = [
|
const spriteSheets = [
|
||||||
{
|
{
|
||||||
@@ -118,4 +119,20 @@ cpSync('./images/icons/transparent', './dist/extension/images/icons/transparent'
|
|||||||
mkdirSync('./dist/extension/fonts', { recursive: true });
|
mkdirSync('./dist/extension/fonts', { recursive: true });
|
||||||
cpSync('./fonts', './dist/extension/fonts', { recursive: true });
|
cpSync('./fonts', './dist/extension/fonts', { recursive: true });
|
||||||
|
|
||||||
|
// Compress extension folder into zip
|
||||||
|
const output = createWriteStream('./dist/extension.zip');
|
||||||
|
const archive = archiver('zip');
|
||||||
|
|
||||||
|
output.on('close', () => {
|
||||||
|
console.log(`Created zip file: ${archive.pointer()} total bytes`);
|
||||||
|
});
|
||||||
|
|
||||||
|
archive.on('error', (err) => {
|
||||||
|
throw err;
|
||||||
|
});
|
||||||
|
|
||||||
|
archive.pipe(output);
|
||||||
|
archive.directory('./dist/extension/', false);
|
||||||
|
archive.finalize();
|
||||||
|
|
||||||
console.log(`Build completed: version ${version}`);
|
console.log(`Build completed: version ${version}`);
|
||||||
2
dist/birb.js
vendored
2
dist/birb.js
vendored
@@ -1867,7 +1867,7 @@
|
|||||||
insertModal(`${birdBirb()} Mode`, message);
|
insertModal(`${birdBirb()} Mode`, message);
|
||||||
}),
|
}),
|
||||||
new Separator(),
|
new Separator(),
|
||||||
new MenuItem("2025.11.2.66", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.66"); }, false),
|
new MenuItem("2025.11.2.73", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.73"); }, false),
|
||||||
];
|
];
|
||||||
|
|
||||||
const styleElement = document.createElement("style");
|
const styleElement = document.createElement("style");
|
||||||
|
|||||||
BIN
dist/extension.zip
vendored
Normal file
BIN
dist/extension.zip
vendored
Normal file
Binary file not shown.
2
dist/extension/birb.js
vendored
2
dist/extension/birb.js
vendored
@@ -1867,7 +1867,7 @@
|
|||||||
insertModal(`${birdBirb()} Mode`, message);
|
insertModal(`${birdBirb()} Mode`, message);
|
||||||
}),
|
}),
|
||||||
new Separator(),
|
new Separator(),
|
||||||
new MenuItem("2025.11.2.66", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.66"); }, false),
|
new MenuItem("2025.11.2.73", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.73"); }, false),
|
||||||
];
|
];
|
||||||
|
|
||||||
const styleElement = document.createElement("style");
|
const styleElement = document.createElement("style");
|
||||||
|
|||||||
9
dist/extension/manifest.json
vendored
9
dist/extension/manifest.json
vendored
@@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Pocket Bird",
|
"name": "Pocket Bird",
|
||||||
"description": "It's a pet bird in your browser, what more could you want?",
|
"description": "It's a pet bird in your browser, what more could you want?",
|
||||||
"version": "2025.11.2.66",
|
"version": "2025.11.2.73",
|
||||||
"homepage_url": "https://idreesinc.com",
|
"homepage_url": "https://idreesinc.com",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "images/icons/transparent/48x48x1.png",
|
"48": "images/icons/transparent/48x48x1.png",
|
||||||
@@ -36,7 +36,12 @@
|
|||||||
],
|
],
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "birb@idreesinc.com"
|
"id": "pocket-bird@idreesinc.com",
|
||||||
|
"data_collection_permissions": {
|
||||||
|
"required": [
|
||||||
|
"none"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
4
dist/userscript/birb.user.js
vendored
4
dist/userscript/birb.user.js
vendored
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Pocket Bird
|
// @name Pocket Bird
|
||||||
// @namespace https://idreesinc.com
|
// @namespace https://idreesinc.com
|
||||||
// @version 2025.11.2.66
|
// @version 2025.11.2.73
|
||||||
// @description It's a bird that hops around your web browser, the future is here
|
// @description It's a bird that hops around your web browser, the future is here
|
||||||
// @author Idrees
|
// @author Idrees
|
||||||
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
|
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
|
||||||
@@ -1881,7 +1881,7 @@
|
|||||||
insertModal(`${birdBirb()} Mode`, message);
|
insertModal(`${birdBirb()} Mode`, message);
|
||||||
}),
|
}),
|
||||||
new Separator(),
|
new Separator(),
|
||||||
new MenuItem("2025.11.2.66", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.66"); }, false),
|
new MenuItem("2025.11.2.73", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.73"); }, false),
|
||||||
];
|
];
|
||||||
|
|
||||||
const styleElement = document.createElement("style");
|
const styleElement = document.createElement("style");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Pocket Bird",
|
"name": "Pocket Bird",
|
||||||
"description": "It's a pet bird in your browser, what more could you want?",
|
"description": "It's a pet bird in your browser, what more could you want?",
|
||||||
"version": "2025.11.2.66",
|
"version": "2025.11.2.73",
|
||||||
"homepage_url": "https://idreesinc.com",
|
"homepage_url": "https://idreesinc.com",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "images/icons/transparent/48x48x1.png",
|
"48": "images/icons/transparent/48x48x1.png",
|
||||||
@@ -36,7 +36,12 @@
|
|||||||
],
|
],
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "birb@idreesinc.com"
|
"id": "pocket-bird@idreesinc.com",
|
||||||
|
"data_collection_permissions": {
|
||||||
|
"required": [
|
||||||
|
"none"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1001
package-lock.json
generated
1001
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
|||||||
"dev": "nodemon --watch src --watch stylesheet.css --watch build.js --exec \"npm run build\""
|
"dev": "nodemon --watch src --watch stylesheet.css --watch build.js --exec \"npm run build\""
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"archiver": "^7.0.1",
|
||||||
"nodemon": "^3.1.10",
|
"nodemon": "^3.1.10",
|
||||||
"rollup": "^4.52.5"
|
"rollup": "^4.52.5"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user