Bug 1448077 - Move devtools-startup preferences file to dedicated /preferences folder;r=jryans
Changing the name for consistency purposes (see RFC
https://github.com/devtools-html/rfcs/issues/43)
MozReview-Commit-ID: EahEwoR9eBF
--- a/.eslintignore
+++ b/.eslintignore
@@ -148,17 +148,17 @@ devtools/client/commandline/**
# also being an imported repository.
devtools/client/debugger/**
# Ignore devtools imported repositories
devtools/client/debugger/new/**
# Ignore devtools preferences files
devtools/client/preferences/**
-devtools/startup/devtools-startup-prefs.js
+devtools/startup/preferences/devtools-startup.js
# Ignore devtools third-party libs
devtools/shared/jsbeautify/*
devtools/shared/acorn/*
devtools/shared/gcli/source/*
devtools/shared/node-properties/*
devtools/shared/pretty-fast/*
devtools/shared/sourcemap/*
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -420,17 +420,17 @@
; [Webide Files]
@RESPATH@/browser/chrome/webide@JAREXT@
@RESPATH@/browser/chrome/webide.manifest
@RESPATH@/browser/@PREF_DIR@/webide.js
; [DevTools Startup Files]
@RESPATH@/browser/chrome/devtools-startup@JAREXT@
@RESPATH@/browser/chrome/devtools-startup.manifest
-@RESPATH@/browser/@PREF_DIR@/devtools-startup-prefs.js
+@RESPATH@/browser/@PREF_DIR@/devtools-startup.js
; DevTools
@RESPATH@/browser/chrome/devtools@JAREXT@
@RESPATH@/browser/chrome/devtools.manifest
@RESPATH@/browser/@PREF_DIR@/devtools.js
@RESPATH@/browser/@PREF_DIR@/debugger.js
; shell icons
--- a/devtools/docs/preferences.md
+++ b/devtools/docs/preferences.md
@@ -67,22 +67,22 @@ value does not match the preference type
These APIs are very similar for each preference type.
## Create a new preference
To create a new preference, it should be assigned a default value. Default preferences are
defined in preferences files such as:
- devtools/client/preferences/devtools.js
- devtools/client/preferences/debugger.js
-- devtools/startup/devtools-startup-prefs.js
+- devtools/startup/preferences/devtools-startup.js
Most new preferences should go in devtools/client/preferences/devtools.js. Debugger
specific preferences should go in devtools/client/preferences/debugger.js. Finally if a
preference needs to be available very early during the Firefox startup sequence, it should
-go in devtools/startup/devtools-startup-prefs.js.
+go in devtools/startup/preferences/devtools-startup.js.
### Projects using Launchpad
At the time of writing this doc, projects using Launchpad have to duplicate the default
definition of a preference.
* debugger.html: update [src/utils/prefs.js](https://github.com/devtools-html/debugger.html/blob/master/src/utils/prefs.js)
* netmonitor: update [index.js](http://searchfox.org/mozilla-central/source/devtools/client/netmonitor/index.js)
* webconsole: update [local-dev/index.js](http://searchfox.org/mozilla-central/source/devtools/client/webconsole/local-dev/index.js)
--- a/devtools/startup/moz.build
+++ b/devtools/startup/moz.build
@@ -1,18 +1,18 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn']
-JS_PREFERENCE_PP_FILES += [
- 'devtools-startup-prefs.js',
+DIRS += [
+ 'preferences',
]
# Register the startup components only for 'all' builds.
if CONFIG['MOZ_DEVTOOLS'] == 'all':
EXTRA_COMPONENTS += [
'aboutdebugging-registration.js',
'aboutdebugging.manifest',
'aboutdevtoolstoolbox-registration.js',
rename from devtools/startup/devtools-startup-prefs.js
rename to devtools/startup/preferences/devtools-startup.js
new file mode 100644
--- /dev/null
+++ b/devtools/startup/preferences/moz.build
@@ -0,0 +1,9 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+JS_PREFERENCE_PP_FILES += [
+ 'devtools-startup.js'
+]