Skip to content

Commit c38a465

Browse files
author
Alain Dumesny
authored
Merge pull request #1033 from adumesny/develop
change to 2 spaces indent (from 4)
2 parents 118d659 + 0770665 commit c38a465

26 files changed

+4415
-4414
lines changed

.jscsrc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"preset": "node-style-guide",
3-
"validateIndentation": 4,
4-
"maximumLineLength": 120,
5-
"jsDoc": {
6-
"checkAnnotations": {
7-
"preset": "jsdoc3",
8-
"extra": {
9-
"preserve": true
10-
}
11-
}
12-
},
13-
"requireCamelCaseOrUpperCaseIdentifiers": true,
14-
"validateLineBreaks": false,
15-
"requireTrailingComma": false,
16-
"disallowTrailingWhitespace": true,
17-
"requireCapitalizedComments": false,
18-
"excludeFiles": ["dist/*.js", "demo/*", "spec/*"]
2+
"preset": "node-style-guide",
3+
"validateIndentation": 2,
4+
"maximumLineLength": 180,
5+
"jsDoc": {
6+
"checkAnnotations": {
7+
"preset": "jsdoc3",
8+
"extra": {
9+
"preserve": true
10+
}
11+
}
12+
},
13+
"requireCamelCaseOrUpperCaseIdentifiers": true,
14+
"validateLineBreaks": false,
15+
"requireTrailingComma": false,
16+
"disallowTrailingWhitespace": true,
17+
"requireCapitalizedComments": false,
18+
"excludeFiles": ["dist/*.js", "demo/*", "spec/*"]
1919
}

Gruntfile.js

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,112 @@
11
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
22
module.exports = function(grunt) {
3-
grunt.loadNpmTasks('grunt-sass');
4-
grunt.loadNpmTasks('grunt-contrib-cssmin');
5-
grunt.loadNpmTasks('grunt-contrib-copy');
6-
grunt.loadNpmTasks('grunt-contrib-uglify');
7-
grunt.loadNpmTasks('grunt-contrib-jshint');
8-
grunt.loadNpmTasks('grunt-jscs');
9-
grunt.loadNpmTasks('grunt-contrib-watch');
10-
grunt.loadNpmTasks('grunt-protractor-runner');
11-
grunt.loadNpmTasks('grunt-contrib-connect');
12-
grunt.loadNpmTasks('grunt-protractor-webdriver');
3+
grunt.loadNpmTasks('grunt-sass');
4+
grunt.loadNpmTasks('grunt-contrib-cssmin');
5+
grunt.loadNpmTasks('grunt-contrib-copy');
6+
grunt.loadNpmTasks('grunt-contrib-uglify');
7+
grunt.loadNpmTasks('grunt-contrib-jshint');
8+
grunt.loadNpmTasks('grunt-jscs');
9+
grunt.loadNpmTasks('grunt-contrib-watch');
10+
grunt.loadNpmTasks('grunt-protractor-runner');
11+
grunt.loadNpmTasks('grunt-contrib-connect');
12+
grunt.loadNpmTasks('grunt-protractor-webdriver');
1313

14-
grunt.initConfig({
15-
sass: {
16-
options: {
17-
outputStyle: 'expanded'
18-
},
19-
dist: {
20-
files: {
21-
'dist/gridstack.css': 'src/gridstack.scss',
22-
'dist/gridstack-extra.css': 'src/gridstack-extra.scss'
23-
}
24-
}
25-
},
14+
grunt.initConfig({
15+
sass: {
16+
options: {
17+
outputStyle: 'expanded'
18+
},
19+
dist: {
20+
files: {
21+
'dist/gridstack.css': 'src/gridstack.scss',
22+
'dist/gridstack-extra.css': 'src/gridstack-extra.scss'
23+
}
24+
}
25+
},
2626

27-
cssmin: {
28-
dist: {
29-
files: {
30-
'dist/gridstack.min.css': ['dist/gridstack.css'],
31-
'dist/gridstack-extra.min.css': ['dist/gridstack-extra.css']
32-
}
33-
}
34-
},
27+
cssmin: {
28+
dist: {
29+
files: {
30+
'dist/gridstack.min.css': ['dist/gridstack.css'],
31+
'dist/gridstack-extra.min.css': ['dist/gridstack-extra.css']
32+
}
33+
}
34+
},
3535

36-
copy: {
37-
dist: {
38-
files: {
39-
'dist/gridstack.js': ['src/gridstack.js'],
40-
'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'],
41-
}
42-
}
43-
},
36+
copy: {
37+
dist: {
38+
files: {
39+
'dist/gridstack.js': ['src/gridstack.js'],
40+
'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'],
41+
}
42+
}
43+
},
4444

45-
uglify: {
46-
options: {
47-
sourceMap: true,
48-
sourceMapName: 'dist/gridstack.min.map',
49-
preserveComments: 'some'
50-
},
51-
dist: {
52-
files: {
53-
'dist/gridstack.min.js': ['src/gridstack.js'],
54-
'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'],
55-
'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js']
56-
}
57-
}
58-
},
45+
uglify: {
46+
options: {
47+
sourceMap: true,
48+
sourceMapName: 'dist/gridstack.min.map',
49+
preserveComments: 'some'
50+
},
51+
dist: {
52+
files: {
53+
'dist/gridstack.min.js': ['src/gridstack.js'],
54+
'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'],
55+
'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js']
56+
}
57+
}
58+
},
5959

60-
jshint: {
61-
all: ['src/*.js']
62-
},
60+
jshint: {
61+
all: ['src/*.js']
62+
},
6363

64-
jscs: {
65-
all: ['*.js', 'src/*.js', ],
66-
},
64+
jscs: {
65+
all: ['*.js', 'src/*.js', ],
66+
},
6767

68-
watch: {
69-
scripts: {
70-
files: ['src/*.js'],
71-
tasks: ['uglify', 'copy'],
72-
options: {
73-
},
74-
},
75-
styles: {
76-
files: ['src/*.scss'],
77-
tasks: ['sass', 'cssmin'],
78-
options: {
79-
},
80-
}
68+
watch: {
69+
scripts: {
70+
files: ['src/*.js'],
71+
tasks: ['uglify', 'copy'],
72+
options: {
8173
},
82-
83-
protractor: {
84-
options: {
85-
configFile: 'protractor.conf.js',
86-
},
87-
all: {}
74+
},
75+
styles: {
76+
files: ['src/*.scss'],
77+
tasks: ['sass', 'cssmin'],
78+
options: {
8879
},
80+
}
81+
},
82+
83+
protractor: {
84+
options: {
85+
configFile: 'protractor.conf.js',
86+
},
87+
all: {}
88+
},
8989

90-
connect: {
91-
all: {
92-
options: {
93-
port: 8080,
94-
hostname: 'localhost',
95-
base: '.',
96-
},
97-
},
90+
connect: {
91+
all: {
92+
options: {
93+
port: 8080,
94+
hostname: 'localhost',
95+
base: '.',
9896
},
97+
},
98+
},
9999

100-
protractor_webdriver: {
101-
all: {
102-
options: {
103-
command: 'webdriver-manager start',
104-
}
105-
}
100+
protractor_webdriver: {
101+
all: {
102+
options: {
103+
command: 'webdriver-manager start',
106104
}
107-
});
105+
}
106+
}
107+
});
108108

109-
grunt.registerTask('lint', ['jshint', 'jscs']);
110-
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']);
111-
grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']);
109+
grunt.registerTask('lint', ['jshint', 'jscs']);
110+
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']);
111+
grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']);
112112
};

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2017 Pavel Reznikov, Dylan Weiss
3+
Copyright (c) 2014-2019 Dylan Weiss, Alain Dumesny, Pavel Reznikov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ You can download source and build and use `dist` directory as well for latest no
9494

9595
```html
9696
<div class="grid-stack">
97-
<div class="grid-stack-item"
98-
data-gs-x="0" data-gs-y="0"
99-
data-gs-width="4" data-gs-height="2">
100-
<div class="grid-stack-item-content"></div>
101-
</div>
102-
<div class="grid-stack-item"
103-
data-gs-x="4" data-gs-y="0"
104-
data-gs-width="4" data-gs-height="4">
105-
<div class="grid-stack-item-content"></div>
106-
</div>
97+
<div class="grid-stack-item"
98+
data-gs-x="0" data-gs-y="0"
99+
data-gs-width="4" data-gs-height="2">
100+
<div class="grid-stack-item-content"></div>
101+
</div>
102+
<div class="grid-stack-item"
103+
data-gs-x="4" data-gs-y="0"
104+
data-gs-width="4" data-gs-height="4">
105+
<div class="grid-stack-item-content"></div>
106+
</div>
107107
</div>
108108

109109
<script type="text/javascript">
110110
$(function () {
111-
$('.grid-stack').gridstack();
111+
$('.grid-stack').gridstack();
112112
});
113113
</script>
114114
```
@@ -157,10 +157,10 @@ Also `alwaysShowResizeHandle` option may be useful:
157157

158158
```javascript
159159
$(function () {
160-
var options = {
161-
alwaysShowResizeHandle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
162-
};
163-
$('.grid-stack').gridstack(options);
160+
var options = {
161+
alwaysShowResizeHandle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
162+
};
163+
$('.grid-stack').gridstack(options);
164164
});
165165
```
166166

@@ -210,14 +210,14 @@ Here is a SASS code snippet which can make life easier (Thanks to @ascendantofra
210210
```sass
211211
.grid-stack > .grid-stack-item {
212212
213-
$gridstack-columns: 12;
213+
$gridstack-columns: 12;
214214
215-
@for $i from 1 through $gridstack-columns {
216-
&[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
217-
&[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
218-
&[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
219-
&[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
220-
}
215+
@for $i from 1 through $gridstack-columns {
216+
&[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
217+
&[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
218+
&[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
219+
&[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
220+
}
221221
}
222222
```
223223

@@ -247,9 +247,9 @@ you can init gridstack like:
247247

248248
```javascript
249249
$('.grid-stack').gridstack({
250-
resizable: {
251-
handles: 'e, se, s, sw, w'
252-
}
250+
resizable: {
251+
handles: 'e, se, s, sw, w'
252+
}
253253
});
254254
```
255255

@@ -317,4 +317,4 @@ View our change log [here](https://github.com/gridstack/gridstack.js/tree/develo
317317
The Team
318318
========
319319

320-
gridstack.js is currently maintained by [Pavel Reznikov](https://github.com/troolee), [Dylan Weiss](https://github.com/radiolips) and [Alain Dumesny](https://github.com/adumesny). We appreciate [all contributors](https://github.com/gridstack/gridstack.js/graphs/contributors) for help.
320+
gridstack.js is currently maintained by [Dylan Weiss](https://github.com/radiolips) and [Alain Dumesny](https://github.com/adumesny), originally created by [Pavel Reznikov](https://github.com/troolee). We appreciate [all contributors](https://github.com/gridstack/gridstack.js/graphs/contributors) for help.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
"test",
3535
"tests"
3636
]
37-
}
37+
}

0 commit comments

Comments
 (0)