Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 77055b3

Browse files
Merge pull request #408 from peterver/master
Upgrade to 2.7.1 fullcalendar and code cleanup/improvements
2 parents 349c7f0 + 19737e9 commit 77055b3

File tree

8 files changed

+528
-411
lines changed

8 files changed

+528
-411
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*.js]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_STORE
12
.idea
23
coverage
34
node_modules/

.jscsrc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"disallowEmptyBlocks": true,
3+
"disallowIdenticalDestructuringNames": true,
4+
"disallowIdentifierNames": ['temp', 'foo', 'tmp'],
5+
"disallowKeywordsOnNewLine": ["else"],
6+
"disallowMixedSpacesAndTabs": true,
7+
"disallowMultipleLineBreaks": true,
8+
"disallowMultipleLineStrings": true,
9+
"disallowMultipleSpaces": {"allowEOLComments": true},
10+
"disallowMultipleVarDecl": true,
11+
"disallowNewlineBeforeBlockStatements": true,
12+
"disallowOperatorBeforeLineBreak": true,
13+
"disallowSpaceAfterPrefixUnaryOperators": true,
14+
"disallowSpaceBeforePostfixUnaryOperators": true,
15+
"disallowSpacesInCallExpression": true,
16+
"disallowSpacesInsideArrayBrackets": "all",
17+
"disallowSpacesInsideParentheses": true,
18+
"disallowSpacesInsideParenthesizedExpression": true,
19+
"disallowYodaConditions": true,
20+
21+
"requireAnonymousFunctions": {"allExcept": ["declarations"]},
22+
"requireBlocksOnNewline": 1,
23+
"requireCommaBeforeLineBreak": true,
24+
"requireCurlyBraces": true,
25+
"requireDotNotation": {"allExcept": ["keywords"]},
26+
"requireEarlyReturn": true,
27+
"requireImportAlphabetized": true,
28+
"requireLineBreakAfterVariableAssignment": true,
29+
"requireLineFeedAtFileEnd": true,
30+
"requireMultiLineTernary": false,
31+
"requireObjectKeysOnNewLine": true,
32+
"requirePaddingNewLinesAfterUseStrict": true,
33+
"requirePaddingNewLinesInObjects": true,
34+
"requireParenthesesAroundIIFE": true,
35+
"requireSemicolons": true,
36+
"requireSpaceAfterBinaryOperators": true,
37+
"requireSpaceAfterComma": true,
38+
"requireSpaceAfterKeywords": true,
39+
"requireSpaceAfterObjectKeys": true,
40+
"requireSpaceBeforeBinaryOperators": true,
41+
"requireSpaceBeforeBlockStatements": true,
42+
"requireSpaceBeforeKeywords": {
43+
allExcept: ["typeof"]
44+
},
45+
"requireSpaceBeforeObjectValues": true,
46+
"requireSpaceBetweenArguments": true,
47+
"requireSpacesInConditionalExpression": true,
48+
"requireSpacesInForStatement": true,
49+
"requireSpacesInFunction": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
50+
51+
"safeContextKeyword": ["that"],
52+
"validateIndentation": {value: 4, allExcept: ["comments"]},
53+
"validateParameterSeparator": ", "
54+
55+
}

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: node_js
2+
23
node_js:
3-
- "0.12"
4+
- "5.6"
45

56
branches:
67
except:

bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ui-calendar",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A complete AngularJS directive for the Arshaw FullCalendar.",
55
"author": "https://github.com/angular-ui/ui-calendar/graphs/contributors",
66
"license": "MIT",
@@ -16,9 +16,9 @@
1616
"package.json"
1717
],
1818
"dependencies": {
19-
"angular": "~1.4.1",
19+
"angular": "~1.4.x",
2020
"jquery": "~2.1.4",
21-
"fullcalendar": "~2.3.2",
21+
"fullcalendar": "~2.7.1",
2222
"moment": "~2.10.3"
2323
},
2424
"devDependencies": {
@@ -27,6 +27,6 @@
2727
},
2828
"resolutions": {
2929
"jquery": "~2.1.4",
30-
"angular": "1.4.1"
30+
"angular": "~1.4.x"
3131
}
3232
}

gruntFile.js

Lines changed: 91 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,91 @@
1-
module.exports = function (grunt) {
2-
"use strict";
3-
4-
// load all grunt tasks
5-
require('load-grunt-tasks')(grunt);
6-
7-
// Default task.
8-
grunt.registerTask('default', ['jshint', 'karma']);
9-
10-
// uglify
11-
grunt.registerTask('minify', ['uglify']);
12-
//connect - local server
13-
grunt.registerTask('serve', ['connect']);
14-
15-
var testConfig = function(configFile, customOptions) {
16-
var options = { configFile: configFile, keepalive: true };
17-
var travisOptions = process.env.TRAVIS && { browsers: ['Firefox'], reporters: 'dots' };
18-
return grunt.util._.extend(options, customOptions, travisOptions);
19-
};
20-
21-
// Project configuration.
22-
grunt.initConfig({
23-
karma: {
24-
unit: {
25-
options: testConfig('test/test.conf.js')
26-
}
27-
},
28-
jshint: {
29-
files: ['src/**/*.js', 'test/**/*.js', 'demo/**/*.js'],
30-
options: {
31-
curly: true,
32-
eqeqeq: true,
33-
immed: true,
34-
latedef: 'nofunc',
35-
newcap: true,
36-
noarg: true,
37-
sub: true,
38-
boss: true,
39-
eqnull: true,
40-
globals: {}
41-
}
42-
},
43-
uglify: {
44-
build: {
45-
src: ['src/**/*.js'],
46-
dest: 'calendar.min.js'
47-
}
48-
},
49-
connect: {
50-
server: {
51-
options: {
52-
port: 8000,
53-
open: true,
54-
debug: true,
55-
keepalive: true,
56-
hostname: '*',
57-
base: ['demo', '.']
58-
}
59-
}
60-
}
61-
});
62-
63-
};
1+
module.exports = function (grunt) {
2+
"use strict";
3+
4+
// load all grunt tasks
5+
require('load-grunt-tasks')(grunt);
6+
7+
// Default task.
8+
grunt.registerTask('default', ['jshint', 'jscs', 'karma']);
9+
10+
// uglify
11+
grunt.registerTask('minify', ['uglify']);
12+
13+
//connect - local server
14+
grunt.registerTask('serve', ['connect']);
15+
16+
var testConfig = function (configFile, customOptions) {
17+
var options = {
18+
configFile : configFile,
19+
keepalive : true
20+
};
21+
var travisOptions = process.env.TRAVIS && {
22+
browsers : ['Firefox'],
23+
reporters : 'dots'
24+
};
25+
return grunt.util._.extend(options, customOptions, travisOptions);
26+
};
27+
28+
// Project configuration.
29+
grunt.initConfig({
30+
karma : {
31+
unit : {
32+
options : testConfig('test/test.conf.js')
33+
}
34+
},
35+
jshint : {
36+
files : ['src/**/*.js'],
37+
options : {
38+
curly : true,
39+
devel : true,
40+
eqeqeq : true,
41+
forin : true,
42+
funcscope : true,
43+
latedef : "nofunc",
44+
laxbreak : true,
45+
loopfunc : true,
46+
maxdepth : 3,
47+
noarg : true,
48+
nonbsp : true,
49+
nonew : true,
50+
notypeof : true,
51+
shadow : false,
52+
browser : true,
53+
undef : true,
54+
unused : "vars",
55+
predef : [],
56+
globals : {
57+
moment : true,
58+
angular : true,
59+
$ : true,
60+
jasmine : true
61+
}
62+
}
63+
},
64+
jscs : {
65+
all : [
66+
['src/**/*.js']
67+
],
68+
options : {
69+
config : '.jscsrc'
70+
}
71+
},
72+
uglify : {
73+
build : {
74+
src : ['src/**/*.js'],
75+
dest : 'calendar.min.js'
76+
}
77+
},
78+
connect : {
79+
server : {
80+
options : {
81+
port : 8000,
82+
open : true,
83+
debug : true,
84+
keepalive : true,
85+
hostname : '*',
86+
base : ['demo', '.']
87+
}
88+
}
89+
}
90+
});
91+
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ui-calendar",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A complete AngularJS directive for the Arshaw FullCalendar.",
55
"author": "https://github.com/angular-ui/ui-calendar/graphs/contributors",
66
"license": "MIT",
@@ -12,6 +12,7 @@
1212
"grunt-contrib-connect": "^0.10.1",
1313
"grunt-contrib-jshint": "^0.11.2",
1414
"grunt-contrib-uglify": "^0.9.1",
15+
"grunt-jscs": "^2.8.0",
1516
"grunt-karma": "^0.11.1",
1617
"jasmine-core": "^2.3.4",
1718
"karma": "^0.12.37",

0 commit comments

Comments
 (0)