From cf2aec22a94c166c470ca6034bd85456573e8f71 Mon Sep 17 00:00:00 2001 From: Teerth Date: Sat, 3 Aug 2024 00:26:35 -0300 Subject: [PATCH] - Improved consistency and error handling in sticky-sidebar.js without altering comments. - Updated jquery.sticky-sidebar.js to maintain consistency with main plugin file. - Added a start script to package.json for easier local server setup. - Verified functionality through local testing with a sample HTML file and existing test suite. --- package.json | 9 +++++++-- src/jquery.sticky-sidebar.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0ce42f2..1bb69f9 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ }, "scripts": { "build": "gulp", - "test": "mocha --compilers js:babel-core/register" + "test": "mocha --compilers js:babel-core/register", + "start": "http-server" }, "repository": { "type": "git", @@ -59,6 +60,10 @@ "rollup-plugin-commonjs": "^8.2.1", "rollup-plugin-eslint": "^4.0.0", "rollup-plugin-node-resolve": "^3.0.0", - "sinon": "^4.4.3" + "sinon": "^4.4.3", + "http-server": "^0.12.3" + }, + "dependencies": { + "sticky-sidebar": "^3.3.1" } } diff --git a/src/jquery.sticky-sidebar.js b/src/jquery.sticky-sidebar.js index 6dd972e..88c18ee 100644 --- a/src/jquery.sticky-sidebar.js +++ b/src/jquery.sticky-sidebar.js @@ -9,7 +9,7 @@ import StickySidebar from './sticky-sidebar'; // Make sure the site has jquery or zepto plugin. if( plugin ){ /** - * Sticky Sidebar Plugin Defintion. + * Sticky Sidebar Plugin Definition. * @param {Object|String} - config */ function _jQueryPlugin(config){