Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 21 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"start:docs": "npm run start --workspace @devtool/docs",
"prebuild": "npm run clean",
"build": "npm run --ws build --if-present",
"postbuild": "mkdir -p .upload && cd ./packages/devtool-chrome && zip -r chrome.zip ./dist/chrome/* && mv chrome.zip ../../.upload/",
"postbuild": "mkdir -p .upload && cd ./packages/devtool-chrome && zip -r chrome.zip ./dist/chrome/* && mv chrome.zip ../../.upload/ && zip -r firefox.zip ./dist/firefox/* && mv firefox.zip ../../.upload/",
"watch": "npm run --ws watch --if-present",
"types": "tsc --noEmit",
"release": "tsx ./scripts/release.mts",
Expand Down
6 changes: 4 additions & 2 deletions packages/backend/src/rendering/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export class Stats {

// @ts-expect-error it does exist in chrome
const memory = performance.memory;
this.memory = memory.usedJSHeapSize / 1048576;
this.maxMemory = memory.jsHeapSizeLimit / 1048576;
if (memory) {
this.memory = memory.usedJSHeapSize / 1048576;
this.maxMemory = memory.jsHeapSizeLimit / 1048576;
}
}
}

Expand Down
42 changes: 42 additions & 0 deletions packages/devtool-chrome/manifest.firefox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"manifest_version": 3,
"name": "PixiJS DevTools",
"description": "DevTools for PixiJS",
"action": {
"default_icon": {
"16": "pixi-icon-inactive-16.png",
"48": "pixi-icon-inactive-48.png",
"128": "pixi-icon-inactive-128.png"
}
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content/index.js"],
"css": ["contentStyle.css"],
"run_at": "document_start"
}
],
"background": {
"scripts": ["background/index.js"]
},
"icons": {
"16": "pixi-icon-active-16.png",
"48": "pixi-icon-active-48.png",
"128": "pixi-icon-active-128.png"
},
"permissions": ["activeTab"],
"devtools_page": "devtools.html",
"web_accessible_resources": [
{
"resources": ["contentStyle.css", "inject/index.js", "inject/index2.js"],
"matches": ["<all_urls>"]
}
],
"browser_specific_settings": {
"gecko": {
"id": "pixijs-devtools@pixijs.io",
"strict_min_version": "109.0"
}
}
}
7 changes: 6 additions & 1 deletion packages/devtool-chrome/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
"version": "2.3.1",
"type": "module",
"scripts": {
"build": "run-s build:*",
"build": "run-s build:chrome build:inject build:firefox build:firefox-devtools build:firefox-bg build:firefox-content build:firefox-inject",
"build:chrome": "vite build --config vite.chrome.config.ts",
"build:inject": "vite build --config vite.inject.config.ts",
"build:firefox": "vite build --config vite.firefox.config.ts",
"build:firefox-devtools": "ENTRY=devtools vite build --config vite.firefox-scripts.config.ts",
"build:firefox-bg": "ENTRY=background vite build --config vite.firefox-scripts.config.ts",
"build:firefox-content": "ENTRY=content vite build --config vite.firefox-scripts.config.ts",
"build:firefox-inject": "ENTRY=inject vite build --config vite.firefox-scripts.config.ts",
"watch": "run-p watch:*",
"watch:chrome": "vite dev --config vite.chrome.config.ts",
"watch:inject": "node -e \"setTimeout(() => process.exit(0), 5000)\" && vite build --config vite.inject.config.ts --watch --mode development",
Expand Down
Loading