Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
- Split scope files
- Fix shadowing with jshint
- Try some eslint options
- Rename odd variable naming choices
- Move 'already initialized' error
  • Loading branch information
leongersen committed Jan 21, 2018
1 parent d59b513 commit 6dfbfd9
Show file tree
Hide file tree
Showing 21 changed files with 997 additions and 953 deletions.
34 changes: 32 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ module.exports = function(grunt) {
'src/js/tooltips.js',
'src/js/aria.js',
'src/js/pips.js',
'src/js/scope_helpers.js',
'src/js/scope_events.js',
'src/js/scope.js',
'src/js/scope_event_binding.js',
'src/js/scope_core.js',
'src/js/scope_api.js',
'src/js/scope_run.js',
'src/js/scope_end.js',
'src/js/interface.js',
'src/js/outro.js'
Expand Down Expand Up @@ -78,10 +80,35 @@ module.exports = function(grunt) {
latedef: true,
undef: true,
unused: true,
shadow: "outer",
eqeqeq: true,
forin: true,
freeze: true,
globals: { module: true, define: true, __dirname: true, require: true }
},
basic: ['distribute/nouislider.js']
},
eslint: {
options: {
configFile: 'eslint.json'
},

// Only lint files containing solely function definitions
target: [
'src/js/helpers.js',
'src/js/constants.js',
'src/js/range.js',
'src/js/options.js',
'src/js/structure.js',
'src/js/tooltips.js',
'src/js/aria.js',
'src/js/pips.js',
'src/js/scope_events.js',
'src/js/scope_event_binding.js',
'src/js/scope_core.js',
'src/js/scope_api.js'
]
},
uglify: {
all: {
options: {
Expand Down Expand Up @@ -131,6 +158,9 @@ module.exports = function(grunt) {
// https://github.com/gruntjs/grunt-contrib-qunit
grunt.loadNpmTasks('grunt-contrib-qunit');

// https://www.npmjs.com/package/grunt-eslint
grunt.loadNpmTasks('grunt-eslint');

grunt.registerTask('default', ['concat', 'less', 'jshint']);
grunt.registerTask('test', ['concat', 'less', 'jshint', 'qunit']);
grunt.registerTask('create', ['concat', 'less', 'uglify', 'cssmin']);
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ npm [(package)](https://www.npmjs.com/package/nouislider)
Changelog
---------

### 11.0.3 (*2018-01-21*)
Refactor of source code. There are no meaningful changes in the distributed files;

### 11.0.2 (*2018-01-20*)
- Fixed: Slider ignores clicks on `.noUi-target` outside of `.noUi-base` (#842);
- Fixed: `.noUi-origin` moving out of the page causes horizontal scrolling (#852);
Expand Down
2 changes: 1 addition & 1 deletion distribute/nouislider.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 11.0.2 - 2018-01-20 18:05:29 */
/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */
/* Functional styling;
* These styles are required for noUiSlider to function.
* You don't need to change these rules to apply your design.
Expand Down
Loading

0 comments on commit 6dfbfd9

Please sign in to comment.