Skip to content

Commit f6df9ea

Browse files
committed
refactor(bower): Remove bower support
Removed bower.json and related files & tests. Bower will no longer resolve later versions of this directive. Fix #238
1 parent 758953c commit f6df9ea

File tree

3 files changed

+37
-47
lines changed

3 files changed

+37
-47
lines changed

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
66
[![Build Status](https://travis-ci.org/dalelotts/angular-bootstrap-datetimepicker.png?branch=master)](https://travis-ci.org/dalelotts/angular-bootstrap-datetimepicker)
77
[![Dependency Status](https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker.svg)](https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker)
88
[![devDependency Status](https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker/dev-status.png)](https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker#info=devDependencies)
9+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
910
[![PayPal donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=F3FX5W6S2U4BW&lc=US&item_name=Dale%20Lotts&item_number=angular%2dbootstrap%2ddatetimepicker&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted "Donate one-time to this project using Paypal")
1011
<a href="https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons&amp;text=Check%20out%20this%20%23AngularJS%20directive%20that%20makes%20it%20dead%20simple%20for%20users%20to%20select%20dates%20%26%20times&amp;tw_p=tweetbutton&amp;url=https%3A%2F%2Fgithub.com%2Fdalelotts%2Fangular-bootstrap-datetimepicker&amp;via=dalelotts" target="_blank">
1112
<img src="http://jpillora.com/github-twitter-button/img/tweet.png"></img>
@@ -18,7 +19,7 @@ Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
1819
#Dependencies
1920

2021
Requires:
21-
* AngularJS 1.2.26 or higher (1.0.x will not work)
22+
* AngularJS 1.4.x or higher (1.0.x will not work)
2223
* moment.js 2.8.3 or higher for date parsing and formatting
2324
* bootstrap's glyphicons for arrows (Can be overridden in css)
2425

@@ -30,7 +31,7 @@ This directive was written using TDD and all enhancements and changes have relat
3031

3132
We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use gulp:
3233

33-
```
34+
```shell
3435
npm install
3536
npm test
3637
```
@@ -39,35 +40,27 @@ The karma task will try to open Chrome as a browser in which to run the tests.
3940
Make sure Chrome is available or change the browsers setting in karma.config.js
4041

4142
#Usage
42-
We use bower for dependency management. Add
43+
We use npm for dependency management, run
4344

44-
```json
45-
dependencies: {
46-
"angular-bootstrap-datetimepicker": "latest"
47-
}
48-
```
49-
50-
To your bower.json file. Then run
51-
52-
```html
53-
bower install
45+
```shell
46+
npm install --save angular-bootstrap-datetimepicker
5447
```
5548

5649
This will copy the angular-bootstrap-datetimepicker files into your components folder, along with its dependencies.
5750

5851
Add the css:
5952

6053
```html
61-
<link rel="stylesheet" href="components/bootstrap/dist/css/bootstrap.css">
62-
<link rel="stylesheet" href="components/angular-bootstrap-datetimepicker/src/css/datetimepicker.css"/>
54+
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css">
55+
<link rel="stylesheet" href="node_modules/angular-bootstrap-datetimepicker/src/css/datetimepicker.css"/>
6356
```
6457

6558
Load the script files in your application:
6659
```html
67-
<script type="text/javascript" src="components/moment/moment.js"></script>
68-
<script type="text/javascript" src="components/bootstrap/dist/js/bootstrap.js"></script>
69-
<script type="text/javascript" src="components/angular/angular.js"></script>
70-
<script type="text/javascript" src="components/angular-bootstrap-datetimepicker/src/js/datetimepicker.js"></script>
60+
<script type="text/javascript" src="node_modules/moment/moment.js"></script>
61+
<script type="text/javascript" src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
62+
<script type="text/javascript" src="node_modules/angular/angular.js"></script>
63+
<script type="text/javascript" src="node_modules/angular-bootstrap-datetimepicker/src/js/datetimepicker.js"></script>
7164
```
7265

7366
Add the date module as a dependency to your application module:
@@ -170,6 +163,8 @@ String. 'minute'
170163

171164
The lowest view that the datetimepicker should show.
172165

166+
Accepts the same values as startView.
167+
173168
### minuteStep
174169

175170
Number. Default: 5

package.json

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-datetimepicker",
3-
"version": "0.3.15",
3+
"version": "0.0.0-managed-by-semantic-release",
44
"description": "This directive allows you to add a datetime-picker to your form elements.",
55
"keywords": [
66
"anguar",
@@ -25,30 +25,33 @@
2525
},
2626
"devDependencies": {
2727
"angular-mocks": "^1.4.7",
28-
"autoprefixer": "^6.0.3",
28+
"autoprefixer": "^6.1.0",
2929
"bootstrap": "^3.3.5",
3030
"bower": "latest",
31+
"commitizen": "^2.4.4",
3132
"csscomb": "^3.1.8",
3233
"csslint": "^0.10.0",
34+
"cz-conventional-changelog": "^1.1.4",
35+
"del": "^2.1.0",
3336
"grunt": "^0.4.4",
3437
"grunt-bump": "^0.6.0",
3538
"gulp": "^3.8.11",
3639
"gulp-csslint": "^0.2.0",
3740
"gulp-jscs": "^3.0.0",
38-
"gulp-jshint": "^1.11.2",
41+
"gulp-jshint": "^1.12.0",
3942
"gulp-postcss": "^6.0.1",
40-
"gulp-sass": "^2.0.4",
41-
"gulp-scss-lint": "^0.3.6",
43+
"gulp-sass": "^2.1.0",
44+
"gulp-scss-lint": "^0.3.8",
4245
"gulp-scss-lint-stylish": "^1.0.0",
4346
"gulp-sourcemaps": "^1.6.0",
4447
"jasmine-core": "^2.3.4",
4548
"jquery": "^2.1.4",
46-
"jshint": "^2.6.0",
47-
"jshint-stylish": "^2.0.1",
48-
"karma": "^0.13.10",
49+
"jshint": "^2.8.0",
50+
"jshint-stylish": "^2.1.0",
51+
"karma": "^0.13.15",
4952
"karma-chrome-launcher": "^0.2.0",
5053
"karma-coverage": "^0.5.0",
51-
"karma-firefox-launcher": "^0.1.3",
54+
"karma-firefox-launcher": "^0.1.7",
5255
"karma-jasmine": "^0.3.6",
5356
"karma-phantomjs-launcher": "^0.2.1",
5457
"karma-threshold-reporter": "^0.1.12",
@@ -57,14 +60,21 @@
5760
"phantomjs": "^1.9.18",
5861
"plato": "^1.5.0",
5962
"run-browser": "^2.0.2",
63+
"semantic-release": "^4.3.5",
6064
"tape": "^4.2.0"
6165
},
6266
"scripts": {
6367
"test": "npm run test-browserify && gulp",
64-
"test-browserify": "run-browser test/commonjs/browserify.test.js -b"
68+
"test-browserify": "run-browser test/commonjs/browserify.test.js -b",
69+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
6570
},
6671
"repository": {
6772
"type": "git",
68-
"url": "git://github.com/dalelotts/angular-bootstrap-datetimepicker.git"
73+
"url": "https://github.com/dalelotts/angular-bootstrap-datetimepicker.git"
74+
},
75+
"config": {
76+
"commitizen": {
77+
"path": "./node_modules/cz-conventional-changelog"
78+
}
6979
}
70-
}
80+
}

test/commonjs/browserify.test.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,4 @@ tapeTest('can load module after requiring', function (t) {
2121
require('../../');
2222
t.doesNotThrow(loadModule);
2323
t.end();
24-
});
25-
26-
tapeTest('package and bower dependencies & version match', function (t) {
27-
'use strict';
28-
29-
var packageFile = require('../../package.json');
30-
var bowerFile = require('../../bower.json');
31-
32-
t.equal(packageFile.version, bowerFile.version, 'Version mismatch');
33-
t.equal(packageFile.dependencies.angular, bowerFile.dependencies.angular, 'Angular mismatch');
34-
t.equal(packageFile.dependencies.angular, bowerFile.devDependencies['angular-mocks'], 'Angular mocks mismatch');
35-
t.equal(packageFile.dependencies.moment, bowerFile.dependencies.moment, 'moment mismatch');
36-
t.equal(packageFile.devDependencies.bootstrap, bowerFile.devDependencies.bootstrap, 'bootstrap mismatch');
37-
t.equal(packageFile.devDependencies.jquery, bowerFile.devDependencies.jquery, 'jquery mismatch');
38-
t.end();
39-
});
24+
});

0 commit comments

Comments
 (0)