Skip to content

Commit 4ea27e4

Browse files
committed
Inspection related changes.
1 parent bb2e6dd commit 4ea27e4

35 files changed

+105
-23
lines changed

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ the drop-down is toggled closed after the user selectes a date/time.
264264

265265
## I18N
266266

267-
All internationalization is handled by Moment.js, see Moment's documention for details.
267+
All internationalization is handled by Moment.js, see Moment's documentation for details.
268+
In most cases, all that is needed is a call to ```moment.locale(String)```
268269

269270
# Screenshots
270271

Diff for: contributing.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ cd angular-bootstrap-datetimepicker
1414
npm install -g grunt-cli
1515
npm install
1616
git checkout develop # all patches against develop branch, please!
17-
grunt # this runs tests and jshint
17+
gulp # this runs jscs, jshint, complexity checks, and unit tests.
1818
```
1919

2020
Very important notes
2121
====================
2222

2323
* **Pull pull requests to the `master` branch will be closed.** Please submit all pull requests to the `develop` branch.
2424
* **Pull requests will not be merged without unit tests.**
25-
* **Do not include the minified files in your pull request.**
25+
* **Do not include the minified files in your pull request.**
26+
* **Have good tests. If you don't have tests for very line and branch in your changes, I won't accept the PR.
27+
* **If your PR fails the CI build, I won't look at it.
2628

27-
Grunt tasks
29+
Gulp tasks
2830
===========
2931

30-
We use Grunt for managing the build. Here are some useful Grunt tasks:
32+
We use Gulp for managing the build. Here are some useful Gulp tasks:
3133

32-
* `grunt` The default task lints the code and runs the tests. You should make sure you do this before submitting a PR.
34+
* `gulp` The default task checks the coding style, lints the code, calculates complexity, runs the tests, and enforces code coverage. You should make sure you do this before submitting a PR.

Diff for: demo/demo-controller.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
/*globals angular, moment, $, console*/
1+
/*globals angular, moment, $ */
22

33
angular.module('demo.demoController', [])
44
.controller('demoController', [
55
'$scope',
6-
function ($scope) {
6+
'$log',
7+
function ($scope, $log) {
78
'use strict';
89
$scope.controllerName = 'demoController';
910

@@ -32,7 +33,7 @@ angular.module('demo.demoController', [])
3233
// However, can write this function to take any
3334
// action necessary once the user has selected a
3435
// date/time using the picker
35-
console.log(newDate);
36+
$log.info(newDate);
3637
$('#dropdown3').dropdown('toggle');
3738
};
3839

@@ -46,16 +47,16 @@ angular.module('demo.demoController', [])
4647

4748

4849
$scope.guardianOnSetTime = function ($index, guardian, newDate, oldDate) {
49-
console.log($index);
50-
console.log(guardian.name);
51-
console.log(newDate);
52-
console.log(oldDate);
50+
$log.info($index);
51+
$log.info(guardian.name);
52+
$log.info(newDate);
53+
$log.info(oldDate);
5354
angular.element('#guardian' + $index).dropdown('toggle');
5455
};
5556

5657
$scope.beforeRender = function ($dates) {
5758
var index = Math.floor(Math.random() * $dates.length);
58-
console.log(index);
59+
$log.info(index);
5960
$dates[index].selectable = false;
6061
};
6162

Diff for: demo/favicons/android-chrome-144x144.png

4.79 KB
Loading

Diff for: demo/favicons/android-chrome-192x192.png

6.37 KB
Loading

Diff for: demo/favicons/android-chrome-36x36.png

1.37 KB
Loading

Diff for: demo/favicons/android-chrome-48x48.png

1.74 KB
Loading

Diff for: demo/favicons/android-chrome-72x72.png

2.46 KB
Loading

Diff for: demo/favicons/android-chrome-96x96.png

3.25 KB
Loading

Diff for: demo/favicons/apple-touch-icon-114x114.png

3.77 KB
Loading

Diff for: demo/favicons/apple-touch-icon-120x120.png

3.98 KB
Loading

Diff for: demo/favicons/apple-touch-icon-144x144.png

4.79 KB
Loading

Diff for: demo/favicons/apple-touch-icon-152x152.png

5.05 KB
Loading

Diff for: demo/favicons/apple-touch-icon-180x180.png

5.94 KB
Loading

Diff for: demo/favicons/apple-touch-icon-57x57.png

2.02 KB
Loading

Diff for: demo/favicons/apple-touch-icon-60x60.png

2.1 KB
Loading

Diff for: demo/favicons/apple-touch-icon-72x72.png

2.46 KB
Loading

Diff for: demo/favicons/apple-touch-icon-76x76.png

2.6 KB
Loading

Diff for: demo/favicons/apple-touch-icon-precomposed.png

5.98 KB
Loading

Diff for: demo/favicons/apple-touch-icon.png

5.94 KB
Loading

Diff for: demo/favicons/browserconfig.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square70x70logo src="/demo/favicons/mstile-70x70.png"/>
6+
<square150x150logo src="/demo/favicons/mstile-150x150.png"/>
7+
<square310x310logo src="/demo/favicons/mstile-310x310.png"/>
8+
<wide310x150logo src="/demo/favicons/mstile-310x150.png"/>
9+
<TileColor>#da532c</TileColor>
10+
</tile>
11+
</msapplication>
12+
</browserconfig>

Diff for: demo/favicons/favicon-16x16.png

1.27 KB
Loading

Diff for: demo/favicons/favicon-32x32.png

1.21 KB
Loading

Diff for: demo/favicons/favicon-96x96.png

3.25 KB
Loading

Diff for: demo/favicons/favicon.ico

14.7 KB
Binary file not shown.

Diff for: demo/favicons/manifest.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "Angular Bootstrap Datetime picker",
3+
"icons": [
4+
{
5+
"src": "\/android-chrome-36x36.png",
6+
"sizes": "36x36",
7+
"type": "image\/png",
8+
"density": "0.75"
9+
},
10+
{
11+
"src": "\/android-chrome-48x48.png",
12+
"sizes": "48x48",
13+
"type": "image\/png",
14+
"density": "1.0"
15+
},
16+
{
17+
"src": "\/android-chrome-72x72.png",
18+
"sizes": "72x72",
19+
"type": "image\/png",
20+
"density": "1.5"
21+
},
22+
{
23+
"src": "\/android-chrome-96x96.png",
24+
"sizes": "96x96",
25+
"type": "image\/png",
26+
"density": "2.0"
27+
},
28+
{
29+
"src": "\/android-chrome-144x144.png",
30+
"sizes": "144x144",
31+
"type": "image\/png",
32+
"density": "3.0"
33+
},
34+
{
35+
"src": "\/android-chrome-192x192.png",
36+
"sizes": "192x192",
37+
"type": "image\/png",
38+
"density": "4.0"
39+
}
40+
]
41+
}

Diff for: demo/favicons/mstile-144x144.png

4.78 KB
Loading

Diff for: demo/favicons/mstile-150x150.png

4.83 KB
Loading

Diff for: demo/favicons/mstile-310x150.png

5.37 KB
Loading

Diff for: demo/favicons/mstile-310x310.png

10.6 KB
Loading

Diff for: demo/favicons/mstile-70x70.png

3.44 KB
Loading

Diff for: demo/index.html

+19
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@
1212
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
1313
<title>Angular Bootstrap - Date Time Picker Demo</title>
1414
<base href="..">
15+
16+
<link rel="apple-touch-icon" sizes="57x57" href="/demo/favicons/apple-touch-icon-57x57.png">
17+
<link rel="apple-touch-icon" sizes="60x60" href="/demo/favicons/apple-touch-icon-60x60.png">
18+
<link rel="apple-touch-icon" sizes="72x72" href="/demo/favicons/apple-touch-icon-72x72.png">
19+
<link rel="apple-touch-icon" sizes="76x76" href="/demo/favicons/apple-touch-icon-76x76.png">
20+
<link rel="apple-touch-icon" sizes="114x114" href="/demo/favicons/apple-touch-icon-114x114.png">
21+
<link rel="apple-touch-icon" sizes="120x120" href="/demo/favicons/apple-touch-icon-120x120.png">
22+
<link rel="apple-touch-icon" sizes="144x144" href="/demo/favicons/apple-touch-icon-144x144.png">
23+
<link rel="apple-touch-icon" sizes="152x152" href="/demo/favicons/apple-touch-icon-152x152.png">
24+
<link rel="apple-touch-icon" sizes="180x180" href="/demo/favicons/apple-touch-icon-180x180.png">
25+
<link rel="icon" type="image/png" href="/demo/favicons/favicon-32x32.png" sizes="32x32">
26+
<link rel="icon" type="image/png" href="/demo/favicons/android-chrome-192x192.png" sizes="192x192">
27+
<link rel="icon" type="image/png" href="/demo/favicons/favicon-96x96.png" sizes="96x96">
28+
<link rel="icon" type="image/png" href="/demo/favicons/favicon-16x16.png" sizes="16x16">
29+
<link rel="manifest" href="/demo/favicons/manifest.json">
30+
<meta name="msapplication-TileColor" content="#da532c">
31+
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
32+
<meta name="theme-color" content="#ffffff">
33+
1534
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
1635
<link rel="stylesheet" href="src/css/datetimepicker.css">
1736
<script type="text/javascript" src="bower_components/jquery/dist/jquery.js"></script>

Diff for: gulpfile.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ var karma = require('karma').server;
99
var karmaConfig = __dirname + '/karma.conf.js';
1010
var lodash = require('lodash');
1111
var paths = require('./paths');
12-
var plato = require('gulp-plato');
12+
var plato = require('plato');
1313

14-
gulp.task('complexity', function () {
15-
return gulp.src('src/**/*.js')
16-
.pipe(plato('complexity'));
14+
gulp.task('complexity', function (done) {
15+
16+
var callback = function () {
17+
done();
18+
};
19+
20+
plato.inspect(paths.lint, 'complexity', {title: 'prerender', recurse: true}, callback);
1721
});
1822

1923
var testConfig = function (options) {

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"gulp": "^3.8.11",
2121
"gulp-jscs": "^1.4.0",
2222
"gulp-jshint": "^1.9.4",
23-
"gulp-plato": "^1.0.2",
2423
"jshint": "^2.6.0",
2524
"jshint-stylish": "^1.0.1",
2625
"karma": "^0.12.31",
@@ -33,6 +32,7 @@
3332
"lodash": "^3.5.0",
3433
"matchdep": "^0.3.0",
3534
"phantomjs": "^1.9.12",
35+
"plato": "^1.5.0",
3636
"run-browser": "^2.0.2",
3737
"tape": "^3.5.0"
3838
},

Diff for: paths.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ var bower = [
88
'bower_components/angular/angular.js',
99
'bower_components/angular-mocks/angular-mocks.js'
1010
];
11+
var bumpFiles = ['package.json', 'bower.json', 'README.md', 'src/js/*.js', 'src/css/*.css'];
12+
var miscFiles = ['GruntFile.js', 'gulpfile.js', 'karma.conf.js', 'paths.js'];
13+
var demoFiles = ['demo/**/*.js'];
1114
var sourceFiles = ['src/**/*.js'];
1215
var testFiles = ['test/**/*.spec.js'];
13-
var miscFiles = ['demo/**/*.js'];
14-
var bumpFiles = ['package.json', 'bower.json', 'README.md', 'src/js/*.js', 'src/css/*.css'];
1516

1617
module.exports = {
17-
all: bower.concat(sourceFiles).concat(testFiles).concat(miscFiles),
18+
all: bower.concat(sourceFiles).concat(testFiles).concat(demoFiles),
1819
app: sourceFiles,
1920
bump: bumpFiles,
20-
lint: ['GruntFile.js', 'gulpfile.js', 'karma.conf.js', 'paths.js', 'test/**/*.test.js'].concat(sourceFiles).concat(testFiles).concat(miscFiles),
21+
lint: miscFiles.concat(sourceFiles).concat(testFiles).concat(miscFiles),
22+
src: sourceFiles,
2123
test: testFiles
2224
};

0 commit comments

Comments
 (0)