Skip to content

Commit

Permalink
1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzepinski committed Jan 16, 2017
1 parent e8347cc commit 0c81b2d
Show file tree
Hide file tree
Showing 19 changed files with 861 additions and 798 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
40 changes: 0 additions & 40 deletions .jshintrc

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ You can disable all default loaded plugins.
}]);
~~~~

`clearDefaultPlugins` takes one argument:
* keepPlugins [Array][optional] - you can keep some plugins after clear action

#### Change refresh interval

You can set your own interval time. Default is `1000 ms`.

~~~~javascript
.config(['debugBarProvider', function (debugBarProvider) {
debugBarProvider.setRefreshInterval(10000);
debugBarProvider.setRefreshInterval(1000);
}]);
~~~~

Expand Down
11 changes: 4 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-debug-bar",
"version": "1.0.0",
"version": "1.1.0",
"author": "Maciej Rzepinski",
"description": "AngularJS Debug Bar",
"homepage": "https://github.com/mrzepinski/angular-debug-bar",
Expand All @@ -16,16 +16,13 @@
".jshintrc"
],
"devDependencies": {
"angular": "1.3.15",
"angular-route": "1.3.15"
"angular": ">=1.2.0",
"angular-route": ">=1.2.0"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"resolutions": {
"angular": "1.3.15"
}
]
}
45 changes: 22 additions & 23 deletions demo/app/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
(function (window, angular, undefined) {
'use strict';
'use strict';
angular.module('adb', [
'ngRoute',
'adb.routing',
'angular-debug-bar',
'adb.controllers'
]).config(appConfig);

angular.module('adb', [
'ngRoute',
'adb.routing',
'angular-debug-bar',
'adb.controllers'
]).config(['debugBarProvider', function (debugBarProvider) {
// change interval
debugBarProvider.setRefreshInterval(2000);
appConfig.$inject = ['debugBarProvider'];

// clear all default plugins
debugBarProvider.clearDefaultPlugins();
function appConfig (debugBarProvider) {
debugBarProvider.setRefreshInterval(2000);
debugBarProvider.clearDefaultPlugins();
debugBarProvider.registerPlugin('numberOfRequests', numberOfRequests, {
label: 'Number of requests'
});
}

// register only one custom plugin
debugBarProvider.registerPlugin('numberOfRequests', function () {
if ('getEntriesByType' in window.performance) {
return window.performance.getEntriesByType('resource').length
}
return 'N/A';
}, {
label: 'Number of requests'
});
}]);

}(window, window.angular));
function numberOfRequests () {
if ('getEntriesByType' in window.performance) {
return window.performance.getEntriesByType('resource').length
}
return 'N/A';
}
}(window, window.angular));
8 changes: 3 additions & 5 deletions demo/app/controllers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
(function (angular, undefined) {
'use strict';

angular.module('adb.controllers', []);

}(window.angular));
'use strict';
angular.module('adb.controllers', []);
}(window.angular));
9 changes: 6 additions & 3 deletions demo/app/home/HomeCtrl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
(function (angular, undefined) {
'use strict';
'use strict';
angular.module('adb.controllers')
.controller('HomeCtrl', HomeCtrl);

angular.module('adb.controllers').controller('HomeCtrl', ['$scope', function ($scope) {}]);
HomeCtrl.$inject = ['$scope'];

}(window.angular));
function HomeCtrl ($scope) {}
}(window.angular));
36 changes: 18 additions & 18 deletions demo/app/routing.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
(function (angular, undefined) {
'use strict';
'use strict';
angular.module('adb.routing', [])
.config(routeConfig);

angular.module('adb.routing', []).config(['$routeProvider', function ($routeProvider) {
routeConfig.$inject = ['$routeProvider'];

$routeProvider
.when('/home', {
templateUrl: 'app/home/home.html',
controller: 'HomeCtrl'
})
.when('/test', {
templateUrl: 'app/test/test.html',
controller: 'TestCtrl'
})
.otherwise({
redirectTo: '/home'
});

}]);

}(window.angular));
function routeConfig ($routeProvider) {
$routeProvider.when('/home', {
templateUrl: 'app/home/home.html',
controller: 'HomeCtrl'
});
$routeProvider.when('/test', {
templateUrl: 'app/test/test.html',
controller: 'TestCtrl'
});
$routeProvider.otherwise({
redirectTo: '/home'
});
}
}(window.angular));
55 changes: 28 additions & 27 deletions demo/app/test/TestCtrl.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
(function (angular, undefined) {
'use strict';
'use strict';
angular.module('adb.controllers')
.controller('TestCtrl', TestCtrl);

angular.module('adb.controllers').controller('TestCtrl', ['$scope', function ($scope) {
TestCtrl.$inject = ['TestCtrl'];

$scope.books = [
{
title: 'ng-book',
authors: [
{
name: 'Ari Lerner'
}
]
},
{
title: 'AngularJS',
authors: [
{
name: 'Brad Green'
},
{
name: 'Shyam Seshadri'
}
]
}
];

}]);

}(window.angular));
function TestCtrl ($scope) {
$scope.books = [
{
title: 'ng-book',
authors: [
{
name: 'Ari Lerner'
}
]
},
{
title: 'AngularJS',
authors: [
{
name: 'Brad Green'
},
{
name: 'Shyam Seshadri'
}
]
}
];
}
}(window.angular));
16 changes: 8 additions & 8 deletions demo/app/test/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ <h2>AngularJS Books</h2>
<p>More values, watches and DOM objects.</p>

<ul>
<li ng-repeat="book in books track by $index">
<strong>{{ book.title }}</strong>
- author[s]:
<span ng-repeat="author in book.authors track by $index">
{{ author.name }}{{ !$last ? ', ' : '' }}
</span>
</li>
</ul>
<li ng-repeat="book in books track by $index">
<strong>{{ book.title }}</strong>
- author[s]:
<span ng-repeat="author in book.authors track by $index">
{{ author.name }}{{ !$last ? ', ' : '' }}
</span>
</li>
</ul>
50 changes: 25 additions & 25 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>AngularJS Debug Bar</title>
<meta charset="utf-8" />
<head>
<title>AngularJS Debug Bar</title>
<meta charset="utf-8"/>

<!-- CSS -->
<link rel="stylesheet" href="../dist/css/angular-debug-bar.css" />
<!-- CSS -->
<link rel="stylesheet" href="../dist/css/angular-debug-bar.min.css"/>

<!-- JS -->
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/angular-route/angular-route.js"></script>
<script type="text/javascript" src="../dist/js/angular-debug-bar.js"></script>
<script type="text/javascript" src="app/routing.js"></script>
<script type="text/javascript" src="app/controllers.js"></script>
<script type="text/javascript" src="app/home/HomeCtrl.js"></script>
<script type="text/javascript" src="app/test/TestCtrl.js"></script>
<script type="text/javascript" src="app/bootstrap.js"></script>
</head>
<body ng-app="adb">
<h1>AngularJS Debug Bar</h1>
<!-- JS -->
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/angular-route/angular-route.js"></script>
<script type="text/javascript" src="../dist/js/angular-debug-bar.min.js"></script>
<script type="text/javascript" src="app/routing.js"></script>
<script type="text/javascript" src="app/controllers.js"></script>
<script type="text/javascript" src="app/home/HomeCtrl.js"></script>
<script type="text/javascript" src="app/test/TestCtrl.js"></script>
<script type="text/javascript" src="app/bootstrap.js"></script>
</head>
<body ng-app="adb">
<h1>AngularJS Debug Bar</h1>

<ul>
<li><a href="#/home">Home</a></li>
<li><a href="#/test">Test page to see as values changes</a></li>
</ul>
<ul>
<li><a href="#/home">Home</a></li>
<li><a href="#/test">Test page to see as values changes</a></li>
</ul>

<ng-view></ng-view>
<ng-view></ng-view>

<angular-debug-bar></angular-debug-bar>
</body>
</html>
<angular-debug-bar></angular-debug-bar>
</body>
</html>

0 comments on commit 0c81b2d

Please sign in to comment.