cd "C:\Program Files\nodejs"
# or
cd "C:\Program Files (x86)\nodejs"
npm install npm@latest
We recomended use nodejs version more than 6, but better use 7 or 8.
Run command in terminal npm run cleanup
. This command run script tools/removeDemo.js
Create new module using npm run amo
command or maually.
In javascript part of module for example modules/slider/slider.js
// slider.js
import $ from "jquery";
import "ion-rangeslider"; // jQuery plugin
/**
* Simple module
*
* @param {String} selector - DOM selector
* @param {*} options - options for jQuery plugin
* @returns jQuery plugin instance
*/
export default (selector, options) => {
// You can rewrite default options here
const defaultOptions = {
grid: true
};
const mergedOptions = Object.assign({}, defaultOptions, options);
return $(selector).ionRangeSlider(mergedOptions);
};
In main javascript file use this wrapper
// main.js
import Slider from "@/modules/slider/slider";
Slider("#slider", {
type: "double",
min: 0,
max: 1000,
from: 200,
to: 500
});
And finaly import plugin styles, if it needed
// slider.styl
@import "ion-rangeslider/css/ion.rangeSlider.css"
// your styles rewrite