• Stars
    star
    170
  • Rank 223,357 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ” Marionette Inspector - Explore your App

Marionette Inspector

Functionality

The inspector makes it possible to understand how your App works, without needing to understand how all the code works. This is possible because everything's one click away. You'll be amazed at how quickly this changes everything.

  • Visualize the view hierarchy with the UI tree
  • Visualize application activity with a full history of actions
  • Inspect view ui, events, listeners, properties
  • Inspect model attributes, listeners, properties
  • Explore Radio channel events, requests, commands
  • Explore application with an inspector magnifying glass
  • Jump between the inspector elements and source panel with intelligent links

Try it out on a live app!

Once you've installed the Chrome or Firefox extension, open the DevTools, click on the "Marionette" tab, and inspect this app!

Marionette Wires


Getting Started

Download it

The inspector should work out of the box with most setups. You can download it from the Chrome Web Store.

Usage

  • Load the app in Google Chrome or Firefox
  • Open the devtools (F12 or Ctrl + Shift + I)
  • Select Marionette tab
  • Click in 'Start the Inspector!' button

The extension icon next to URL bar has no functionality and can be ignored

Setup

Libraries

If you're either using Browserify or Webpack or not exposing Backbone & Marionette as globals, you'll need to add one block to your setup.

if (window.__agent) {
  window.__agent.start(Backbone, Marionette);
}

Note this line should be placed after all underscore, backbone, and marionette CommonJS require calls, but before Application or View classes are defined.

Since EcmaScript import statements are hoisted, i.e., always called in the start of the module, putting __agent.start call before the import of a module that defines an Marionette class will not work. See related issue. When using EcmaScript modules is recommended to put the __agent.start call in a separated module as in Marionette Wires

UI Layout

The topmost view must be set to layout or rootView property of a Marionette Application instance. Alternatively, the view instance show in Aplication.region will be used to build the UI tree.

Examples here and here

Frequently Asked Questions

If you have any additional questions, check out our FAQ.

Usage Analytics

The Inspector gathers usage analytics to better report on inspector statistics such as average weekly users and popular features as well as to report on marionette patterns such as library versions in usage and architectural / api patterns. If you would prefer to disable analytics it is easy to do so:

if (window.__agent) {
  window.__agent.disableAnalytics = true;
}

Current version does not implement usage analytics

Play with it locally

Follows these these steps in the Install Guide and you should be up and running in no time. Read the agent overview to understand how the inspector gathers all the information.

TLDR version

1. Download the Extension

git clone https://github.com/marionettejs/marionette.inspector.git

2. Build the Extension

npm i
npm run bower
grunt build

3a. Install in Chrome

1. go to the Extensions tab in chrome > Window
2. check the "Developer Mode" checkbox
3. click the "Load unpacked extension" and select the extension folder in the repo

3b. Install in Firefox

1. go to the Add-ons page (`about:addons`)
2. click on preferences button (in top right) and select "Debug Add-ons"
3. click the "Load Temporary Add-on" and select the extension folder in the repo

Open Source (a.k.a. you)

The inspector is built with 100% open source love. That means, we absolutely want your help and your passion. If you want to get involved, stop by and say hello here. We've got tons of help wanted tickets and would be be happy to setup a 30 minute screenhero pairing session to help you get started. Many of our contributions, even some of the best ones like the Activity pane, came from first time contributors.


Special Thanks

Etsy - The Inspector was largely built as an open-source project at Etsy.

Backbone-Debugger - The Inspector is built on top of the Backbone Debugger core, written in large part by @Maluen.


Screens

UI


Data


Radio


Activity

More Repositories

1

backbone.marionette

The Backbone Framework
JavaScript
7,068
star
2

backbone.syphon

Serialize a Backbone.View in to a JavaScript object.
JavaScript
496
star
3

backbone.radio

Messaging patterns for Backbone applications.
JavaScript
490
star
4

backbone.babysitter

Manage child views for your Backbone.View (and other parents)
JavaScript
378
star
5

backbone.wreqr

Messaging patterns for Backbone applications.
JavaScript
346
star
6

bbclonemail

[ Deprecated ] A Marionette.js reference application, cloning basic GMail features
JavaScript
219
star
7

marionette-integrations

A collection of starter kits for building Marionette Applications
JavaScript
118
star
8

backbone.eventbinder

❌ [Deprecated] Manage Backbone Events Better
JavaScript
79
star
9

Marionette.Upgrade

Helps you upgrade your marionette apps from 1.x ➑️ 2.x
Python
42
star
10

backbone-metal

Classes, Mixins, Errors, and more.
JavaScript
31
star
11

guides

Learn how to build web apps using Marionette
27
star
12

backbone.marionette.async

❌ [Deprecated] Asynchronous template loading, rendering and more, for Backbone.Marionette
JavaScript
27
star
13

marionettejs.com

🚩 Source files for the Marionette site
Pug
26
star
14

marionette

JavaScript
22
star
15

marionette-v3-compat

Transitional monkey patch to make Marionette v3 compatible with v2.
JavaScript
8
star
16

www

❌ [deprecated] The old Marionette website
JavaScript
6
star
17

marionette.approuter

Extends the Backbone.Router to make it easier to construct a large number of routes for your app.
JavaScript
5
star
18

blog

πŸ“ Blog for Marionettejs.com (hosted on the gh-pages branch)
CSS
4
star
19

marionette.oldcollectionview

Legacy Marionette v3 CollectionView and CompositeView
JavaScript
2
star
20

marionette.module

The (deprecated) Marionette.Module Class as a standalone library.
JavaScript
2
star
21

marionette.templatecache

Renderer which provides a cache for retrieving templates from script blocks in your HTML. This improved the speed of subsequent calls to get a template.
JavaScript
2
star
22

backbone-emulate-collection

Proxies underscore events to match a Backbone.Collection
JavaScript
1
star