diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 30bfe61..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index 074ab52..baadd77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.DS_Store package-lock.json node_modules \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 07320b5..df66994 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,7 +8,10 @@ module.exports = function (grunt) { 'https://github.com/denissdubinin/Javascript-Sudoku - Licensed MIT */\n', uglify: { options: { - banner: '<%= banner %>' + banner: '<%= banner %>', + output: { + beautify: false + } }, dist: { files: { diff --git a/dist/sudoku.min.css b/dist/sudoku.min.css index 19b0ed0..0369321 100644 --- a/dist/sudoku.min.css +++ b/dist/sudoku.min.css @@ -1,4 +1,4 @@ /*! Javascript Sudoku v1.0.0 by Deniss Dubinin - https://github.com/denissdubinin/Javascript-Sudoku - Licensed MIT */ -.sudoku{margin:0 auto;position:relative;width:370px}.sudoku.loading::after{background:#fff;content:'';cursor:not-allowed;display:block;height:100%;left:0;opacity:.5;position:absolute;top:0;width:100%}.sudoku table{width:370px;height:370px}.sudoku .sudoku-cell{padding:0}.sudoku .sudoku-cell.invalid-cell input{background:#f9d4d4}.sudoku tr:nth-of-type(3n){border-bottom:2px solid #c5c5c5}.sudoku tr:last-of-type{border-bottom:none}.sudoku td:nth-of-type(3n){border-right:2px solid #c5c5c5}.sudoku td:last-of-type{border-right:none}.sudoku input{border:0;height:100%;text-align:center;width:100%}.sudoku input:disabled{background:#f5f5f5;cursor:not-allowed} +/*! Javascript Sudoku v1.0.0 by Deniss Dubinin - https://github.com/denissdubinin/Javascript-Sudoku - Licensed MIT */.sudoku{margin:0 auto;position:relative;width:370px}.sudoku.loading::after{background:#fff;content:'';cursor:not-allowed;display:block;height:100%;left:0;opacity:.5;position:absolute;top:0;width:100%}.sudoku table{width:370px;height:370px}.sudoku .sudoku-cell{padding:0}.sudoku .sudoku-cell.invalid-cell input{background:#f9d4d4}.sudoku tr:nth-of-type(3n){border-bottom:2px solid #c5c5c5}.sudoku tr:last-of-type{border-bottom:none}.sudoku td:nth-of-type(3n){border-right:2px solid #c5c5c5}.sudoku td:last-of-type{border-right:none}.sudoku input{border:0;height:100%;text-align:center;width:100%}.sudoku input:disabled{background:#f5f5f5;cursor:not-allowed}.sudoku input.timer-disabled{cursor:not-allowed} /*# sourceMappingURL=sudoku.min.css.map */ diff --git a/dist/sudoku.min.css.map b/dist/sudoku.min.css.map index e130807..1cb493e 100644 --- a/dist/sudoku.min.css.map +++ b/dist/sudoku.min.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAMA,OAAQ,CACJ,MAAM,CAAE,MAAM,CACd,QAAQ,CAAE,QAAQ,CAClB,KAAK,CAAE,KAAK,CAEZ,sBAAiB,CACb,UAAU,CAAE,IAAI,CAChB,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,WAAW,CACnB,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,IAAI,CACZ,IAAI,CAAE,CAAC,CACP,OAAO,CAAE,EAAE,CACX,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,CAAC,CACN,KAAK,CAAE,IAAI,CAGf,aAAM,CACF,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,KAAK,CAGjB,oBAAa,CACT,OAAO,CAAE,CAAC,CAEV,uCAAqB,CACjB,UAAU,CAAE,OAAO,CAKvB,0BAAkB,CACd,aAAa,CAAE,iBAAiB,CAGpC,uBAAe,CACX,aAAa,CAAE,IAAI,CAKvB,0BAAkB,CACd,YAAY,CAAE,iBAAiB,CAGnC,uBAAe,CACX,YAAY,CAAE,IAAI,CAI1B,aAAM,CACF,MAAM,CAAE,CAAC,CACT,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,IAAI,CAEX,sBAAW,CACP,UAAU,CAAE,OAAO,CACnB,MAAM,CAAE,WAAW", +"mappings": "AAAA,qHAAqH,AAErH,OAAQ,CACJ,MAAM,CAAE,MAAM,CACd,QAAQ,CAAE,QAAQ,CAClB,KAAK,CAAE,KAAK,CAEZ,sBAAiB,CACb,UAAU,CAAE,IAAI,CAChB,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,WAAW,CACnB,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,IAAI,CACZ,IAAI,CAAE,CAAC,CACP,OAAO,CAAE,EAAE,CACX,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,CAAC,CACN,KAAK,CAAE,IAAI,CAGf,aAAM,CACF,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,KAAK,CAGjB,oBAAa,CACT,OAAO,CAAE,CAAC,CAEV,uCAAqB,CACjB,UAAU,CAAE,OAAO,CAKvB,0BAAkB,CACd,aAAa,CAAE,iBAAiB,CAGpC,uBAAe,CACX,aAAa,CAAE,IAAI,CAKvB,0BAAkB,CACd,YAAY,CAAE,iBAAiB,CAGnC,uBAAe,CACX,YAAY,CAAE,IAAI,CAI1B,aAAM,CACF,MAAM,CAAE,CAAC,CACT,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,IAAI,CAEX,sBAAW,CACP,UAAU,CAAE,OAAO,CACnB,MAAM,CAAE,WAAW,CAGvB,4BAAiB,CACb,MAAM,CAAE,WAAW", "sources": ["../src/sudoku.scss"], "names": [], "file": "sudoku.min.css" diff --git a/dist/sudoku.min.js b/dist/sudoku.min.js index 4c43beb..50e336a 100644 --- a/dist/sudoku.min.js +++ b/dist/sudoku.min.js @@ -1,3 +1,3 @@ /*! Javascript Sudoku v1.0.0 by Deniss Dubinin - https://github.com/denissdubinin/Javascript-Sudoku - Licensed MIT */ -"use strict";window.sudoku={Valve:"Trilogy"},function(window,$){$.fn.Sudoku=function(options){var defaults={defaultSquare:3,dropTimerOnReset:!0,markWrongCellsOnFly:!1,markWrongCellsOnFinish:!0,useTimer:!0,timerOnly:!0,sudokuMixIterations:500},options=$.extend({},defaults,options),sudokuTimer;function create(o){generateGui(o),init()}function init(){toggleLoadingOverlay(!0),generateMatrix(),mixMatrix(),prepareEmptyMatrix(),fillGrid()}function generateGui(o){o.prepend(':'),$('
').appendTo(o);for(var t=0,u=0;t<9;){for(var n=$('').appendTo(o.find("table"));u<9;)$('').appendTo(n),u++;u=0,t++}initGridButtons(o)}function checkSudokuSuccess(){if(!$(".sudoku-cell").find("input").filter(function(){return""===this.value}).length){var o=[];$(".sudoku .sudoku-row").each(function(t){o.push([]),$(this).find("input").each(function(){o[t].push(parseInt($(this).val()))})}),checkResults(o,window.sudoku.fullMatrix)&&$(document).trigger("startConfetti")}}function toggleLoadingOverlay(o){o?$(".sudoku").addClass("loading"):$(".sudoku").removeClass("loading")}function initGridButtons(o){var t=$("
").addClass("btn-group"),u=$("