diff --git a/README.md b/README.md index acd1479..072b029 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ easily-styled format. ## Usage ### Prerequisites -Download the project files or install it using NPM, Yarn, etc... +Download the project files or install it using Yarn, NPM, etc... ```sh -$ npm install jquery.nice-number --save $ yarn add jquery.nice-number +$ npm install jquery.nice-number --save ``` Include the plugin files in your source. > Note: the path will need to be changed if you downloaded or moved the files. ```html - - + + ``` ### Basic usage @@ -37,3 +37,15 @@ autoSizeBuffer | number | The number of extra character widths that are added to buttonDecrement | jQuery element, HTML element, HTML string, or plain string | The contents of the decrement button | `'-'` buttonIncrement | jQuery element, HTML element, HTML string, or plain string | The contents of the increment button | `'+'` buttonPosition | `'around'`, `'left'`, or `'right'` | The positions of the control buttons | `'around'` + +## Development +### Building +Install the project dependencies +```sh +$ yarn install +``` + +Build the project +```sh +$ gulp +``` diff --git a/jquery.nice-number.css b/dist/jquery.nice-number.css similarity index 100% rename from jquery.nice-number.css rename to dist/jquery.nice-number.css diff --git a/jquery.nice-number.js b/dist/jquery.nice-number.js similarity index 100% rename from jquery.nice-number.js rename to dist/jquery.nice-number.js diff --git a/dist/jquery.nice-number.min.css b/dist/jquery.nice-number.min.css new file mode 100644 index 0000000..0e944d0 --- /dev/null +++ b/dist/jquery.nice-number.min.css @@ -0,0 +1,2 @@ +.nice-number{display:inline-flex;justify-content:stretch}.nice-number input{vertical-align:middle;-moz-appearance:textfield;box-sizing:content-box;margin:0;text-align:center} +.nice-number input::-webkit-inner-spin-button,.nice-number input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0} \ No newline at end of file diff --git a/dist/jquery.nice-number.min.js b/dist/jquery.nice-number.min.js new file mode 100644 index 0000000..b6b550d --- /dev/null +++ b/dist/jquery.nice-number.min.js @@ -0,0 +1 @@ +!function(e){e.fn.niceNumber=function(n){var u=e.extend({autoSize:!0,autoSizeBuffer:1,buttonDecrement:"-",buttonIncrement:"+",buttonPosition:"around"},n);return this.each(function(){var n=this,o=e("
",{class:"nice-number"}).insertAfter(n),a={},i=e("