Skip to content

Commit 8712285

Browse files
committed
Fix issue where some files were not included in jshint task, drop grunt (except for grunt bump)
1 parent 9f88434 commit 8712285

File tree

15 files changed

+443
-74
lines changed

15 files changed

+443
-74
lines changed

.bowerrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"directory": "bower_components"
2+
"directory": "bower_components"
33
}

.npmignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.gitignore
2+
.idea
3+
.jshintignore
4+
.jshintrc
5+
.travis.yml
6+
angular-bootstrap-datetimepicker.iml
7+
bower_components
8+
complexity
9+
coverage
10+
demo
11+
Gruntfile.js
12+
gulpfile.js
13+
karma.conf.js
14+
paths.js
15+
test

Gruntfile.js

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@ module.exports = function (grunt) {
66
// load all grunt tasks
77
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
88

9-
// Default task.
10-
grunt.registerTask('default', ['jshint', 'complexity', 'karma', 'coverage']);
11-
12-
var testConfig = function (configFile, customOptions) {
13-
var options = {configFile: configFile, keepalive: true};
14-
var travisOptions = process.env.TRAVIS && {
15-
browsers: ['Firefox'],
16-
reporters: ['dots', 'coverage'],
17-
singleRun: true
18-
};
19-
return grunt.util._.extend(options, customOptions, travisOptions);
20-
};
21-
229
// Project configuration.
2310
grunt.initConfig({
2411
bump: {
@@ -30,56 +17,6 @@ module.exports = function (grunt) {
3017
push: false,
3118
globalReplace: false
3219
}
33-
},
34-
complexity: {
35-
generic: {
36-
src: ['src/**/*.js'],
37-
options: {
38-
breakOnErrors: false,
39-
jsLintXML: 'complexity/report.xml', // create XML JSLint-like report
40-
errorsOnly: false, // show only maintainability errors
41-
cyclomatic: [3, 7, 12], // or optionally a single value, like 3
42-
halstead: [8, 13, 20], // or optionally a single value, like 8
43-
maintainability: 100
44-
}
45-
}
46-
},
47-
coverage: {
48-
options: {
49-
thresholds: {
50-
'statements': 100,
51-
'branches': 96.9,
52-
'lines': 100,
53-
'functions': 100
54-
},
55-
dir: 'coverage',
56-
root: ''
57-
}
58-
},
59-
karma: {
60-
unit: {
61-
options: testConfig('karma.conf.js', {
62-
singleRun: true,
63-
autoWatch: true,
64-
keepalive: true,
65-
browsers: ['Chrome']
66-
})
67-
}
68-
},
69-
jshint: {
70-
files: ['src/**/*.js', 'test/**/*.js', 'demo/**/*.js'],
71-
options: {
72-
curly: true,
73-
eqeqeq: true,
74-
immed: true,
75-
latedef: true,
76-
newcap: true,
77-
noarg: true,
78-
sub: true,
79-
boss: true,
80-
eqnull: true,
81-
globals: {}
82-
}
8320
}
8421
});
8522
};

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ optional:
4747
* bootstrap's dropdown component (`dropdowns.less`)
4848

4949
#Testing
50-
We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use grunt:
50+
We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use gulp:
5151

5252
```
53-
npm install -g grunt-cli
5453
npm install
54+
npm test
5555
```
5656

57-
The karma task will try to open Chrome as a browser in which to run the tests. Make sure this is available or change the configuration in test\test.config.js
57+
The karma task will try to open Chrome as a browser in which to run the tests.
58+
Make sure Chrome is available or change the browsers setting in karma.config.js
5859

5960
#Usage
6061
We use bower for dependency management. Add

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ gulp.task('tdd', function (done) {
4141
gulp.task('lint', function () {
4242
return gulp
4343
.src(paths.lint)
44-
.pipe(jshint())
44+
.pipe(jshint('.jshintrc'))
45+
.pipe(jshint.reporter('default', { verbose: true }))
4546
.pipe(jshint.reporter('jshint-stylish'))
4647
.pipe(jshint.reporter('fail'));
4748
});

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
"grunt-karma": "^0.9.0",
2424
"gulp": "^3.8.11",
2525
"gulp-bump": "^0.1.11",
26-
"gulp-jshint": "^1.9.0",
27-
"jshint-stylish": "^1.0.0",
26+
"gulp-jshint": "^1.9.4",
27+
"jshint": "^2.6.0",
28+
"jshint-stylish": "^1.0.1",
2829
"karma": "^0.12.25",
2930
"karma-chrome-launcher": "^0.1.5",
3031
"karma-coverage": "^0.2.1",

paths.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ var bower = [
1010
];
1111
var sourceFiles = ['src/**/*.js'];
1212
var testFiles = ['test/**/*.spec.js'];
13-
var miscFiles = ['karma.conf.js', 'demo/**/*.js'];
13+
var miscFiles = ['test/karma.conf.js', 'demo/**/*.js'];
1414
var bumpFiles = ['package.json', 'bower.json', 'README.md', 'src/js/*.js', 'src/css/*.css'];
1515

1616
module.exports = {
1717
all: bower.concat(sourceFiles).concat(testFiles).concat(miscFiles),
1818
app: sourceFiles,
1919
bump: bumpFiles,
20-
lint: ['gulpfile.js'].concat(sourceFiles).concat(testFiles).concat(miscFiles),
20+
lint: ['GruntFile.js', 'gulpfile.js', 'paths.js', 'test/**/*.test.js'].concat(sourceFiles).concat(testFiles).concat(miscFiles),
2121
test: testFiles
2222
};

test/commonjs/browserify.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
/** This file is intentionally named browserify.test.js so that it is not picked up by the karma runner **/
44

55
var angular = require('angular');
6-
var test = require('tape');
6+
var tapeTest = require('tape');
77

8-
test('can load module after requiring', function (t) {
8+
tapeTest('can load module after requiring', function (t) {
99
'use strict';
1010

1111
function loadModule() {
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
body, html {
2+
margin:0; padding: 0;
3+
}
4+
body {
5+
font-family: Helvetica Neue, Helvetica,Arial;
6+
font-size: 10pt;
7+
}
8+
div.header, div.footer {
9+
background: #eee;
10+
padding: 1em;
11+
}
12+
div.header {
13+
z-index: 100;
14+
position: fixed;
15+
top: 0;
16+
border-bottom: 1px solid #666;
17+
width: 100%;
18+
}
19+
div.footer {
20+
border-top: 1px solid #666;
21+
}
22+
div.body {
23+
margin-top: 10em;
24+
}
25+
div.meta {
26+
font-size: 90%;
27+
text-align: center;
28+
}
29+
h1, h2, h3 {
30+
font-weight: normal;
31+
}
32+
h1 {
33+
font-size: 12pt;
34+
}
35+
h2 {
36+
font-size: 10pt;
37+
}
38+
pre {
39+
font-family: Consolas, Menlo, Monaco, monospace;
40+
margin: 0;
41+
padding: 0;
42+
line-height: 14px;
43+
font-size: 14px;
44+
-moz-tab-size: 2;
45+
-o-tab-size: 2;
46+
tab-size: 2;
47+
}
48+
49+
div.path { font-size: 110%; }
50+
div.path a:link, div.path a:visited { color: #000; }
51+
table.coverage { border-collapse: collapse; margin:0; padding: 0 }
52+
53+
table.coverage td {
54+
margin: 0;
55+
padding: 0;
56+
color: #111;
57+
vertical-align: top;
58+
}
59+
table.coverage td.line-count {
60+
width: 50px;
61+
text-align: right;
62+
padding-right: 5px;
63+
}
64+
table.coverage td.line-coverage {
65+
color: #777 !important;
66+
text-align: right;
67+
border-left: 1px solid #666;
68+
border-right: 1px solid #666;
69+
}
70+
71+
table.coverage td.text {
72+
}
73+
74+
table.coverage td span.cline-any {
75+
display: inline-block;
76+
padding: 0 5px;
77+
width: 40px;
78+
}
79+
table.coverage td span.cline-neutral {
80+
background: #eee;
81+
}
82+
table.coverage td span.cline-yes {
83+
background: #b5d592;
84+
color: #999;
85+
}
86+
table.coverage td span.cline-no {
87+
background: #fc8c84;
88+
}
89+
90+
.cstat-yes { color: #111; }
91+
.cstat-no { background: #fc8c84; color: #111; }
92+
.fstat-no { background: #ffc520; color: #111 !important; }
93+
.cbranch-no { background: yellow !important; color: #111; }
94+
95+
.cstat-skip { background: #ddd; color: #111; }
96+
.fstat-skip { background: #ddd; color: #111 !important; }
97+
.cbranch-skip { background: #ddd !important; color: #111; }
98+
99+
.missing-if-branch {
100+
display: inline-block;
101+
margin-right: 10px;
102+
position: relative;
103+
padding: 0 4px;
104+
background: black;
105+
color: yellow;
106+
}
107+
108+
.skip-if-branch {
109+
display: none;
110+
margin-right: 10px;
111+
position: relative;
112+
padding: 0 4px;
113+
background: #ccc;
114+
color: white;
115+
}
116+
117+
.missing-if-branch .typ, .skip-if-branch .typ {
118+
color: inherit !important;
119+
}
120+
121+
.entity, .metric { font-weight: bold; }
122+
.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
123+
.metric small { font-size: 80%; font-weight: normal; color: #666; }
124+
125+
div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
126+
div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
127+
div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
128+
div.coverage-summary th.file { border-right: none !important; }
129+
div.coverage-summary th.pic { border-left: none !important; text-align: right; }
130+
div.coverage-summary th.pct { border-right: none !important; }
131+
div.coverage-summary th.abs { border-left: none !important; text-align: right; }
132+
div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
133+
div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
134+
div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
135+
div.coverage-summary td.pic { min-width: 120px !important; }
136+
div.coverage-summary a:link { text-decoration: none; color: #000; }
137+
div.coverage-summary a:visited { text-decoration: none; color: #333; }
138+
div.coverage-summary a:hover { text-decoration: underline; }
139+
div.coverage-summary tfoot td { border-top: 1px solid #666; }
140+
141+
div.coverage-summary .sorter {
142+
height: 10px;
143+
width: 7px;
144+
display: inline-block;
145+
margin-left: 0.5em;
146+
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147+
}
148+
div.coverage-summary .sorted .sorter {
149+
background-position: 0 -20px;
150+
}
151+
div.coverage-summary .sorted-desc .sorter {
152+
background-position: 0 -10px;
153+
}
154+
155+
.high { background: #b5d592 !important; }
156+
.medium { background: #ffe87c !important; }
157+
.low { background: #fc8c84 !important; }
158+
159+
span.cover-fill, span.cover-empty {
160+
display:inline-block;
161+
border:1px solid #444;
162+
background: white;
163+
height: 12px;
164+
}
165+
span.cover-fill {
166+
background: #ccc;
167+
border-right: 1px solid #444;
168+
}
169+
span.cover-empty {
170+
background: white;
171+
border-left: none;
172+
}
173+
span.cover-full {
174+
border-right: none !important;
175+
}
176+
pre.prettyprint {
177+
border: none !important;
178+
padding: 0 !important;
179+
margin: 0 !important;
180+
}
181+
.com { color: #999 !important; }
182+
.ignore-none { color: #999; font-weight: normal; }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

0 commit comments

Comments
 (0)