Skip to content

Commit 6a4b171

Browse files
committed
Merge branch 'release/0.3.15'
2 parents d57ec85 + 9b71902 commit 6a4b171

18 files changed

+446
-200
lines changed

.csscomb.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"remove-empty-rulesets": true,
3+
"always-semicolon": true,
4+
"color-case": "lower",
5+
"block-indent": " ",
6+
"color-shorthand": false,
7+
"element-case": "lower",
8+
"eof-newline": true,
9+
"leading-zero": true,
10+
"quotes": "single",
11+
"sort-order-fallback": "abc",
12+
"space-before-colon": "",
13+
"space-after-colon": " ",
14+
"space-before-combinator": " ",
15+
"space-after-combinator": " ",
16+
"space-between-declarations": "\n",
17+
"space-before-opening-brace": " ",
18+
"space-after-opening-brace": "\n",
19+
"space-after-selector-delimiter": "\n",
20+
"space-before-selector-delimiter": "",
21+
"space-before-closing-brace": "\n",
22+
"strip-spaces": true,
23+
"tab-size": true,
24+
"unitless-zero": true,
25+
"vendor-prefix-align": true
26+
}

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- '0.12'
4+
- '4.1'
55
branches:
66
except:
77
- gh-pages

Gruntfile.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ module.exports = function (grunt) {
66
// load all grunt tasks
77
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
88

9+
var paths = require('./paths');
10+
911
// Project configuration.
1012
grunt.initConfig({
1113
bump: {
1214
options: {
13-
files: ['package.json', 'bower.json', 'README.md', 'src/js/*.js', 'src/css/*.css'],
15+
files: paths.bump,
1416
updateConfigs: [],
1517
commit: false,
1618
createTag: false,

README.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Angular bootstrap date & time picker version: 0.3.14
1+
# Angular bootstrap date & time picker version: 0.3.15
22

33
Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
44

@@ -305,7 +305,34 @@ If the minute view is the minView, which is is by default, the date will be set
305305

306306
## License
307307

308-
angular-bootstrap-datetimepicker is freely distributable under the terms of the [MIT license](LICENSE).
308+
angular-bootstrap-datetimepicker is released under the MIT license and is copyright 2015 Knight Rider Consulting, Inc.. Boiled down to smaller chunks, it can be described with the following conditions.
309+
310+
## It requires you to:
311+
312+
* Keep the license and copyright notice included in angular-bootstrap-datetimepicker's CSS and JavaScript files when you use them in your works
313+
314+
## It permits you to:
315+
316+
* Freely download and use angular-bootstrap-datetimepicker, in whole or in part, for personal, private, company internal, or commercial purposes
317+
* Use angular-bootstrap-datetimepicker in packages or distributions that you create
318+
* Modify the source code
319+
* Grant a sublicense to modify and distribute angular-bootstrap-datetimepicker to third parties not included in the license
320+
321+
## It forbids you to:
322+
323+
* Hold the authors and license owners liable for damages as angular-bootstrap-datetimepicker is provided without warranty
324+
* Hold the creators or copyright holders of angular-bootstrap-datetimepicker liable
325+
* Redistribute any piece of angular-bootstrap-datetimepicker without proper attribution
326+
* Use any marks owned by Knight Rider Consulting, Inc. in any way that might state or imply that Knight Rider Consulting, Inc. endorses your distribution
327+
* Use any marks owned by Knight Rider Consulting, Inc. in any way that might state or imply that you created the Knight Rider Consulting, Inc. software in question
328+
329+
## It does not require you to:
330+
331+
* Include the source of angular-bootstrap-datetimepicker itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it
332+
* Submit changes that you make to angular-bootstrap-datetimepicker back to the angular-bootstrap-datetimepicker project (though such feedback is encouraged)
333+
334+
The full angular-bootstrap-datetimepicker license is located [in the project repository](https://github.com/dalelotts/angular-bootstrap-datetimepicker/blob/master/LICENSE) for more information.
335+
309336

310337
## Donating
311338
Support this project and other work by Dale Lotts via [gittip][gittip-dalelotts].

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-datetimepicker",
3-
"version": "0.3.14",
3+
"version": "0.3.15",
44
"description": "This directive allows you to add a datetime-picker to your form.",
55
"author": "https://github.com/dalelotts/angular-bootstrap-datetimepicker/graphs/contributors",
66
"license": "MIT",

demo/demo-controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ angular.module('demo.demoController', [])
5555
};
5656

5757
$scope.beforeRender = function ($dates) {
58-
var index = Math.floor(Math.random() * $dates.length);
58+
var index = Math.ceil($dates.length / 2);
5959
$log.info(index);
6060
$dates[index].selectable = false;
6161
};

demo/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ <h3>ng-repeat with drop-down using text link</h3>
326326

327327
<div class="col-sm-6">
328328
<h3>Drop-down Datetime with restricted dates</h3>
329-
<h4>One date is randomly disabled on each view</h4>
329+
<h4>One date - somewhere near the middle of the display - is disabled on each view</h4>
330330

331331
<p><code>dropdownSelector: '#dropdown6'</code> to toggle the dropdown.</p>
332332

gulpfile.js

+54-23
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ var paths = require('./paths');
1212
var plato = require('plato');
1313
var Server = require('karma').Server;
1414

15+
gulp.task('build-css', ['scss'], function () {
16+
var Comb = require('csscomb');
17+
var config = require('./.csscomb.json');
18+
var comb = new Comb(config);
19+
comb.processPath('./src/css/');
20+
});
21+
1522
gulp.task('complexity', function (done) {
1623

1724
var callback = function () {
@@ -29,6 +36,43 @@ gulp.task('csslint', function () {
2936
.pipe(csslint.failReporter());
3037
});
3138

39+
gulp.task('jscs', function () {
40+
return gulp
41+
.src(paths.lint)
42+
.pipe(jscs('.jscsrc'));
43+
});
44+
45+
gulp.task('lint', function () {
46+
return gulp
47+
.src(paths.lint)
48+
.pipe(jshint('.jshintrc'))
49+
.pipe(jshint.reporter('default', {verbose: true}))
50+
.pipe(jshint.reporter('jshint-stylish'))
51+
.pipe(jshint.reporter('fail'));
52+
});
53+
54+
55+
gulp.task('scss', ['scss-lint'], function () {
56+
var scss = require('gulp-sass');
57+
var postcss = require('gulp-postcss');
58+
var sourcemaps = require('gulp-sourcemaps');
59+
var autoprefixer = require('autoprefixer');
60+
61+
return gulp.src(paths.scss)
62+
.pipe(scss())
63+
.pipe(sourcemaps.init())
64+
.pipe(postcss([autoprefixer({browsers: ['last 2 versions']})]))
65+
.pipe(sourcemaps.write('.'))
66+
.pipe(gulp.dest('./src/css'));
67+
});
68+
69+
gulp.task('scss-lint', function () {
70+
var scssLint = require('gulp-scss-lint');
71+
var scssLintStylish = require('gulp-scss-lint-stylish');
72+
return gulp.src('./src/scss/*.scss')
73+
.pipe(scssLint({customReport: scssLintStylish}));
74+
});
75+
3276
var testConfig = function (options) {
3377
var travisOptions = process.env.TRAVIS &&
3478
{
@@ -39,49 +83,36 @@ var testConfig = function (options) {
3983
return lodash.assign(options, travisOptions);
4084
};
4185

42-
gulp.task('test', function (done) {
86+
gulp.task('tdd', function (done) {
87+
gulp.watch(paths.all.concat(paths.scss), ['jscs', 'lint', 'build-css']);
4388

4489
var config = testConfig(
4590
{
91+
autoWatch: true,
92+
browsers: ['PhantomJS'],
4693
configFile: karmaConfig,
47-
singleRun: true,
48-
reporters: ['progress', 'coverage', 'threshold']
94+
singleRun: false
4995
}
5096
);
5197

5298
var server = new Server(config, done);
5399
server.start();
54100
});
55101

56-
gulp.task('tdd', function (done) {
57-
gulp.watch(paths.all, ['jscs', 'lint', 'csslint']);
102+
103+
gulp.task('test', function (done) {
58104

59105
var config = testConfig(
60106
{
61-
autoWatch: true,
62-
browsers: ['PhantomJS'],
63107
configFile: karmaConfig,
64-
singleRun: false
108+
singleRun: true,
109+
reporters: ['progress', 'coverage', 'threshold']
65110
}
66111
);
67112

68113
var server = new Server(config, done);
69114
server.start();
70115
});
71116

72-
gulp.task('lint', function () {
73-
return gulp
74-
.src(paths.lint)
75-
.pipe(jshint('.jshintrc'))
76-
.pipe(jshint.reporter('default', {verbose: true}))
77-
.pipe(jshint.reporter('jshint-stylish'))
78-
.pipe(jshint.reporter('fail'));
79-
});
80-
81-
gulp.task('jscs', function () {
82-
return gulp
83-
.src(paths.lint)
84-
.pipe(jscs('.jscsrc'));
85-
});
86117

87-
gulp.task('default', ['jscs', 'lint', 'csslint', 'complexity', 'test']);
118+
gulp.task('default', ['jscs', 'lint', 'complexity', 'csslint', 'test']);

package.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-datetimepicker",
3-
"version": "0.3.14",
3+
"version": "0.3.15",
44
"description": "This directive allows you to add a datetime-picker to your form elements.",
55
"author": "https://github.com/dalelotts/ng-bootstrap-datetimepicker/graphs/contributors",
66
"bugs": {
@@ -15,15 +15,22 @@
1515
},
1616
"devDependencies": {
1717
"angular-mocks": "^1.4.7",
18+
"autoprefixer": "^6.0.3",
1819
"bootstrap": "^3.3.5",
1920
"bower": "latest",
21+
"csscomb": "^3.1.8",
2022
"csslint": "^0.10.0",
2123
"grunt": "^0.4.4",
2224
"grunt-bump": "^0.6.0",
2325
"gulp": "^3.8.11",
2426
"gulp-csslint": "^0.2.0",
2527
"gulp-jscs": "^3.0.0",
2628
"gulp-jshint": "^1.11.2",
29+
"gulp-postcss": "^6.0.1",
30+
"gulp-sass": "^2.0.4",
31+
"gulp-scss-lint": "^0.3.6",
32+
"gulp-scss-lint-stylish": "^1.0.0",
33+
"gulp-sourcemaps": "^1.6.0",
2734
"jquery": "^2.1.4",
2835
"jshint": "^2.6.0",
2936
"jshint-stylish": "^2.0.1",

paths.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ var bumpFiles = ['package.json', 'bower.json', 'README.md', 'src/js/*.js'];
1212
var cssFiles = ['src/css/*.css'];
1313
var demoFiles = ['demo/**/*.js'];
1414
var miscFiles = ['GruntFile.js', 'gulpfile.js', 'karma.conf.js', 'paths.js'];
15+
var scssFiles = ['src/scss/*.scss'];
1516
var sourceFiles = ['src/**/*.js'];
1617
var testFiles = ['test/**/*.spec.js'];
1718

1819
module.exports = {
19-
all: modules.concat(sourceFiles).concat(testFiles).concat(demoFiles),
20+
all: modules.concat(sourceFiles).concat(testFiles).concat(demoFiles).concat(cssFiles),
2021
app: sourceFiles,
21-
bump: bumpFiles.concat(cssFiles),
22+
bump: bumpFiles.concat(scssFiles).concat(cssFiles),
2223
css: cssFiles,
2324
lint: miscFiles.concat(sourceFiles).concat(testFiles).concat(miscFiles),
25+
scss: scssFiles,
2426
src: sourceFiles,
2527
test: testFiles
2628
};

0 commit comments

Comments
 (0)