Skip to content

Commit 6dfbfd9

Browse files
committed
Refactor
- Split scope files - Fix shadowing with jshint - Try some eslint options - Rename odd variable naming choices - Move 'already initialized' error
1 parent d59b513 commit 6dfbfd9

21 files changed

+997
-953
lines changed

Gruntfile.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ module.exports = function(grunt) {
1717
'src/js/tooltips.js',
1818
'src/js/aria.js',
1919
'src/js/pips.js',
20-
'src/js/scope_helpers.js',
2120
'src/js/scope_events.js',
22-
'src/js/scope.js',
21+
'src/js/scope_event_binding.js',
22+
'src/js/scope_core.js',
23+
'src/js/scope_api.js',
24+
'src/js/scope_run.js',
2325
'src/js/scope_end.js',
2426
'src/js/interface.js',
2527
'src/js/outro.js'
@@ -78,10 +80,35 @@ module.exports = function(grunt) {
7880
latedef: true,
7981
undef: true,
8082
unused: true,
83+
shadow: "outer",
84+
eqeqeq: true,
85+
forin: true,
86+
freeze: true,
8187
globals: { module: true, define: true, __dirname: true, require: true }
8288
},
8389
basic: ['distribute/nouislider.js']
8490
},
91+
eslint: {
92+
options: {
93+
configFile: 'eslint.json'
94+
},
95+
96+
// Only lint files containing solely function definitions
97+
target: [
98+
'src/js/helpers.js',
99+
'src/js/constants.js',
100+
'src/js/range.js',
101+
'src/js/options.js',
102+
'src/js/structure.js',
103+
'src/js/tooltips.js',
104+
'src/js/aria.js',
105+
'src/js/pips.js',
106+
'src/js/scope_events.js',
107+
'src/js/scope_event_binding.js',
108+
'src/js/scope_core.js',
109+
'src/js/scope_api.js'
110+
]
111+
},
85112
uglify: {
86113
all: {
87114
options: {
@@ -131,6 +158,9 @@ module.exports = function(grunt) {
131158
// https://github.com/gruntjs/grunt-contrib-qunit
132159
grunt.loadNpmTasks('grunt-contrib-qunit');
133160

161+
// https://www.npmjs.com/package/grunt-eslint
162+
grunt.loadNpmTasks('grunt-eslint');
163+
134164
grunt.registerTask('default', ['concat', 'less', 'jshint']);
135165
grunt.registerTask('test', ['concat', 'less', 'jshint', 'qunit']);
136166
grunt.registerTask('create', ['concat', 'less', 'uglify', 'cssmin']);

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ npm [(package)](https://www.npmjs.com/package/nouislider)
2727
Changelog
2828
---------
2929

30+
### 11.0.3 (*2018-01-21*)
31+
Refactor of source code. There are no meaningful changes in the distributed files;
32+
3033
### 11.0.2 (*2018-01-20*)
3134
- Fixed: Slider ignores clicks on `.noUi-target` outside of `.noUi-base` (#842);
3235
- Fixed: `.noUi-origin` moving out of the page causes horizontal scrolling (#852);

distribute/nouislider.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! nouislider - 11.0.2 - 2018-01-20 18:05:29 */
1+
/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */
22
/* Functional styling;
33
* These styles are required for noUiSlider to function.
44
* You don't need to change these rules to apply your design.

0 commit comments

Comments
 (0)