mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 05:53:11 +08:00
498481e5be
This commit introduces a new 'dev tools' feature for core, theme and plugin developers. This is enabled by default in development environments, and can be enabled in production by running `enableDevTools()` in the browser console. When enabled, it will load a separate dev-tools JS/CSS bundle, and show a new toolbar on the left of the page. Dev Tools will remain enabled until the 'x' button is clicked, or `disableDevTools()` is run in the console. The toolbar currently has three buttons: - "Toggle safe mode" provides an easy way to toggle all themes/plugins on/off - "Toggle verbose localization" is a toggle for our existing locale debugging feature - "Debug plugin outlets" is inspired by the popular 'plugin outlet locations' theme component. It hooks into core's plugin outlet system, and renders a button into every single outlet. Those buttons have a tooltip which shows more information about the outlet, including all of the outletArg values. To inspect the value further, buttons allow the values to be saved to globals and logged to the console. All of this is implemented under `/static`, and is only async-import()-d when the dev tools are enabled. Therefore, we can continue to add more tools, with zero performance cost to ordinary users of Discourse.
86 lines
4.1 KiB
JSON
86 lines
4.1 KiB
JSON
{
|
|
"name": "discourse",
|
|
"private": true,
|
|
"repository": "https://github.com/discourse/discourse",
|
|
"author": "Discourse",
|
|
"license": "GPL-2.0-only",
|
|
"devDependencies": {
|
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
"@discourse/lint-configs": "^2.2.1",
|
|
"@discourse/moment-timezone-names-translations": "^1.0.0",
|
|
"@fortawesome/fontawesome-free": "6.6.0",
|
|
"@glint/core": "^1.5.0",
|
|
"@glint/environment-ember-loose": "^1.5.0",
|
|
"@glint/environment-ember-template-imports": "^1.5.0",
|
|
"@glint/template": "^1.5.0",
|
|
"@mixer/parallel-prettier": "^2.0.3",
|
|
"@swc/core": "^1.10.6",
|
|
"chart.js": "3.5.1",
|
|
"chartjs-plugin-datalabels": "2.2.0",
|
|
"chrome-launcher": "^1.1.2",
|
|
"chrome-remote-interface": "^0.33.2",
|
|
"concurrently": "^9.1.2",
|
|
"ember-template-lint": "^6.0.0",
|
|
"esbuild": "^0.24.2",
|
|
"eslint": "^9.14.0",
|
|
"jsdoc": "^4.0.4",
|
|
"lefthook": "^1.10.1",
|
|
"licensee": "^11.1.1",
|
|
"lint-to-the-future": "^2.6.1",
|
|
"lint-to-the-future-ember-template": "^3.0.0",
|
|
"lint-to-the-future-eslint": "^2.2.0",
|
|
"magnific-popup": "1.1.0",
|
|
"moment": "2.30.1",
|
|
"moment-timezone": "0.5.45",
|
|
"pikaday": "1.8.2",
|
|
"prettier": "^2.8.8",
|
|
"puppeteer-core": "^23.11.1",
|
|
"squoosh": "https://codeload.github.com/discourse/squoosh/tar.gz/dc9649d",
|
|
"terser": "^5.37.0",
|
|
"typescript": "^5.7.2"
|
|
},
|
|
"scripts": {
|
|
"dev": "concurrently \"bin/ember-cli server --environment=development\" \"RAILS_ENV=development bin/rails server\"",
|
|
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
"lint:js": "eslint ./app/assets/javascripts $(script/list_bundled_plugins) --cache --no-error-on-unmatched-pattern",
|
|
"lint:js:fix": "eslint --fix ./app/assets/javascripts $(script/list_bundled_plugins) --no-error-on-unmatched-pattern",
|
|
"lint:hbs": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/admin/assets/javascripts/**/*.{gjs,hbs}'",
|
|
"lint:hbs:fix": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/admin/assets/javascripts/**/*.{gjs,hbs}' --fix",
|
|
"lint:prettier": "pnpm pprettier --list-different 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs,css}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets,test}/javascripts/**/*.{js,gjs,hbs}')",
|
|
"lint:prettier:fix": "pnpm prettier -w 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs,css}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets,test}/javascripts/**/*.{js,gjs,hbs}')",
|
|
"lttf:ignore": "lint-to-the-future ignore",
|
|
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
|
|
"lint-progress": "pnpm lttf:output && npx html-pages ./lint-progress --no-cache",
|
|
"ember": "pnpm --dir=app/assets/javascripts/discourse ember"
|
|
},
|
|
"engines": {
|
|
"node": ">= 18",
|
|
"npm": "please-use-pnpm",
|
|
"yarn": "please-use-pnpm",
|
|
"pnpm": ">= 9"
|
|
},
|
|
"pnpm": {
|
|
"patchedDependencies": {
|
|
"ember-this-fallback@0.4.0": "patches/ember-this-fallback@0.4.0.patch",
|
|
"babel-plugin-debug-macros@0.3.4": "patches/babel-plugin-debug-macros@0.3.4.patch",
|
|
"virtual-dom@2.1.1": "patches/virtual-dom@2.1.1.patch",
|
|
"licensee@11.1.1": "patches/licensee@11.1.1.patch",
|
|
"content-tag@3.1.0": "patches/content-tag@3.1.0.patch",
|
|
"@ember-compat/tracked-built-ins@0.9.1": "patches/@ember-compat__tracked-built-ins@0.9.1.patch",
|
|
"ember-source@5.12.0": "patches/ember-source@5.12.0.patch"
|
|
},
|
|
"peerDependencyRules": {
|
|
"allowedVersions": {
|
|
"lint-to-the-future-eslint>eslint": "*",
|
|
"@mixer/parallel-prettier>prettier": "*",
|
|
"lint-to-the-future-ember-template>ember-template-lint": "*",
|
|
"ember-this-fallback>ember-source": "*"
|
|
},
|
|
"ignoreMissing": [
|
|
"webpack"
|
|
]
|
|
}
|
|
}
|
|
}
|