Batarangle is a Google Chrome Dev Tools extension for debugging Angular 2 applications. Treat this as a "developer preview". Unitl the official release, please follow instructions below to build the tool locally and install it from source. It's actually quite easy.
If you want to contribute or need help getting started, join us on Slack.
To develop this extension, the following environment is used:
- Node v4.2.1
- NPM 3.3.10
- TypeScript 1.6.2
- tsd 0.6.5
In addition, example applications all run with a globablly installed version of jspm 0.16.12.
- Clone this repository:
git clone git:https://github.com/rangle/batarangle
. - Run
npm install
. - Run
npm run build
(errors related to typing files conflicts can be ignore for now). - Navigate to chrome:https://extensions and enable Developer Mode.
- Choose "Load unpacked extension".
- In the dialog, open the directory you just cloned.
To try out with an example application, refer to instructions in README.
In order to use this extension with your own application, you will need to make a slight modification to your code. See section Current Limitation below for more detailed instructions.
To execute all unit tests, run npm test
. It bundles up all files that match *.test.ts
into build/test.js
, then runs it through tape-run in a headless Electron browser.
build
Build the extensionwebpack
Run webpackclean
Cleannode_modules
andtypings
,remove-tsd-loader-typings
Remove tsd loader typingstsd-update
Update tsdpostinstall
Update tsd and install/link typingsstart
Clean build and run webpack in watch modetest
Bundle all *.test.ts and run it through a headless browser
As of the latest release, if you would like to use this extension to debug your application, you will need to bind the default AppViewListener
to DebugElementViewListener
during the bootstrapping of your app. It should look something like this:
bootstrap(App, [
bind(AppViewListener).toClass(DebugElementViewListener),
...
<other dependencies>
...
]);
You can also take a look at how it's done in the example app. This issue will be resolved at official release.
We are working hard towards the official release. But at the mean time, you can take a look at our milestones to see what new features are in place.