Jetpack/FAQ: Difference between revisions

Jump to navigation Jump to search
added button json code for preferences in builder
(added button json code for preferences in builder)
Line 258: Line 258:
''Builder lacks end-user documentation; what follows are some common issues encountered when trying to use builder.''
''Builder lacks end-user documentation; what follows are some common issues encountered when trying to use builder.''


* '''Adding preferences or other custom values to package.json''': To add preferences to package.json for an add-on you've created using buider, you need to take the following steps:
* '''Adding preferences or other custom values to package.json''': To add preferences to package.json for an add-on you've created using builder, you need to take the following steps:


# click on the 'gear' button to open the add-on properties dialog
# Click on the 'gear' button to open the add-on properties dialog.
 
# In the field at the bottom of the dialog labeled 'Extra package.json Properties', paste in your JSON properties:
# in the field at the bottom of the dialog labeled 'Extra package.json Properties', paste in your JSON properties:


<pre>
<pre>
Line 283: Line 282:
      "type": "bool",
      "type": "bool",
      "value": false
      "value": false
}]
  },
          {
              "name": "buttonPreference",
              "title": "Button preference title",
              "type": "control",
      "label": "Text that appears in the button"
          }]
}
}
</pre>
</pre>


Please note that the JSON fragment ''requires'' the enclosing curly braces - in other words the pasted text needs to be a complete JSON value.
Please note that the JSON fragment ''requires'' the enclosing curly braces - in other words the pasted text needs to be a complete JSON value.

Navigation menu