From fc44fb504f8f32cbd4d797bec4f9185c14a6e237 Mon Sep 17 00:00:00 2001 From: Arijit Kundu Date: Wed, 16 Dec 2020 13:03:30 +0530 Subject: [PATCH 01/26] Page returns to correct scroll Position --- src/assets/js/init.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/assets/js/init.js b/src/assets/js/init.js index 0e50e982bd..f015d97d09 100644 --- a/src/assets/js/init.js +++ b/src/assets/js/init.js @@ -198,6 +198,16 @@ window.onload = function() { } } + // ================================================= + // Checking hash in URL + // this function runs when the DOM is ready, i.e. when the document has been parsed + setTimeout(function() { + if (location.hash) { + location.href = location.hash; + } + }, 1000); + + // ================================================= // Chinese spacing if (window.pangu) { From 8b4cc78ecda178ed250ae258b472cf366c81fe13 Mon Sep 17 00:00:00 2001 From: Arijit Kundu Date: Wed, 16 Dec 2020 19:49:13 +0530 Subject: [PATCH 02/26] Removed broken script file --- src/templates/pages/reference/index.hbs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/templates/pages/reference/index.hbs b/src/templates/pages/reference/index.hbs index 300e35920c..4d339460b3 100644 --- a/src/templates/pages/reference/index.hbs +++ b/src/templates/pages/reference/index.hbs @@ -26,7 +26,6 @@ slug: reference/ - From e7dc2c783c5cf070a67071772f041474a856f2e6 Mon Sep 17 00:00:00 2001 From: Rishabh Taparia Date: Sat, 19 Dec 2020 17:30:05 +0530 Subject: [PATCH 03/26] Added a copy button in get-started webpage to copy the example texts and cdn link --- package-lock.json | 276 +++++++++++----------- package.json | 12 +- src/assets/css/main.css | 27 ++- src/assets/js/get-started.js | 30 +++ src/templates/pages/get-started/index.hbs | 37 ++- 5 files changed, 225 insertions(+), 157 deletions(-) create mode 100644 src/assets/js/get-started.js diff --git a/package-lock.json b/package-lock.json index 85ab5d5e1e..bc5246f641 100644 --- a/package-lock.json +++ b/package-lock.json @@ -716,7 +716,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true + "dev": true, + "optional": true }, "array-flatten": { "version": "2.1.2", @@ -1395,8 +1396,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -2944,7 +2944,8 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true + "dev": true, + "optional": true }, "bytes": { "version": "1.0.0", @@ -3119,6 +3120,7 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, + "optional": true, "requires": { "camelcase": "^2.0.0", "map-obj": "^1.0.0" @@ -3128,7 +3130,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true + "dev": true, + "optional": true } } }, @@ -4454,6 +4457,7 @@ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, + "optional": true, "requires": { "array-find-index": "^1.0.1" } @@ -4671,22 +4675,10 @@ } }, "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" - }, - "dependencies": { - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - } - } + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true }, "debug": { "version": "2.6.9", @@ -6760,6 +6752,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, + "optional": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" @@ -6845,21 +6838,10 @@ "dev": true }, "flat": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.0.tgz", - "integrity": "sha512-6KSMM+cHHzXC/hpldXApL2S8Uz+QZv+tq5o/L0KQYleoG+GcwrnIJhTWC7tCOiKQp8D/fIvryINU1OZCCwevjA==", - "dev": true, - "requires": { - "is-buffer": "~2.0.4" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - } - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "flat-cache": { "version": "1.3.0", @@ -7671,36 +7653,28 @@ } }, "grunt": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.1.0.tgz", - "integrity": "sha512-+NGod0grmviZ7Nzdi9am7vuRS/h76PcWDsV635mEXF0PEQMUV6Kb+OjTdsVxbi0PZmfQOjCMKb3w8CVZcqsn1g==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.3.0.tgz", + "integrity": "sha512-6ILlMXv11/4cxuhSMfSU+SfvbxrPuqZrAtLN64+tZpQ3DAKfSQPQHRbTjSbdtxfyQhGZPtN0bDZJ/LdCM5WXXA==", "dev": true, "requires": { - "coffeescript": "~1.10.0", - "dateformat": "~1.0.12", + "dateformat": "~3.0.3", "eventemitter2": "~0.4.13", - "exit": "~0.1.1", + "exit": "~0.1.2", "findup-sync": "~0.3.0", - "glob": "~7.0.0", - "grunt-cli": "~1.2.0", + "glob": "~7.1.6", + "grunt-cli": "~1.3.2", "grunt-known-options": "~1.1.0", - "grunt-legacy-log": "~2.0.0", - "grunt-legacy-util": "~1.1.1", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.0", "iconv-lite": "~0.4.13", - "js-yaml": "~3.13.1", - "minimatch": "~3.0.2", - "mkdirp": "~1.0.3", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", "nopt": "~3.0.6", - "path-is-absolute": "~1.0.0", - "rimraf": "~2.6.2" + "rimraf": "~3.0.2" }, "dependencies": { - "coffeescript": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", - "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", - "dev": true - }, "findup-sync": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", @@ -7726,31 +7700,19 @@ } }, "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.2", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", - "dev": true, - "requires": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -7766,11 +7728,14 @@ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } } } }, @@ -8185,76 +8150,90 @@ "dev": true }, "grunt-legacy-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", - "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, "requires": { "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.0.0", + "grunt-legacy-log-utils": "~2.1.0", "hooker": "~0.2.3", - "lodash": "~4.17.5" + "lodash": "~4.17.19" } }, "grunt-legacy-log-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", - "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, "requires": { - "chalk": "~2.4.1", - "lodash": "~4.17.10" + "chalk": "~4.1.0", + "lodash": "~4.17.19" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "grunt-legacy-util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", - "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.0.tgz", + "integrity": "sha512-ZEmYFB44bblwPE2oz3q3ygfF6hseQja9tx8I3UZIwbUik32FMWewA+d1qSFicMFB+8dNXDkh35HcDCWlpRsGlA==", "dev": true, "requires": { "async": "~1.5.2", "exit": "~0.1.1", "getobject": "~0.1.0", "hooker": "~0.2.3", - "lodash": "~4.17.10", - "underscore.string": "~3.3.4", + "lodash": "~4.17.20", + "underscore.string": "~3.3.5", "which": "~1.3.0" }, "dependencies": { @@ -8948,7 +8927,8 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true + "dev": true, + "optional": true }, "hsl-regex": { "version": "1.0.0", @@ -9344,6 +9324,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, + "optional": true, "requires": { "repeating": "^2.0.0" } @@ -9389,9 +9370,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inquirer": { @@ -9685,6 +9666,7 @@ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, + "optional": true, "requires": { "builtin-modules": "^1.0.0" } @@ -10223,9 +10205,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -11447,6 +11429,7 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, + "optional": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -12052,6 +12035,7 @@ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, + "optional": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -12276,7 +12260,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true + "dev": true, + "optional": true }, "map-schema": { "version": "0.2.4", @@ -12482,6 +12467,7 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, + "optional": true, "requires": { "camelcase-keys": "^2.0.0", "decamelize": "^1.1.2", @@ -12739,9 +12725,9 @@ "optional": true }, "moment": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", - "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", "dev": true }, "morgan": { @@ -13065,6 +13051,7 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, + "optional": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -13765,6 +13752,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, + "optional": true, "requires": { "error-ex": "^1.2.0" } @@ -13825,6 +13813,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, + "optional": true, "requires": { "pinkie-promise": "^2.0.0" } @@ -13890,6 +13879,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, + "optional": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -16413,9 +16403,9 @@ "dev": true }, "qs": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.0.4.tgz", - "integrity": "sha1-UQGdhHIMk5uCc36EVWp4Izjs6ns=", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", "dev": true }, "querystring": { @@ -16598,6 +16588,7 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, + "optional": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -16609,6 +16600,7 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, + "optional": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" @@ -16664,6 +16656,7 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, + "optional": true, "requires": { "indent-string": "^2.1.0", "strip-indent": "^1.0.1" @@ -16806,6 +16799,7 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, + "optional": true, "requires": { "is-finite": "^1.0.0" } @@ -17964,8 +17958,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -18060,6 +18053,7 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, + "optional": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -18069,13 +18063,15 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true + "dev": true, + "optional": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, + "optional": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -18085,7 +18081,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true + "dev": true, + "optional": true }, "split-string": { "version": "3.1.0", @@ -18519,6 +18516,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, + "optional": true, "requires": { "get-stdin": "^4.0.1" }, @@ -18527,7 +18525,8 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true + "dev": true, + "optional": true } } }, @@ -18818,9 +18817,9 @@ }, "dependencies": { "bl": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", - "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", "dev": true, "optional": true, "requires": { @@ -19452,8 +19451,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -19526,7 +19524,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true + "dev": true, + "optional": true }, "trim-repeated": { "version": "1.0.0", @@ -19856,9 +19855,9 @@ } }, "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, "upper-case": { "version": "1.1.3", @@ -20008,6 +20007,7 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, + "optional": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" diff --git a/package.json b/package.json index ec3a92343d..a3d9a0a17c 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ "eslint": "^4.19.1", "eslint-config-prettier": "^2.10.0", "eslint-plugin-prettier": "^2.7.0", - "flat": "^5.0.0", + "flat": "^5.0.2", "fs-extra": "^9.0.1", - "grunt": "^1.1.0", + "grunt": "^1.3.0", "grunt-assemble": "^0.6.3", "grunt-cli": "^1.3.2", "grunt-contrib-clean": "^0.6.0", @@ -71,15 +71,15 @@ "grunt-uncss": "^0.8.6", "handlebars": "^4.7.6", "husky": "^0.14.3", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.1", "lint-staged": "^9.5.0", "load-grunt-tasks": "^5.1.0", "lodash": "^4.17.20", "marked": "^0.8.2", - "moment": "^2.24.0", + "moment": "^2.29.1", "ms": "^0.7.3", "prettier": "^1.19.1", - "qs": "^6.0.4", + "qs": "^6.9.4", "send": "^0.16.2", "serve-index": "^1.9.1", "simple-git": "^1.132.0", @@ -88,6 +88,6 @@ "yaml": "^1.10.0" }, "dependencies": { - "upath": "^1.1.0" + "upath": "^1.2.0" } } diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 427dd401bc..062eb90a1e 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -441,7 +441,32 @@ textarea { GET STARTED ////////////////////////////////////////////////// */ - +#get-started-page .edit_space { + position: relative; + order: 3; +} +#get-started-page .edit_space .copy_button{ + color: #2d7bb6; + border-color: rgba(45, 123, 182, 0.25); + float: right; + margin: 0.5em 0 0 0.5em; + background: rgba(255, 255, 255, 0.7); + position: absolute; + z-index: 2; + left: 31.33em; + top: -2.5em; +} +/* To make get-started-page responsive */ +@media (max-width: 780px) { + #get-started-page .edit_space .copy_button{ + left: 6.44em; + } +} +@media (max-width: 600px) { + #get-started-page .edit_space .copy_button{ + left: 5.91em; + } +} /* ////////////////////////////////////////////////// EXAMPLES diff --git a/src/assets/js/get-started.js b/src/assets/js/get-started.js new file mode 100644 index 0000000000..3be26b59f4 --- /dev/null +++ b/src/assets/js/get-started.js @@ -0,0 +1,30 @@ +const copyToClipboard = (element)=> { + const value = document.getElementById(element).innerText; + const el = document.createElement('textarea'); + el.value = value; + el.setAttribute('readonly', ''); + el.style.position = 'absolute'; + el.style.left = '-9999px'; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); +} +$("#copy_sketch1").click(()=>{ + copyToClipboard("first-sketch1"); +}) +$("#copy_sketch2").click(()=>{ + copyToClipboard("first-sketch2"); +}); +$("#copy_sketch3").click(()=>{ + copyToClipboard("first-sketch3"); +}); +$("#copy_p5_script").click(()=>{ + copyToClipboard("markup1"); +}); +$("#copy_p5_link").click(()=>{ + copyToClipboard("cdn-link"); +}); +$("#copy_p5_html").click(()=>{ + copyToClipboard("sample-html"); +}); diff --git a/src/templates/pages/get-started/index.hbs b/src/templates/pages/get-started/index.hbs index 3f1ba168e6..90d528d7eb 100644 --- a/src/templates/pages/get-started/index.hbs +++ b/src/templates/pages/get-started/index.hbs @@ -24,7 +24,7 @@ slug: get-started/

{{#i18n "first-sketch-heading1"}}{{/i18n}}

{{#i18n "your-first-sketch-intro1"}}{{/i18n}}{{#i18n "your-first-sketch-intro3"}}{{/i18n}}{{#i18n "your-first-sketch-intro4"}}{{/i18n}}

-

+

 function setup() {
   createCanvas(400, 400);
 }
@@ -34,12 +34,15 @@ function draw() {
 }
 
 
+
+ +

{{#i18n "your-first-sketch1"}}{{/i18n}}background(220);{{#i18n "your-first-sketch2"}}{{/i18n}}ellipse(50,50,80,80);.

{{#i18n "your-first-sketch3"}}{{/i18n}}

{{#i18n "first-sketch-heading1"}}{{/i18n}}

-

+

 function setup() {
   createCanvas(400, 400);
 }
@@ -50,6 +53,9 @@ function draw() {
 }
 
 
+
+ +

{{#i18n "your-first-sketch4"}}{{/i18n}}

{{#i18n "your-first-sketch5"}}{{/i18n}}

{{#i18n "first-sketch-heading2"}}{{/i18n}}

@@ -66,7 +72,7 @@ function draw() {

{{#i18n "first-sketch-heading3"}}{{/i18n}}

{{#i18n "your-first-sketch12"}}{{/i18n}}

-

+

 function setup() {
   createCanvas(400, 400);
 }
@@ -80,7 +86,9 @@ function draw() {
   ellipse(mouseX, mouseY, 80, 80);
 }
 
- +
+ +

{{#i18n "your-first-sketch13"}}{{/i18n}}

@@ -132,7 +140,10 @@ function draw() {

{{#i18n "download4"}}{{/i18n}}

-
<script src="../p5.min.js"></script>
+
<script src="../p5.min.js"></script>
+
+ +

{{#i18n "hosted-title"}}{{/i18n}}

@@ -142,11 +153,13 @@ function draw() { p5.js CDN{{#i18n "download6"}}{{/i18n}}

-
<script src="https://cdn.jsdelivr.net/npm/p5@[p5_version]/lib/p5.js"></script>
- + +
+ +

{{#i18n "download7"}}{{/i18n}}

-

+        

 <html>
   <head>
     <script src="https://cdn.jsdelivr.net/npm/p5@[p5_version]/lib/p5.js"></script>
@@ -158,7 +171,9 @@ function draw() {
   </body>
 </html>
         
- +
+ +

{{#i18n "environment-title"}}{{/i18n}}

@@ -188,9 +203,7 @@ function draw() { $(this).html(html); }); }); - - {{> footer}} @@ -198,5 +211,5 @@ function draw() {
{{> asterisk}} - + From 5a022404fe1492071b3f32aaade189920bec69ce Mon Sep 17 00:00:00 2001 From: Lauren Lee McCarthy Date: Sat, 19 Dec 2020 23:54:36 -0800 Subject: [PATCH 04/26] Update automated_reference_update.md --- contributor_docs/automated_reference_update.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contributor_docs/automated_reference_update.md b/contributor_docs/automated_reference_update.md index f9eceae8bb..41191cabc8 100644 --- a/contributor_docs/automated_reference_update.md +++ b/contributor_docs/automated_reference_update.md @@ -1,4 +1,4 @@ -##Automated Reference update +## Automated Reference update The p5.js documentation needs to be updated every time a new p5.js release gets published. This process is done by the `update-enJSON` [grunt task](https://github.com/processing/p5.js-website/blob/main/Gruntfile.js). @@ -16,6 +16,6 @@ Every time a new p5.js release gets published, the update-p5jswebsite workflow ( When the update-documentation workflow commits the updated Reference files, the commit message will show both the p5.js release tag and the commit's sha. -###Notes: +### Notes: - For the repository_dispatch event of the update-p5jswebsite workflow, [this GitHub action](https://github.com/peter-evans/repository-dispatch) was used. - In order for the update-p5jswebsite workflow to trigger the update-documentation workflow, **it requires a repo scoped Personal Access Token created on a user with write access to the p5.js-website repository**. The Personal Access Token needs to be stored as secret in the p5.js repository. From f3e44c2da8e8eb954bbdfecf373367123ca5b9bf Mon Sep 17 00:00:00 2001 From: drendog <53359960+drendog@users.noreply.github.com> Date: Sun, 20 Dec 2020 17:30:51 +0100 Subject: [PATCH 05/26] fix community email --- src/templates/pages/community/index.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/pages/community/index.hbs b/src/templates/pages/community/index.hbs index 0875cef393..dc52d1d953 100644 --- a/src/templates/pages/community/index.hbs +++ b/src/templates/pages/community/index.hbs @@ -59,7 +59,7 @@ slug: community/

{{#i18n "teach-title"}}{{/i18n}}{{#i18n "teach1"}}{{/i18n}}

-

{{#i18n "create-title"}}{{/i18n}}{{#i18n "create1"}}{{/i18n}}{{#i18n "create2"}}{{/i18n}}{{#i18n "create3"}}{{/i18n}}

+

{{#i18n "create-title"}}{{/i18n}}{{#i18n "create1"}}{{/i18n}}{{#i18n "create2"}}{{/i18n}}{{#i18n "create3"}}{{/i18n}}

{{#i18n "donate-title"}}{{/i18n}}{{#i18n "donate1"}}{{/i18n}}{{#i18n "donate2"}}{{/i18n}}{{#i18n "donate3"}}{{/i18n}}

From a6b4f66ce4a1c46cba3da028de5b65a476024c4f Mon Sep 17 00:00:00 2001 From: Rishabh Taparia Date: Tue, 22 Dec 2020 01:09:24 +0530 Subject: [PATCH 06/26] Changed the alignment of copy button in get-started and added the entry in .yml files --- i18n-tracking.yml | 12 ++++++------ src/assets/css/main.css | 2 +- src/data/en.yml | 3 ++- src/data/es.yml | 1 + src/data/ko.yml | 1 + src/data/zh-Hans.yml | 1 + src/templates/pages/get-started/index.hbs | 16 ++++++++-------- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/i18n-tracking.yml b/i18n-tracking.yml index 3384b5e9f7..28b2be322d 100644 --- a/i18n-tracking.yml +++ b/i18n-tracking.yml @@ -1,5 +1,7 @@ es: src/data/en.yml: + line 97: ' get-started-button' + line 96: ' get-started7' line 114: ' environment15' line 113: ' environment14' line 115: ' environment16' @@ -149,7 +151,6 @@ es: line 244: ' download-title' line 245: ' hosted-title' line 50: footerxh1 - line 97: ' p1xh1' line 98: ' p1x1' line 99: ' p5.js is a JavaScript library for creative coding, with a focus on making' line 100: ' coding accessible and inclusive for artists, designers, educators,' @@ -289,7 +290,6 @@ es: line 52: footer2 line 53: footer3 line 58: tagline3 - line 96: ' start-creating' line 101: ' beginners, and anyone else! p5.js is free and open-source because we believe' line 106: ' think of your whole browser page as your sketch, including HTML5 objects for' line 107: ' text, input, video, webcam, and sound.' @@ -1819,6 +1819,8 @@ es: line 2557: ' teach-case12-content5-2' ko: src/data/en.yml: + line 97: ' get-started-button' + line 96: ' get-started7' line 114: ' environment15' line 113: ' environment14' line 115: ' environment16' @@ -1969,7 +1971,6 @@ ko: line 244: ' download-title' line 245: ' hosted-title' line 50: footerxh1 - line 97: ' p1xh1' line 98: ' p1x1' line 99: ' p5.js is a JavaScript library for creative coding, with a focus on making' line 100: ' coding accessible and inclusive for artists, designers, educators,' @@ -2109,7 +2110,6 @@ ko: line 52: footer2 line 53: footer3 line 58: tagline3 - line 96: ' start-creating' line 101: ' beginners, and anyone else! p5.js is free and open-source because we believe' line 106: ' think of your whole browser page as your sketch, including HTML5 objects for' line 107: ' text, input, video, webcam, and sound.' @@ -3638,6 +3638,8 @@ ko: line 2557: ' teach-case12-content5-2' zh-Hans: src/data/en.yml: + line 97: ' get-started-button' + line 96: ' get-started7' line 114: ' environment15' line 113: ' environment14' line 115: ' environment16' @@ -3787,7 +3789,6 @@ zh-Hans: line 244: ' download-title' line 245: ' hosted-title' line 50: footerxh1 - line 97: ' p1xh1' line 98: ' p1x1' line 99: ' p5.js is a JavaScript library for creative coding, with a focus on making' line 100: ' coding accessible and inclusive for artists, designers, educators,' @@ -3927,7 +3928,6 @@ zh-Hans: line 52: footer2 line 53: footer3 line 58: tagline3 - line 96: ' start-creating' line 101: ' beginners, and anyone else! p5.js is free and open-source because we believe' line 106: ' think of your whole browser page as your sketch, including HTML5 objects for' line 107: ' text, input, video, webcam, and sound.' diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 062eb90a1e..4674278e54 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -454,7 +454,7 @@ textarea { position: absolute; z-index: 2; left: 31.33em; - top: -2.5em; + top: -1.5em; } /* To make get-started-page responsive */ @media (max-width: 780px) { diff --git a/src/data/en.yml b/src/data/en.yml index 9b8e89572e..58e1e3b905 100644 --- a/src/data/en.yml +++ b/src/data/en.yml @@ -92,7 +92,8 @@ get started: get-started6: >- . If you would like to work on the the desktop version of p5.js you can scroll down to - get-started7: downloading instructions + get-started7: downloading instructions, + get-started-button: 'Copy' settingUp-title: Setting up p5.js with an editor on your own computer download-title: Downloading a copy of the p5.js library hosted-title: Using a hosted version of the p5.js library diff --git a/src/data/es.yml b/src/data/es.yml index 9a447579cc..5a1e3c305f 100644 --- a/src/data/es.yml +++ b/src/data/es.yml @@ -94,6 +94,7 @@ get started: get-started5: tu primer bosquejo get-started6: '. Si deseas trabajar en la versión de escritorio de p5.js, puedes ir a las ' get-started7: instrucciones de descarga + get-started-button: 'Copy' settingUp-title: Configura p5.js con un editor en tu computadora personal download-title: Descarga una copia de la biblioteca p5.js hosted-title: Utiliza una versión alojada de la biblioteca p5.js diff --git a/src/data/ko.yml b/src/data/ko.yml index 5e13b4fda9..40a5f53944 100644 --- a/src/data/ko.yml +++ b/src/data/ko.yml @@ -81,6 +81,7 @@ get started: get-started5: 나의 첫 스케치 get-started6: '로 내려가 코드 작성법을 확인하세요. p5.js를 데스크탑 에디터에서 사용하는 방법은 여기서 확인하세요:' get-started7: 데스크탑에 다운받기 + get-started-button: 'Copy' settingUp-title: 데스크탑 에디터에 p5.js 설정하기 download-title: 다운로드 & 파일 설정 hosted-title: 호스팅된 p5.js 라이브러리 사용하기 diff --git a/src/data/zh-Hans.yml b/src/data/zh-Hans.yml index bdb16169f1..d55ce6591c 100644 --- a/src/data/zh-Hans.yml +++ b/src/data/zh-Hans.yml @@ -81,6 +81,7 @@ get started: . If you would like to work on the the desktop version of p5.js you can scroll down to get-started7: downloading instructions + get-started-button: 'Copy' settingUp-title: Setting up p5.js with an editor on your own computer download-title: Downloading a copy of the p5.js library hosted-title: Using a hosted version of the p5.js library diff --git a/src/templates/pages/get-started/index.hbs b/src/templates/pages/get-started/index.hbs index 90d528d7eb..365ae2b652 100644 --- a/src/templates/pages/get-started/index.hbs +++ b/src/templates/pages/get-started/index.hbs @@ -35,7 +35,7 @@ function draw() {
- +

{{#i18n "your-first-sketch1"}}{{/i18n}}background(220);{{#i18n "your-first-sketch2"}}{{/i18n}}ellipse(50,50,80,80);.

@@ -54,9 +54,9 @@ function draw() {
- +
-

{{#i18n "your-first-sketch4"}}{{/i18n}}

+

{{#i18n "your-first-sketch4"}}{{/i18n}}

{{#i18n "your-first-sketch5"}}{{/i18n}}

{{#i18n "first-sketch-heading2"}}{{/i18n}}

{{#i18n "your-first-sketch6"}}{{/i18n}}{{#i18n "your-first-sketch7"}}{{/i18n}}. @@ -87,9 +87,9 @@ function draw() { }

- +
-

{{#i18n "your-first-sketch13"}}{{/i18n}} +

{{#i18n "your-first-sketch13"}}{{/i18n}}

{{#i18n "your-first-sketch14"}}{{/i18n}} @@ -142,7 +142,7 @@ function draw() {
<script src="../p5.min.js"></script>
- +
@@ -155,7 +155,7 @@ function draw() {
- +

{{#i18n "download7"}}{{/i18n}}

@@ -172,7 +172,7 @@ function draw() { </html>
- +

{{#i18n "environment-title"}}{{/i18n}}

From 917703a48aa2775476b60a02eb1e1bb01ea24312 Mon Sep 17 00:00:00 2001 From: Rishabh Taparia Date: Sat, 26 Dec 2020 01:15:08 +0530 Subject: [PATCH 07/26] Updated the HSB color values in the color page of learn section --- i18n-tracking.yml | 9 +++++++++ src/data/en.yml | 6 +++--- src/data/es.yml | 6 +++--- src/data/ko.yml | 6 +++--- src/data/zh-Hans.yml | 6 +++--- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/i18n-tracking.yml b/i18n-tracking.yml index 3384b5e9f7..32c765f2e1 100644 --- a/i18n-tracking.yml +++ b/i18n-tracking.yml @@ -1817,6 +1817,9 @@ es: line 2555: ' coding concepts.' line 2556: ' teach-case12-content5-1' line 2557: ' teach-case12-content5-2' + line 598: ' color-custom-ranges-li1x2' + line 601: ' color-custom-ranges-li2x2' + line 604: ' color-custom-ranges-li3x2' ko: src/data/en.yml: line 114: ' environment15' @@ -3636,6 +3639,9 @@ ko: line 2555: ' coding concepts.' line 2556: ' teach-case12-content5-1' line 2557: ' teach-case12-content5-2' + line 598: ' color-custom-ranges-li1x2' + line 601: ' color-custom-ranges-li2x2' + line 604: ' color-custom-ranges-li3x2' zh-Hans: src/data/en.yml: line 114: ' environment15' @@ -5455,3 +5461,6 @@ zh-Hans: line 2555: ' coding concepts.' line 2556: ' teach-case12-content5-1' line 2557: ' teach-case12-content5-2' + line 598: ' color-custom-ranges-li1x2' + line 601: ' color-custom-ranges-li2x2' + line 604: ' color-custom-ranges-li3x2' diff --git a/src/data/en.yml b/src/data/en.yml index 9b8e89572e..a308017b7e 100644 --- a/src/data/en.yml +++ b/src/data/en.yml @@ -594,11 +594,11 @@ learn: and brightness) mode. Without getting into too much detail, HSB color works as follows: color-custom-ranges-li1x1: Hue - color-custom-ranges-li1x2: '—The color type, ranges from 0 to 255 by default.' + color-custom-ranges-li1x2: '—The color type, ranges from 0 to 360 by default.' color-custom-ranges-li2x1: Saturation - color-custom-ranges-li2x2: '—The vibrancy of the color, 0 to 255 by default.' + color-custom-ranges-li2x2: '—The vibrancy of the color, 0 to 100 by default.' color-custom-ranges-li3x1: Brightness - color-custom-ranges-li3x2: '—The, well, brightness of the color, 0 to 255 by default.' + color-custom-ranges-li3x2: '—The, well, brightness of the color, 0 to 100 by default.' color-custom-ranges-p6x1: 'With ' color-custom-ranges-p6x2: ' you can set your own ranges for these values. Some prefer a range of 0-360 for hue (think of 360 degrees on a color wheel) and 0-100 for saturation and brightness (think of 0-100%).' coordinate-system-description1: 'This tutorial is from the book ' diff --git a/src/data/es.yml b/src/data/es.yml index 9a447579cc..79603fca5c 100644 --- a/src/data/es.yml +++ b/src/data/es.yml @@ -622,11 +622,11 @@ learn: saturación y brillo). Sin entrar mayormente en detalle, el color HSB funciona como sigue: color-custom-ranges-li1x1: Tono o Matiz - color-custom-ranges-li1x2: '—El tipo de color, valores por definición van de 0 a 255.' + color-custom-ranges-li1x2: '—El tipo de color, valores por definición van de 0 a 360.' color-custom-ranges-li2x1: Saturación - color-custom-ranges-li2x2: '—La vivacidad del color, 0 a 255 por definición.' + color-custom-ranges-li2x2: '—La vivacidad del color, 0 a 100 por definición.' color-custom-ranges-li3x1: Brillo - color-custom-ranges-li3x2: '—Es el brillo del color, 0 a 255 por definición.' + color-custom-ranges-li3x2: '—Es el brillo del color, 0 a 100 por definición.' color-custom-ranges-p6x1: 'Con ' color-custom-ranges-p6x2: ' puedes definir tu propio rango de valores. Algunos prefieren un rango de 0-360 para el tono (piensa en los 360 grados de la rueda de color) y 0-100 para la saturación y brillo (piensa en 0-100%).' coordinate-system-description1: 'Este tutorial proviene del libro ' diff --git a/src/data/ko.yml b/src/data/ko.yml index 5e13b4fda9..92bc8d2534 100644 --- a/src/data/ko.yml +++ b/src/data/ko.yml @@ -477,11 +477,11 @@ learn: 여러분은 사실상 RGB값 설정만으로도 프로그래밍에 필요한 모든 색상을 누릴 수 있을텐데요, 마지막으로 RGB 외에 조정할 수 있는 색상 요소인 HSB(색조 Hue, 채도 Saturation, 밝기 Brightness)를 소개합니다 color-custom-ranges-li1x1: 색조 Hue - color-custom-ranges-li1x2: '—색상의 종류, 기본 범위 0부터 255까지' + color-custom-ranges-li1x2: '—색상의 종류, 기본 범위 0부터 360까지' color-custom-ranges-li2x1: 채도 Saturation - color-custom-ranges-li2x2: '—색상의 생생함 정도, 기본 범위 0부터 255까지' + color-custom-ranges-li2x2: '—색상의 생생함 정도, 기본 범위 0부터 100까지' color-custom-ranges-li3x1: 밝기 Brightness - color-custom-ranges-li3x2: '—(당연히) 색상의 밝은 정도, 기본 범위 0부터 255까지' + color-custom-ranges-li3x2: '—(당연히) 색상의 밝은 정도, 기본 범위 0부터 100까지' color-custom-ranges-p6x1: '이 ' color-custom-ranges-p6x2: ' 함수를 이용하여 HSB값 범위 또한 설정할 수 있습니다. 어떤 사람들은 색조(Hue)를 0부터 360까지 설정하거나(위의 사진처럼 360도의 둥근 색상띠가 생각나지요), 채도와 밝기는 0부터 100까지 설정(0-100% 퍼센티지와 유비되지요)하는 것을 선호하기도 합니다.' coordinate-system-description1: '이 튜토리얼은 다니엘 쉬프만(Daniel Shiffman)저, 모건 카우프만(Morgan Kaufmann) 출판 도서 ' diff --git a/src/data/zh-Hans.yml b/src/data/zh-Hans.yml index bdb16169f1..1583eeddcf 100644 --- a/src/data/zh-Hans.yml +++ b/src/data/zh-Hans.yml @@ -465,11 +465,11 @@ learn: 至将会是介于 0 至 255 之间。 color-custom-ranges-p5x1: 最后,虽然您通常在编程时只需要用到 RGB 色值,您也能使用 HSB(色调、饱和度及亮度)模式来定义颜色。简单来说,HSB 色值使用方法如下: color-custom-ranges-li1x1: 色调 - color-custom-ranges-li1x2: —色调值,默认上介于 0 至 255 之间。 + color-custom-ranges-li1x2: —色调值,默认上介于 0 至 360 之间。 color-custom-ranges-li2x1: 饱和度 - color-custom-ranges-li2x2: —该颜色的饱和度,默认上介于 0 至 255 之间。 + color-custom-ranges-li2x2: —该颜色的饱和度,默认上介于 0 至 100 之间。 color-custom-ranges-li3x1: 亮度 - color-custom-ranges-li3x2: —该颜色的亮度,默认上介于 0 至 255 之间。 + color-custom-ranges-li3x2: —该颜色的亮度,默认上介于 0 至 100 之间。 color-custom-ranges-p6x1: '使用函数 ' color-custom-ranges-p6x2: ' 您就能设定您自选的数字范围。有些人会比较偏好使用介于 0 至 360 之间的数值来定义色调(就如色轮的 360 度一样)及 0 至 100 之间的数值来定义饱和度及亮度(介于 0% 至 100%)。' coordinate-system-description1: '以下教程来自于由 Daniel Shiffman 篇写的《 ' From d3ff0fbf9de8f4a4885c08e5f6197d619ee921b6 Mon Sep 17 00:00:00 2001 From: highonweb Date: Sat, 26 Dec 2020 06:20:24 +0530 Subject: [PATCH 08/26] added circle collision example --- .../en/13_Motion/07_Circle_Collision.js | 145 ++++++++++++++++++ .../es/13_Motion/07_Circle_Collision.js | 145 ++++++++++++++++++ .../ko/13_Motion/07_Circle_Collision.js | 145 ++++++++++++++++++ .../zh-Hans/13_Motion/07_Circle_Collision.js | 145 ++++++++++++++++++ 4 files changed, 580 insertions(+) create mode 100644 src/data/examples/en/13_Motion/07_Circle_Collision.js create mode 100644 src/data/examples/es/13_Motion/07_Circle_Collision.js create mode 100644 src/data/examples/ko/13_Motion/07_Circle_Collision.js create mode 100644 src/data/examples/zh-Hans/13_Motion/07_Circle_Collision.js diff --git a/src/data/examples/en/13_Motion/07_Circle_Collision.js b/src/data/examples/en/13_Motion/07_Circle_Collision.js new file mode 100644 index 0000000000..876bc23d6e --- /dev/null +++ b/src/data/examples/en/13_Motion/07_Circle_Collision.js @@ -0,0 +1,145 @@ +/* + * @name Circle Collision + * @frame 710,400 (optional) + * @description This is a port of the "Circle Collision" example from processing.org/examples
This example uses vectors for better visualization of physical Quantity + */ +class Ball { + constructor(x, y, r) { + this.position = new p5.Vector(x, y); + this.velocity = p5.Vector.random2D(); + this.velocity.mult(3); + this.r = r; + this.m = r * 0.1; + } + update() { + this.position.add(this.velocity); + } + + checkBoundaryCollision() { + if (this.position.x > width - this.r) { + this.position.x = width - this.r; + this.velocity.x *= -1; + } else if (this.position.x < this.r) { + this.position.x = this.r; + this.velocity.x *= -1; + } else if (this.position.y > height - this.r) { + this.position.y = height - this.r; + this.velocity.y *= -1; + } else if (this.position.y < this.r) { + this.position.y = this.r; + this.velocity.y *= -1; + } + } + + checkCollision(other) { + // Get distances between the balls components + let distanceVect = p5.Vector.sub(other.position, this.position); + + // Calculate magnitude of the vector separating the balls + let distanceVectMag = distanceVect.mag(); + + // Minimum distance before they are touching + let minDistance = this.r + other.r; + + if (distanceVectMag < minDistance) { + let distanceCorrection = (minDistance - distanceVectMag) / 2.0; + let d = distanceVect.copy(); + let correctionVector = d.normalize().mult(distanceCorrection); + other.position.add(correctionVector); + this.position.sub(correctionVector); + + // get angle of distanceVect + let theta = distanceVect.heading(); + // precalculate trig values + let sine = sin(theta); + let cosine = cos(theta); + + /* bTemp will hold rotated ball this.positions. You + just need to worry about bTemp[1] this.position*/ + let bTemp = [new p5.Vector(), new p5.Vector()]; + + /* this ball's this.position is relative to the other + so you can use the vector between them (bVect) as the + reference point in the rotation expressions. + bTemp[0].this.position.x and bTemp[0].this.position.y will initialize + automatically to 0.0, which is what you want + since b[1] will rotate around b[0] */ + bTemp[1].x = cosine * distanceVect.x + sine * distanceVect.y; + bTemp[1].y = cosine * distanceVect.y - sine * distanceVect.x; + + // rotate Temporary velocities + let vTemp = [new p5.Vector(), new p5.Vector()]; + + vTemp[0].x = cosine * this.velocity.x + sine * this.velocity.y; + vTemp[0].y = cosine * this.velocity.y - sine * this.velocity.x; + vTemp[1].x = cosine * other.velocity.x + sine * other.velocity.y; + vTemp[1].y = cosine * other.velocity.y - sine * other.velocity.x; + + /* Now that velocities are rotated, you can use 1D + conservation of momentum equations to calculate + the final this.velocity along the x-axis. */ + let vFinal = [new p5.Vector(), new p5.Vector()]; + + // final rotated this.velocity for b[0] + vFinal[0].x = + ((this.m - other.m) * vTemp[0].x + 2 * other.m * vTemp[1].x) / + (this.m + other.m); + vFinal[0].y = vTemp[0].y; + + // final rotated this.velocity for b[0] + vFinal[1].x = + ((other.m - this.m) * vTemp[1].x + 2 * this.m * vTemp[0].x) / + (this.m + other.m); + vFinal[1].y = vTemp[1].y; + + // hack to avoid clumping + bTemp[0].x += vFinal[0].x; + bTemp[1].x += vFinal[1].x; + + /* Rotate ball this.positions and velocities back + Reverse signs in trig expressions to rotate + in the opposite direction */ + // rotate balls + let bFinal = [new p5.Vector(), new p5.Vector()]; + + bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y; + bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x; + bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y; + bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x; + + // update balls to screen this.position + other.position.x = this.position.x + bFinal[1].x; + other.position.y = this.position.y + bFinal[1].y; + + this.position.add(bFinal[0]); + + // update velocities + this.velocity.x = cosine * vFinal[0].x - sine * vFinal[0].y; + this.velocity.y = cosine * vFinal[0].y + sine * vFinal[0].x; + other.velocity.x = cosine * vFinal[1].x - sine * vFinal[1].y; + other.velocity.y = cosine * vFinal[1].y + sine * vFinal[1].x; + } + } + + display() { + noStroke(); + fill(204); + ellipse(this.position.x, this.position.y, this.r * 2, this.r * 2); + } +} +let balls = [new Ball(100, 400, 20), new Ball(700, 400, 80)]; +console.log(balls); +function setup() { + createCanvas(710, 400); +} + +function draw() { + background(51); + for (let i = 0; i < balls.length; i++) { + let b = balls[i]; + b.update(); + b.display(); + b.checkBoundaryCollision(); + balls[0].checkCollision(balls[1]); + } +} diff --git a/src/data/examples/es/13_Motion/07_Circle_Collision.js b/src/data/examples/es/13_Motion/07_Circle_Collision.js new file mode 100644 index 0000000000..876bc23d6e --- /dev/null +++ b/src/data/examples/es/13_Motion/07_Circle_Collision.js @@ -0,0 +1,145 @@ +/* + * @name Circle Collision + * @frame 710,400 (optional) + * @description This is a port of the "Circle Collision" example from processing.org/examples
This example uses vectors for better visualization of physical Quantity + */ +class Ball { + constructor(x, y, r) { + this.position = new p5.Vector(x, y); + this.velocity = p5.Vector.random2D(); + this.velocity.mult(3); + this.r = r; + this.m = r * 0.1; + } + update() { + this.position.add(this.velocity); + } + + checkBoundaryCollision() { + if (this.position.x > width - this.r) { + this.position.x = width - this.r; + this.velocity.x *= -1; + } else if (this.position.x < this.r) { + this.position.x = this.r; + this.velocity.x *= -1; + } else if (this.position.y > height - this.r) { + this.position.y = height - this.r; + this.velocity.y *= -1; + } else if (this.position.y < this.r) { + this.position.y = this.r; + this.velocity.y *= -1; + } + } + + checkCollision(other) { + // Get distances between the balls components + let distanceVect = p5.Vector.sub(other.position, this.position); + + // Calculate magnitude of the vector separating the balls + let distanceVectMag = distanceVect.mag(); + + // Minimum distance before they are touching + let minDistance = this.r + other.r; + + if (distanceVectMag < minDistance) { + let distanceCorrection = (minDistance - distanceVectMag) / 2.0; + let d = distanceVect.copy(); + let correctionVector = d.normalize().mult(distanceCorrection); + other.position.add(correctionVector); + this.position.sub(correctionVector); + + // get angle of distanceVect + let theta = distanceVect.heading(); + // precalculate trig values + let sine = sin(theta); + let cosine = cos(theta); + + /* bTemp will hold rotated ball this.positions. You + just need to worry about bTemp[1] this.position*/ + let bTemp = [new p5.Vector(), new p5.Vector()]; + + /* this ball's this.position is relative to the other + so you can use the vector between them (bVect) as the + reference point in the rotation expressions. + bTemp[0].this.position.x and bTemp[0].this.position.y will initialize + automatically to 0.0, which is what you want + since b[1] will rotate around b[0] */ + bTemp[1].x = cosine * distanceVect.x + sine * distanceVect.y; + bTemp[1].y = cosine * distanceVect.y - sine * distanceVect.x; + + // rotate Temporary velocities + let vTemp = [new p5.Vector(), new p5.Vector()]; + + vTemp[0].x = cosine * this.velocity.x + sine * this.velocity.y; + vTemp[0].y = cosine * this.velocity.y - sine * this.velocity.x; + vTemp[1].x = cosine * other.velocity.x + sine * other.velocity.y; + vTemp[1].y = cosine * other.velocity.y - sine * other.velocity.x; + + /* Now that velocities are rotated, you can use 1D + conservation of momentum equations to calculate + the final this.velocity along the x-axis. */ + let vFinal = [new p5.Vector(), new p5.Vector()]; + + // final rotated this.velocity for b[0] + vFinal[0].x = + ((this.m - other.m) * vTemp[0].x + 2 * other.m * vTemp[1].x) / + (this.m + other.m); + vFinal[0].y = vTemp[0].y; + + // final rotated this.velocity for b[0] + vFinal[1].x = + ((other.m - this.m) * vTemp[1].x + 2 * this.m * vTemp[0].x) / + (this.m + other.m); + vFinal[1].y = vTemp[1].y; + + // hack to avoid clumping + bTemp[0].x += vFinal[0].x; + bTemp[1].x += vFinal[1].x; + + /* Rotate ball this.positions and velocities back + Reverse signs in trig expressions to rotate + in the opposite direction */ + // rotate balls + let bFinal = [new p5.Vector(), new p5.Vector()]; + + bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y; + bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x; + bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y; + bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x; + + // update balls to screen this.position + other.position.x = this.position.x + bFinal[1].x; + other.position.y = this.position.y + bFinal[1].y; + + this.position.add(bFinal[0]); + + // update velocities + this.velocity.x = cosine * vFinal[0].x - sine * vFinal[0].y; + this.velocity.y = cosine * vFinal[0].y + sine * vFinal[0].x; + other.velocity.x = cosine * vFinal[1].x - sine * vFinal[1].y; + other.velocity.y = cosine * vFinal[1].y + sine * vFinal[1].x; + } + } + + display() { + noStroke(); + fill(204); + ellipse(this.position.x, this.position.y, this.r * 2, this.r * 2); + } +} +let balls = [new Ball(100, 400, 20), new Ball(700, 400, 80)]; +console.log(balls); +function setup() { + createCanvas(710, 400); +} + +function draw() { + background(51); + for (let i = 0; i < balls.length; i++) { + let b = balls[i]; + b.update(); + b.display(); + b.checkBoundaryCollision(); + balls[0].checkCollision(balls[1]); + } +} diff --git a/src/data/examples/ko/13_Motion/07_Circle_Collision.js b/src/data/examples/ko/13_Motion/07_Circle_Collision.js new file mode 100644 index 0000000000..876bc23d6e --- /dev/null +++ b/src/data/examples/ko/13_Motion/07_Circle_Collision.js @@ -0,0 +1,145 @@ +/* + * @name Circle Collision + * @frame 710,400 (optional) + * @description This is a port of the "Circle Collision" example from processing.org/examples
This example uses vectors for better visualization of physical Quantity + */ +class Ball { + constructor(x, y, r) { + this.position = new p5.Vector(x, y); + this.velocity = p5.Vector.random2D(); + this.velocity.mult(3); + this.r = r; + this.m = r * 0.1; + } + update() { + this.position.add(this.velocity); + } + + checkBoundaryCollision() { + if (this.position.x > width - this.r) { + this.position.x = width - this.r; + this.velocity.x *= -1; + } else if (this.position.x < this.r) { + this.position.x = this.r; + this.velocity.x *= -1; + } else if (this.position.y > height - this.r) { + this.position.y = height - this.r; + this.velocity.y *= -1; + } else if (this.position.y < this.r) { + this.position.y = this.r; + this.velocity.y *= -1; + } + } + + checkCollision(other) { + // Get distances between the balls components + let distanceVect = p5.Vector.sub(other.position, this.position); + + // Calculate magnitude of the vector separating the balls + let distanceVectMag = distanceVect.mag(); + + // Minimum distance before they are touching + let minDistance = this.r + other.r; + + if (distanceVectMag < minDistance) { + let distanceCorrection = (minDistance - distanceVectMag) / 2.0; + let d = distanceVect.copy(); + let correctionVector = d.normalize().mult(distanceCorrection); + other.position.add(correctionVector); + this.position.sub(correctionVector); + + // get angle of distanceVect + let theta = distanceVect.heading(); + // precalculate trig values + let sine = sin(theta); + let cosine = cos(theta); + + /* bTemp will hold rotated ball this.positions. You + just need to worry about bTemp[1] this.position*/ + let bTemp = [new p5.Vector(), new p5.Vector()]; + + /* this ball's this.position is relative to the other + so you can use the vector between them (bVect) as the + reference point in the rotation expressions. + bTemp[0].this.position.x and bTemp[0].this.position.y will initialize + automatically to 0.0, which is what you want + since b[1] will rotate around b[0] */ + bTemp[1].x = cosine * distanceVect.x + sine * distanceVect.y; + bTemp[1].y = cosine * distanceVect.y - sine * distanceVect.x; + + // rotate Temporary velocities + let vTemp = [new p5.Vector(), new p5.Vector()]; + + vTemp[0].x = cosine * this.velocity.x + sine * this.velocity.y; + vTemp[0].y = cosine * this.velocity.y - sine * this.velocity.x; + vTemp[1].x = cosine * other.velocity.x + sine * other.velocity.y; + vTemp[1].y = cosine * other.velocity.y - sine * other.velocity.x; + + /* Now that velocities are rotated, you can use 1D + conservation of momentum equations to calculate + the final this.velocity along the x-axis. */ + let vFinal = [new p5.Vector(), new p5.Vector()]; + + // final rotated this.velocity for b[0] + vFinal[0].x = + ((this.m - other.m) * vTemp[0].x + 2 * other.m * vTemp[1].x) / + (this.m + other.m); + vFinal[0].y = vTemp[0].y; + + // final rotated this.velocity for b[0] + vFinal[1].x = + ((other.m - this.m) * vTemp[1].x + 2 * this.m * vTemp[0].x) / + (this.m + other.m); + vFinal[1].y = vTemp[1].y; + + // hack to avoid clumping + bTemp[0].x += vFinal[0].x; + bTemp[1].x += vFinal[1].x; + + /* Rotate ball this.positions and velocities back + Reverse signs in trig expressions to rotate + in the opposite direction */ + // rotate balls + let bFinal = [new p5.Vector(), new p5.Vector()]; + + bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y; + bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x; + bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y; + bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x; + + // update balls to screen this.position + other.position.x = this.position.x + bFinal[1].x; + other.position.y = this.position.y + bFinal[1].y; + + this.position.add(bFinal[0]); + + // update velocities + this.velocity.x = cosine * vFinal[0].x - sine * vFinal[0].y; + this.velocity.y = cosine * vFinal[0].y + sine * vFinal[0].x; + other.velocity.x = cosine * vFinal[1].x - sine * vFinal[1].y; + other.velocity.y = cosine * vFinal[1].y + sine * vFinal[1].x; + } + } + + display() { + noStroke(); + fill(204); + ellipse(this.position.x, this.position.y, this.r * 2, this.r * 2); + } +} +let balls = [new Ball(100, 400, 20), new Ball(700, 400, 80)]; +console.log(balls); +function setup() { + createCanvas(710, 400); +} + +function draw() { + background(51); + for (let i = 0; i < balls.length; i++) { + let b = balls[i]; + b.update(); + b.display(); + b.checkBoundaryCollision(); + balls[0].checkCollision(balls[1]); + } +} diff --git a/src/data/examples/zh-Hans/13_Motion/07_Circle_Collision.js b/src/data/examples/zh-Hans/13_Motion/07_Circle_Collision.js new file mode 100644 index 0000000000..876bc23d6e --- /dev/null +++ b/src/data/examples/zh-Hans/13_Motion/07_Circle_Collision.js @@ -0,0 +1,145 @@ +/* + * @name Circle Collision + * @frame 710,400 (optional) + * @description This is a port of the "Circle Collision" example from processing.org/examples
This example uses vectors for better visualization of physical Quantity + */ +class Ball { + constructor(x, y, r) { + this.position = new p5.Vector(x, y); + this.velocity = p5.Vector.random2D(); + this.velocity.mult(3); + this.r = r; + this.m = r * 0.1; + } + update() { + this.position.add(this.velocity); + } + + checkBoundaryCollision() { + if (this.position.x > width - this.r) { + this.position.x = width - this.r; + this.velocity.x *= -1; + } else if (this.position.x < this.r) { + this.position.x = this.r; + this.velocity.x *= -1; + } else if (this.position.y > height - this.r) { + this.position.y = height - this.r; + this.velocity.y *= -1; + } else if (this.position.y < this.r) { + this.position.y = this.r; + this.velocity.y *= -1; + } + } + + checkCollision(other) { + // Get distances between the balls components + let distanceVect = p5.Vector.sub(other.position, this.position); + + // Calculate magnitude of the vector separating the balls + let distanceVectMag = distanceVect.mag(); + + // Minimum distance before they are touching + let minDistance = this.r + other.r; + + if (distanceVectMag < minDistance) { + let distanceCorrection = (minDistance - distanceVectMag) / 2.0; + let d = distanceVect.copy(); + let correctionVector = d.normalize().mult(distanceCorrection); + other.position.add(correctionVector); + this.position.sub(correctionVector); + + // get angle of distanceVect + let theta = distanceVect.heading(); + // precalculate trig values + let sine = sin(theta); + let cosine = cos(theta); + + /* bTemp will hold rotated ball this.positions. You + just need to worry about bTemp[1] this.position*/ + let bTemp = [new p5.Vector(), new p5.Vector()]; + + /* this ball's this.position is relative to the other + so you can use the vector between them (bVect) as the + reference point in the rotation expressions. + bTemp[0].this.position.x and bTemp[0].this.position.y will initialize + automatically to 0.0, which is what you want + since b[1] will rotate around b[0] */ + bTemp[1].x = cosine * distanceVect.x + sine * distanceVect.y; + bTemp[1].y = cosine * distanceVect.y - sine * distanceVect.x; + + // rotate Temporary velocities + let vTemp = [new p5.Vector(), new p5.Vector()]; + + vTemp[0].x = cosine * this.velocity.x + sine * this.velocity.y; + vTemp[0].y = cosine * this.velocity.y - sine * this.velocity.x; + vTemp[1].x = cosine * other.velocity.x + sine * other.velocity.y; + vTemp[1].y = cosine * other.velocity.y - sine * other.velocity.x; + + /* Now that velocities are rotated, you can use 1D + conservation of momentum equations to calculate + the final this.velocity along the x-axis. */ + let vFinal = [new p5.Vector(), new p5.Vector()]; + + // final rotated this.velocity for b[0] + vFinal[0].x = + ((this.m - other.m) * vTemp[0].x + 2 * other.m * vTemp[1].x) / + (this.m + other.m); + vFinal[0].y = vTemp[0].y; + + // final rotated this.velocity for b[0] + vFinal[1].x = + ((other.m - this.m) * vTemp[1].x + 2 * this.m * vTemp[0].x) / + (this.m + other.m); + vFinal[1].y = vTemp[1].y; + + // hack to avoid clumping + bTemp[0].x += vFinal[0].x; + bTemp[1].x += vFinal[1].x; + + /* Rotate ball this.positions and velocities back + Reverse signs in trig expressions to rotate + in the opposite direction */ + // rotate balls + let bFinal = [new p5.Vector(), new p5.Vector()]; + + bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y; + bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x; + bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y; + bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x; + + // update balls to screen this.position + other.position.x = this.position.x + bFinal[1].x; + other.position.y = this.position.y + bFinal[1].y; + + this.position.add(bFinal[0]); + + // update velocities + this.velocity.x = cosine * vFinal[0].x - sine * vFinal[0].y; + this.velocity.y = cosine * vFinal[0].y + sine * vFinal[0].x; + other.velocity.x = cosine * vFinal[1].x - sine * vFinal[1].y; + other.velocity.y = cosine * vFinal[1].y + sine * vFinal[1].x; + } + } + + display() { + noStroke(); + fill(204); + ellipse(this.position.x, this.position.y, this.r * 2, this.r * 2); + } +} +let balls = [new Ball(100, 400, 20), new Ball(700, 400, 80)]; +console.log(balls); +function setup() { + createCanvas(710, 400); +} + +function draw() { + background(51); + for (let i = 0; i < balls.length; i++) { + let b = balls[i]; + b.update(); + b.display(); + b.checkBoundaryCollision(); + balls[0].checkCollision(balls[1]); + } +} From abf92772fc1c7f9acb99661197c768ba6b9b2894 Mon Sep 17 00:00:00 2001 From: Rishabh Taparia Date: Mon, 28 Dec 2020 11:53:39 +0530 Subject: [PATCH 09/26] Added aria-hidden attribute to temporary textarea input --- src/assets/js/get-started.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/js/get-started.js b/src/assets/js/get-started.js index 3be26b59f4..4686d623e8 100644 --- a/src/assets/js/get-started.js +++ b/src/assets/js/get-started.js @@ -5,6 +5,7 @@ const copyToClipboard = (element)=> { el.setAttribute('readonly', ''); el.style.position = 'absolute'; el.style.left = '-9999px'; + el.setAttribute('aria-hidden','true'); document.body.appendChild(el); el.select(); document.execCommand('copy'); From 0869e6295735ba15addf84b3abb0014074a70a71 Mon Sep 17 00:00:00 2001 From: Lauren Lee McCarthy Date: Mon, 28 Dec 2020 20:49:59 +0000 Subject: [PATCH 10/26] Automatic update of translation files (1c67bbb369d51ba19129b4c78aabd474320506b6) --- package-lock.json | 9 ++++++--- src/data/es.yml | 2 +- src/data/ko.yml | 2 +- src/data/zh-Hans.yml | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc5246f641..f4b542098f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1396,7 +1396,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -17958,7 +17959,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -19451,7 +19453,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } diff --git a/src/data/es.yml b/src/data/es.yml index 5a1e3c305f..1852a4efc0 100644 --- a/src/data/es.yml +++ b/src/data/es.yml @@ -94,7 +94,7 @@ get started: get-started5: tu primer bosquejo get-started6: '. Si deseas trabajar en la versión de escritorio de p5.js, puedes ir a las ' get-started7: instrucciones de descarga - get-started-button: 'Copy' + get-started-button: Copy settingUp-title: Configura p5.js con un editor en tu computadora personal download-title: Descarga una copia de la biblioteca p5.js hosted-title: Utiliza una versión alojada de la biblioteca p5.js diff --git a/src/data/ko.yml b/src/data/ko.yml index 40a5f53944..0f3447406c 100644 --- a/src/data/ko.yml +++ b/src/data/ko.yml @@ -81,7 +81,7 @@ get started: get-started5: 나의 첫 스케치 get-started6: '로 내려가 코드 작성법을 확인하세요. p5.js를 데스크탑 에디터에서 사용하는 방법은 여기서 확인하세요:' get-started7: 데스크탑에 다운받기 - get-started-button: 'Copy' + get-started-button: Copy settingUp-title: 데스크탑 에디터에 p5.js 설정하기 download-title: 다운로드 & 파일 설정 hosted-title: 호스팅된 p5.js 라이브러리 사용하기 diff --git a/src/data/zh-Hans.yml b/src/data/zh-Hans.yml index d55ce6591c..93701f6df6 100644 --- a/src/data/zh-Hans.yml +++ b/src/data/zh-Hans.yml @@ -81,7 +81,7 @@ get started: . If you would like to work on the the desktop version of p5.js you can scroll down to get-started7: downloading instructions - get-started-button: 'Copy' + get-started-button: Copy settingUp-title: Setting up p5.js with an editor on your own computer download-title: Downloading a copy of the p5.js library hosted-title: Using a hosted version of the p5.js library From 797e603563b1612daf98b6ba2557f77634b5000a Mon Sep 17 00:00:00 2001 From: limzykenneth Date: Thu, 31 Dec 2020 16:55:07 +0000 Subject: [PATCH 11/26] Remove ignored index.hbs file in learn page templates --- src/templates/pages/learn/index.hbs | 362 ---------------------------- 1 file changed, 362 deletions(-) delete mode 100644 src/templates/pages/learn/index.hbs diff --git a/src/templates/pages/learn/index.hbs b/src/templates/pages/learn/index.hbs deleted file mode 100644 index c7cf7d45cd..0000000000 --- a/src/templates/pages/learn/index.hbs +++ /dev/null @@ -1,362 +0,0 @@ ---- -title: learn -slug: learn/ ---- - -
- - {{> sidebar}} - -
- -
-

{{#i18n "learn-title"}}{{/i18n}}

- -

{{#i18n "learn1"}}{{/i18n}} - {{#i18n "learn2"}}{{/i18n}} - {{#i18n "learn3"}}{{/i18n}} -

- - -

{{#i18n "introduction-to-p5js-title"}}{{/i18n}}

- - -
- - -

{{#i18n "getting-started"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "p5js-overview"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "p5js-processing"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "using-local-server"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "p5js-wiki"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "p5-screen-reader"}}{{/i18n}}

-
- -
- - - - -

{{#i18n "connecting-p5js-title"}}{{/i18n}}

- - -
- - -

{{#i18n "nodejs-and-socketio"}}{{/i18n}}

-
- -
- - - - -

{{#i18n "programming-topics-title"}}{{/i18n}}

- - -
- - -

{{#i18n "beyond-the-canvas"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "3d-webgl"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "color"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "coordinate-system-and-shapes"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "curves"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "interactivity"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "program-flow"}}{{/i18n}}

-
- -
- - - - -

{{#i18n "becoming-a-better-programmer-title"}}{{/i18n}}

- - -
- - -

{{#i18n "debugging"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "optimizing"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "test-driven-development"}}{{/i18n}}

-
- -
- - - - -

{{#i18n "contributing-to-the-community-title"}}{{/i18n}}

- - -
- - -

{{#i18n "development"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "looking-inside"}}{{/i18n}}

-
- -
- - - - -
- - -

{{#i18n "writing-tutorial"}}{{/i18n}}

-
- - - - -
- - -

{{#i18n "creating-libraries"}}{{/i18n}}

-
- -
- - - - - -
- {{> footer}} - -
- - {{> asterisk}} - -
From 81dba569eaa98d9ac5bd7866cfb37fdf10afbc83 Mon Sep 17 00:00:00 2001 From: Lauren McCarthy Date: Fri, 8 Jan 2021 13:42:45 -0800 Subject: [PATCH 12/26] remove fundraiser link --- src/templates/partials/header.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/partials/header.hbs b/src/templates/partials/header.hbs index 0217663ba4..46b8358658 100644 --- a/src/templates/partials/header.hbs +++ b/src/templates/partials/header.hbs @@ -14,5 +14,5 @@ title: header Skip to main content -
This season, we need your help! Click here to #SupportP5!
+ {{!--
This season, we need your help! Click here to #SupportP5!
--}} \ No newline at end of file From 0d1a8dd3bbc8800bb6381a8d64d8fcfa122d9cce Mon Sep 17 00:00:00 2001 From: Lauren Lee McCarthy Date: Thu, 14 Jan 2021 12:49:05 -0800 Subject: [PATCH 13/26] Update header.hbs --- src/templates/partials/header.hbs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/templates/partials/header.hbs b/src/templates/partials/header.hbs index 46b8358658..601f00c75c 100644 --- a/src/templates/partials/header.hbs +++ b/src/templates/partials/header.hbs @@ -11,8 +11,7 @@ title: header
  • Processing for Pi
  • Processing Foundation
  • - Skip to main content {{!--
    This season, we need your help! Click here to #SupportP5!
    --}} - \ No newline at end of file + From 96a08fec8162a4c9476ed6cd3b08549ee030bc37 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Wed, 20 Jan 2021 18:11:41 +0530 Subject: [PATCH 14/26] Added space between text and link --- src/templates/pages/get-started/index.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/pages/get-started/index.hbs b/src/templates/pages/get-started/index.hbs index 365ae2b652..677a2625c6 100644 --- a/src/templates/pages/get-started/index.hbs +++ b/src/templates/pages/get-started/index.hbs @@ -59,7 +59,7 @@ function draw() {

    {{#i18n "your-first-sketch4"}}{{/i18n}}

    {{#i18n "your-first-sketch5"}}{{/i18n}}

    {{#i18n "first-sketch-heading2"}}{{/i18n}}

    -

    {{#i18n "your-first-sketch6"}}{{/i18n}}{{#i18n "your-first-sketch7"}}{{/i18n}}. +

    {{#i18n "your-first-sketch6"}}{{/i18n}} {{#i18n "your-first-sketch7"}}{{/i18n}}.

    {{#i18n "your-first-sketch8"}}{{/i18n}}

    From e7d7c86f4bbdc193d58e90fe85c0979fb9fbb5d6 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Thu, 21 Jan 2021 16:48:40 +0530 Subject: [PATCH 15/26] Added space in English translation and removed space from template --- i18n-tracking.yml | 6 +++--- src/data/en.yml | 2 +- src/templates/pages/get-started/index.hbs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/i18n-tracking.yml b/i18n-tracking.yml index 9955843ee8..44cab185a3 100644 --- a/i18n-tracking.yml +++ b/i18n-tracking.yml @@ -1,5 +1,6 @@ es: src/data/en.yml: + line 163: ' your-first-sketch7' line 97: ' get-started-button' line 96: ' get-started7' line 114: ' environment15' @@ -162,7 +163,6 @@ es: line 134: ' p4xp4' line 141: ' project-a-2-5-phuong' line 144: ' project-a-2-7-phuong' - line 163: ' teach-case1-content1' line 64: ' color-p3x3' line 70: ' color-rgb-p1x1' line 164: ' teach-case1-content1-1' @@ -1822,6 +1822,7 @@ es: line 604: ' color-custom-ranges-li3x2' ko: src/data/en.yml: + line 163: ' your-first-sketch7' line 97: ' get-started-button' line 96: ' get-started7' line 114: ' environment15' @@ -1985,7 +1986,6 @@ ko: line 134: ' p4xp4' line 141: ' project-a-2-5-phuong' line 144: ' project-a-2-7-phuong' - line 163: ' teach-case1-content1' line 64: ' color-p3x3' line 70: ' color-rgb-p1x1' line 164: ' teach-case1-content1-1' @@ -3644,6 +3644,7 @@ ko: line 604: ' color-custom-ranges-li3x2' zh-Hans: src/data/en.yml: + line 163: ' your-first-sketch7' line 97: ' get-started-button' line 96: ' get-started7' line 114: ' environment15' @@ -3806,7 +3807,6 @@ zh-Hans: line 134: ' p4xp4' line 141: ' project-a-2-5-phuong' line 144: ' project-a-2-7-phuong' - line 163: ' teach-case1-content1' line 64: ' color-p3x3' line 70: ' color-rgb-p1x1' line 164: ' teach-case1-content1-1' diff --git a/src/data/en.yml b/src/data/en.yml index f547f610cd..c04eb667e7 100644 --- a/src/data/en.yml +++ b/src/data/en.yml @@ -159,7 +159,7 @@ get started: If you are using a screen reader, you must turn on the accessible outputs in the p5 online editor, outside the editor you must add the accessibility library in your html. To learn more visit - your-first-sketch7: using p5 with a screen reader tutorial + your-first-sketch7: ' using p5 with a screen reader tutorial' your-first-sketch8: >- If you've typed everything correctly, this will appear in the display window: diff --git a/src/templates/pages/get-started/index.hbs b/src/templates/pages/get-started/index.hbs index 677a2625c6..365ae2b652 100644 --- a/src/templates/pages/get-started/index.hbs +++ b/src/templates/pages/get-started/index.hbs @@ -59,7 +59,7 @@ function draw() {

    {{#i18n "your-first-sketch4"}}{{/i18n}}

    {{#i18n "your-first-sketch5"}}{{/i18n}}

    {{#i18n "first-sketch-heading2"}}{{/i18n}}

    -

    {{#i18n "your-first-sketch6"}}{{/i18n}} {{#i18n "your-first-sketch7"}}{{/i18n}}. +

    {{#i18n "your-first-sketch6"}}{{/i18n}}{{#i18n "your-first-sketch7"}}{{/i18n}}.

    {{#i18n "your-first-sketch8"}}{{/i18n}}

    From a983e768a96527b4ac12d972323a8d7a32f9ca99 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Thu, 21 Jan 2021 20:20:24 +0530 Subject: [PATCH 16/26] Added space at text part and removed space from link part --- i18n-tracking.yml | 12 ++++++------ src/data/en.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/i18n-tracking.yml b/i18n-tracking.yml index 44cab185a3..cbea5ac6e3 100644 --- a/i18n-tracking.yml +++ b/i18n-tracking.yml @@ -1,6 +1,7 @@ es: src/data/en.yml: - line 163: ' your-first-sketch7' + line 163: ' library in your html. To learn more visit ' + line 164: ' your-first-sketch7' line 97: ' get-started-button' line 96: ' get-started7' line 114: ' environment15' @@ -165,7 +166,6 @@ es: line 144: ' project-a-2-7-phuong' line 64: ' color-p3x3' line 70: ' color-rgb-p1x1' - line 164: ' teach-case1-content1-1' line 87: ' color-custom-ranges-p2x1' line 24: footer1 line 25: footer2 @@ -1822,7 +1822,8 @@ es: line 604: ' color-custom-ranges-li3x2' ko: src/data/en.yml: - line 163: ' your-first-sketch7' + line 163: ' library in your html. To learn more visit ' + line 164: ' your-first-sketch7' line 97: ' get-started-button' line 96: ' get-started7' line 114: ' environment15' @@ -1988,7 +1989,6 @@ ko: line 144: ' project-a-2-7-phuong' line 64: ' color-p3x3' line 70: ' color-rgb-p1x1' - line 164: ' teach-case1-content1-1' line 87: ' color-custom-ranges-p2x1' line 24: footer1 line 25: footer2 @@ -3644,7 +3644,8 @@ ko: line 604: ' color-custom-ranges-li3x2' zh-Hans: src/data/en.yml: - line 163: ' your-first-sketch7' + line 163: ' library in your html. To learn more visit ' + line 164: ' your-first-sketch7' line 97: ' get-started-button' line 96: ' get-started7' line 114: ' environment15' @@ -3809,7 +3810,6 @@ zh-Hans: line 144: ' project-a-2-7-phuong' line 64: ' color-p3x3' line 70: ' color-rgb-p1x1' - line 164: ' teach-case1-content1-1' line 87: ' color-custom-ranges-p2x1' line 24: footer1 line 25: footer2 diff --git a/src/data/en.yml b/src/data/en.yml index c04eb667e7..7f65018f81 100644 --- a/src/data/en.yml +++ b/src/data/en.yml @@ -158,8 +158,8 @@ get started: your-first-sketch6: >- If you are using a screen reader, you must turn on the accessible outputs in the p5 online editor, outside the editor you must add the accessibility - library in your html. To learn more visit - your-first-sketch7: ' using p5 with a screen reader tutorial' + library in your html. To learn more visit + your-first-sketch7: 'using p5 with a screen reader tutorial' your-first-sketch8: >- If you've typed everything correctly, this will appear in the display window: From 47b901246bba74b6bec2d0e6ea539983e67f4f16 Mon Sep 17 00:00:00 2001 From: Rahulm2310 Date: Sat, 23 Jan 2021 18:03:48 +0530 Subject: [PATCH 17/26] fixed imagemin --- Gruntfile.js | 5 +- package-lock.json | 654 +++++++++++++++++++++++++++++++--------------- package.json | 2 + 3 files changed, 454 insertions(+), 207 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index dae05b1038..f26b38daf5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,6 +12,8 @@ const fse = require('fs-extra'); const git = require('simple-git'); const pkg = require('./package.json'); const update_i18n = require('./updatei18nFiles.js'); +const mozjpeg = require('imagemin-mozjpeg'); +const pngquant = require('imagemin-pngquant'); module.exports = function(grunt) { require('time-grunt')(grunt); @@ -151,7 +153,8 @@ module.exports = function(grunt) { imagemin: { images: { options: { - optimizationLevel: 2 + optimizationLevel: 2, + use: [mozjpeg(),pngquant()] //plugins for jpeg & png image compression }, files: [{ expand: true, diff --git a/package-lock.json b/package-lock.json index f4b542098f..2d76bdc862 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,8 +61,7 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", - "dev": true, - "optional": true + "dev": true }, "@types/events": { "version": "3.0.0", @@ -538,15 +537,13 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", - "dev": true, - "optional": true + "dev": true }, "archive-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", "dev": true, - "optional": true, "requires": { "file-type": "^4.2.0" }, @@ -555,8 +552,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", - "dev": true, - "optional": true + "dev": true } } }, @@ -716,8 +712,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true, - "optional": true + "dev": true }, "array-flatten": { "version": "2.1.2", @@ -2587,7 +2582,6 @@ "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", "dev": true, - "optional": true, "requires": { "decompress": "^4.0.0", "download": "^6.2.2", @@ -2601,7 +2595,6 @@ "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", "dev": true, - "optional": true, "requires": { "execa": "^0.7.0", "executable": "^4.1.0" @@ -2612,7 +2605,6 @@ "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", "dev": true, - "optional": true, "requires": { "execa": "^1.0.0", "find-versions": "^3.0.0" @@ -2623,7 +2615,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, - "optional": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -2637,7 +2628,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, - "optional": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -2653,7 +2643,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, - "optional": true, "requires": { "pump": "^3.0.0" } @@ -2663,7 +2652,6 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "optional": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -2676,7 +2664,6 @@ "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", "dev": true, - "optional": true, "requires": { "bin-version": "^3.0.0", "semver": "^5.6.0", @@ -2687,8 +2674,7 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "optional": true + "dev": true } } }, @@ -2697,7 +2683,6 @@ "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", "dev": true, - "optional": true, "requires": { "bin-check": "^4.1.0", "bin-version-check": "^4.0.0", @@ -2712,7 +2697,6 @@ "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", "dev": true, - "optional": true, "requires": { "archive-type": "^4.0.0", "caw": "^2.0.1", @@ -2732,8 +2716,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -2741,15 +2724,13 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", - "dev": true, - "optional": true + "dev": true }, "got": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", "dev": true, - "optional": true, "requires": { "@sindresorhus/is": "^0.7.0", "cacheable-request": "^2.1.1", @@ -2774,8 +2755,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -2783,15 +2763,13 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", - "dev": true, - "optional": true + "dev": true }, "p-event": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", "dev": true, - "optional": true, "requires": { "p-timeout": "^2.0.1" } @@ -2801,7 +2779,6 @@ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, - "optional": true, "requires": { "p-finally": "^1.0.0" } @@ -2810,22 +2787,19 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "optional": true + "dev": true }, "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "optional": true + "dev": true }, "url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, - "optional": true, "requires": { "prepend-http": "^2.0.0" } @@ -2945,8 +2919,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true, - "optional": true + "dev": true }, "bytes": { "version": "1.0.0", @@ -3001,7 +2974,6 @@ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", "dev": true, - "optional": true, "requires": { "clone-response": "1.0.2", "get-stream": "3.0.0", @@ -3016,15 +2988,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true, - "optional": true + "dev": true }, "normalize-url": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, - "optional": true, "requires": { "prepend-http": "^2.0.0", "query-string": "^5.0.1", @@ -3035,15 +3005,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "optional": true + "dev": true }, "query-string": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, - "optional": true, "requires": { "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", @@ -3055,7 +3023,6 @@ "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, - "optional": true, "requires": { "is-plain-obj": "^1.0.0" } @@ -3121,7 +3088,6 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, - "optional": true, "requires": { "camelcase": "^2.0.0", "map-obj": "^1.0.0" @@ -3131,8 +3097,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true, - "optional": true + "dev": true } } }, @@ -3190,7 +3155,6 @@ "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", "dev": true, - "optional": true, "requires": { "get-proxy": "^2.0.0", "isurl": "^1.0.0-alpha5", @@ -3390,7 +3354,6 @@ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, - "optional": true, "requires": { "mimic-response": "^1.0.0" } @@ -3543,7 +3506,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", "dev": true, - "optional": true, "requires": { "graceful-readlink": ">= 1.0.0" } @@ -3902,7 +3864,6 @@ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", "dev": true, - "optional": true, "requires": { "ini": "^1.3.4", "proto-list": "~1.2.1" @@ -3937,15 +3898,13 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", - "dev": true, - "optional": true + "dev": true }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", "dev": true, - "optional": true, "requires": { "safe-buffer": "5.1.2" } @@ -4458,7 +4417,6 @@ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, - "optional": true, "requires": { "array-find-index": "^1.0.1" } @@ -4715,7 +4673,6 @@ "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", "dev": true, - "optional": true, "requires": { "decompress-tar": "^4.0.0", "decompress-tarbz2": "^4.0.0", @@ -4732,7 +4689,6 @@ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, - "optional": true, "requires": { "mimic-response": "^1.0.0" } @@ -4742,7 +4698,6 @@ "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", "dev": true, - "optional": true, "requires": { "file-type": "^5.2.0", "is-stream": "^1.1.0", @@ -4753,8 +4708,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -4763,7 +4717,6 @@ "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", "dev": true, - "optional": true, "requires": { "decompress-tar": "^4.1.0", "file-type": "^6.1.0", @@ -4776,8 +4729,7 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", - "dev": true, - "optional": true + "dev": true } } }, @@ -4786,7 +4738,6 @@ "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", "dev": true, - "optional": true, "requires": { "decompress-tar": "^4.1.1", "file-type": "^5.2.0", @@ -4797,8 +4748,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -4807,7 +4757,6 @@ "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", "dev": true, - "optional": true, "requires": { "file-type": "^3.8.0", "get-stream": "^2.2.0", @@ -4819,15 +4768,13 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", - "dev": true, - "optional": true + "dev": true }, "get-stream": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", "dev": true, - "optional": true, "requires": { "object-assign": "^4.0.1", "pinkie-promise": "^2.0.0" @@ -5126,7 +5073,6 @@ "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", "dev": true, - "optional": true, "requires": { "caw": "^2.0.0", "content-disposition": "^0.5.2", @@ -5145,15 +5091,13 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true, - "optional": true + "dev": true }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -5167,8 +5111,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true, - "optional": true + "dev": true }, "duplexify": { "version": "3.6.0", @@ -5780,7 +5723,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, - "optional": true, "requires": { "cross-spawn": "^5.0.1", "get-stream": "^3.0.0", @@ -5796,7 +5738,6 @@ "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, - "optional": true, "requires": { "pify": "^2.2.0" } @@ -6075,7 +6016,6 @@ "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", "dev": true, - "optional": true, "requires": { "mime-db": "^1.28.0" } @@ -6085,7 +6025,6 @@ "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", "dev": true, - "optional": true, "requires": { "ext-list": "^2.0.0", "sort-keys-length": "^1.0.0" @@ -6531,7 +6470,6 @@ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, - "optional": true, "requires": { "pend": "~1.2.0" } @@ -6646,15 +6584,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", - "dev": true, - "optional": true + "dev": true }, "filenamify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", "dev": true, - "optional": true, "requires": { "filename-reserved-regex": "^2.0.0", "strip-outer": "^1.0.0", @@ -6753,7 +6689,6 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, - "optional": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" @@ -6764,7 +6699,6 @@ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", "dev": true, - "optional": true, "requires": { "semver-regex": "^2.0.0" } @@ -6925,7 +6859,6 @@ "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, - "optional": true, "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" @@ -7151,7 +7084,6 @@ "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", "dev": true, - "optional": true, "requires": { "npm-conf": "^1.1.0" } @@ -7166,8 +7098,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true, - "optional": true + "dev": true }, "get-value": { "version": "2.0.6", @@ -7568,7 +7499,6 @@ "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", "dev": true, - "optional": true, "requires": { "decompress-response": "^3.2.0", "duplexer3": "^0.1.4", @@ -7596,8 +7526,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true, - "optional": true + "dev": true }, "gray-matter": { "version": "3.1.1", @@ -8732,8 +8661,7 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true, - "optional": true + "dev": true }, "has-symbols": { "version": "1.0.1", @@ -8746,7 +8674,6 @@ "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, - "optional": true, "requires": { "has-symbol-support-x": "^1.4.1" } @@ -8928,8 +8855,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true, - "optional": true + "dev": true }, "hsl-regex": { "version": "1.0.0", @@ -8978,8 +8904,7 @@ "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true, - "optional": true + "dev": true }, "http-errors": { "version": "1.6.3", @@ -9016,6 +8941,12 @@ "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", "dev": true }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, "husky": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", @@ -9162,6 +9093,122 @@ "jpegtran-bin": "^4.0.0" } }, + "imagemin-mozjpeg": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/imagemin-mozjpeg/-/imagemin-mozjpeg-9.0.0.tgz", + "integrity": "sha512-TwOjTzYqCFRgROTWpVSt5UTT0JeCuzF1jswPLKALDd89+PmrJ2PdMMYeDLYZ1fs9cTovI9GJd68mRSnuVt691w==", + "dev": true, + "requires": { + "execa": "^4.0.0", + "is-jpg": "^2.0.0", + "mozjpeg": "^7.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "imagemin-optipng": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz", @@ -9174,6 +9221,130 @@ "optipng-bin": "^5.0.0" } }, + "imagemin-pngquant": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/imagemin-pngquant/-/imagemin-pngquant-9.0.1.tgz", + "integrity": "sha512-PYyo9G/xwddf+Qqlqe3onz5ZH7p6vHYVVkiuuczUjxZmfekyY77RXaOA/AR6FnVoeQxGa/pDtEK5xUKOcVo+sA==", + "dev": true, + "requires": { + "execa": "^4.0.0", + "is-png": "^2.0.0", + "is-stream": "^2.0.0", + "ow": "^0.17.0", + "pngquant-bin": "^6.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-png": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz", + "integrity": "sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==", + "dev": true + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "imagemin-svgo": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.0.0.tgz", @@ -9311,8 +9482,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", - "dev": true, - "optional": true + "dev": true }, "imurmurhash": { "version": "0.1.4", @@ -9325,7 +9495,6 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, - "optional": true, "requires": { "repeating": "^2.0.0" } @@ -9560,7 +9729,6 @@ "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, - "optional": true, "requires": { "from2": "^2.1.1", "p-is-promise": "^1.1.0" @@ -9667,7 +9835,6 @@ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, - "optional": true, "requires": { "builtin-modules": "^1.0.0" } @@ -9836,15 +10003,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-jpg/-/is-jpg-2.0.0.tgz", "integrity": "sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc=", - "dev": true, - "optional": true + "dev": true }, "is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", - "dev": true, - "optional": true + "dev": true }, "is-number": { "version": "2.1.0", @@ -9885,8 +10050,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", - "dev": true, - "optional": true + "dev": true }, "is-observable": { "version": "1.1.0", @@ -9954,8 +10118,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true, - "optional": true + "dev": true }, "is-plain-object": { "version": "2.0.4", @@ -10046,8 +10209,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true, - "optional": true + "dev": true }, "is-stream": { "version": "1.1.0", @@ -10169,7 +10331,6 @@ "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, - "optional": true, "requires": { "has-to-string-tag-x": "^1.2.0", "is-object": "^1.0.1" @@ -10259,8 +10420,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true, - "optional": true + "dev": true }, "json-parse-better-errors": { "version": "1.0.2", @@ -10319,7 +10479,6 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", "dev": true, - "optional": true, "requires": { "json-buffer": "3.0.0" } @@ -11430,7 +11589,6 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, - "optional": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -12000,7 +12158,6 @@ "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", "dev": true, - "optional": true, "requires": { "figures": "^1.3.5", "squeak": "^1.0.0" @@ -12036,7 +12193,6 @@ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, - "optional": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -12052,15 +12208,13 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "optional": true + "dev": true }, "lpad-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", "dev": true, - "optional": true, "requires": { "get-stdin": "^4.0.1", "indent-string": "^2.1.0", @@ -12072,8 +12226,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true, - "optional": true + "dev": true } } }, @@ -12261,8 +12414,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "optional": true + "dev": true }, "map-schema": { "version": "0.2.4", @@ -12468,7 +12620,6 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, - "optional": true, "requires": { "camelcase-keys": "^2.0.0", "decamelize": "^1.1.2", @@ -12652,8 +12803,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "optional": true + "dev": true }, "minimatch": { "version": "3.0.4", @@ -12744,6 +12894,17 @@ "on-headers": "~1.0.1" } }, + "mozjpeg": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/mozjpeg/-/mozjpeg-7.0.0.tgz", + "integrity": "sha512-mH7atSbIusVTO3A4H43sEdmveN3aWn54k6V0edefzCEvOsTrbjg5murY2TsNznaztWnIgaRbWxeLVp4IgKdedQ==", + "dev": true, + "requires": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "logalot": "^2.1.0" + } + }, "ms": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", @@ -12970,8 +13131,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "optional": true + "dev": true }, "no-case": { "version": "2.3.2", @@ -13052,7 +13212,6 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, - "optional": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -13144,7 +13303,6 @@ "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", "dev": true, - "optional": true, "requires": { "config-chain": "^1.1.11", "pify": "^3.0.0" @@ -13154,8 +13312,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -13518,7 +13675,6 @@ "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", "dev": true, - "optional": true, "requires": { "arch": "^2.1.0" } @@ -13545,19 +13701,26 @@ "os-tmpdir": "^1.0.0" } }, + "ow": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/ow/-/ow-0.17.0.tgz", + "integrity": "sha512-i3keDzDQP5lWIe4oODyDFey1qVrq2hXKTuTH2VpqwpYtzPiKZt2ziRI4NBQmgW40AnV5Euz17OyWweCb+bNEQA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + } + }, "p-cancelable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true, - "optional": true + "dev": true }, "p-event": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", "dev": true, - "optional": true, "requires": { "p-timeout": "^1.1.1" } @@ -13566,15 +13729,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "optional": true + "dev": true }, "p-is-promise": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true, - "optional": true + "dev": true }, "p-limit": { "version": "2.2.2", @@ -13605,7 +13766,6 @@ "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", "dev": true, - "optional": true, "requires": { "p-reduce": "^1.0.0" } @@ -13620,15 +13780,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", - "dev": true, - "optional": true + "dev": true }, "p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", "dev": true, - "optional": true, "requires": { "p-finally": "^1.0.0" } @@ -13753,7 +13911,6 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, - "optional": true, "requires": { "error-ex": "^1.2.0" } @@ -13814,7 +13971,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, - "optional": true, "requires": { "pinkie-promise": "^2.0.0" } @@ -13880,7 +14036,6 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, - "optional": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -13897,8 +14052,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true, - "optional": true + "dev": true }, "performance-now": { "version": "2.1.0", @@ -14173,6 +14327,123 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, + "pngquant-bin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/pngquant-bin/-/pngquant-bin-6.0.0.tgz", + "integrity": "sha512-oXWAS9MQ9iiDAJRdAZ9KO1mC5UwhzKkJsmetiu0iqIjJuW7JsuLhmc4JdRm7uJkIWRzIAou/Vq2VcjfJwz30Ow==", + "dev": true, + "requires": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.1", + "execa": "^4.0.0", + "logalot": "^2.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "portscanner": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.2.0.tgz", @@ -16288,8 +16559,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true, - "optional": true + "dev": true }, "preserve": { "version": "0.2.0", @@ -16365,8 +16635,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true, - "optional": true + "dev": true }, "pseudomap": { "version": "1.0.2", @@ -16385,7 +16654,6 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "optional": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -16589,7 +16857,6 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, - "optional": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -16601,7 +16868,6 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, - "optional": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" @@ -16657,7 +16923,6 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, - "optional": true, "requires": { "indent-string": "^2.1.0", "strip-indent": "^1.0.1" @@ -16800,7 +17065,6 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, - "optional": true, "requires": { "is-finite": "^1.0.0" } @@ -17272,7 +17536,6 @@ "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, - "optional": true, "requires": { "lowercase-keys": "^1.0.0" } @@ -17459,7 +17722,6 @@ "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", "dev": true, - "optional": true, "requires": { "commander": "~2.8.1" } @@ -17480,15 +17742,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", - "dev": true, - "optional": true + "dev": true }, "semver-truncate": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", "dev": true, - "optional": true, "requires": { "semver": "^5.3.0" } @@ -17990,7 +18250,6 @@ "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", "dev": true, - "optional": true, "requires": { "is-plain-obj": "^1.0.0" } @@ -18000,7 +18259,6 @@ "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", "dev": true, - "optional": true, "requires": { "sort-keys": "^1.0.0" } @@ -18055,7 +18313,6 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, - "optional": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -18065,15 +18322,13 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true, - "optional": true + "dev": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, - "optional": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -18083,8 +18338,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true, - "optional": true + "dev": true }, "split-string": { "version": "3.1.0", @@ -18127,7 +18381,6 @@ "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", "dev": true, - "optional": true, "requires": { "chalk": "^1.0.0", "console-stream": "^0.1.1", @@ -18314,8 +18567,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true, - "optional": true + "dev": true }, "string-argv": { "version": "0.3.1", @@ -18495,7 +18747,6 @@ "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", "dev": true, - "optional": true, "requires": { "is-natural-number": "^4.0.1" } @@ -18504,8 +18755,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "optional": true + "dev": true }, "strip-final-newline": { "version": "2.0.0", @@ -18518,7 +18768,6 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, - "optional": true, "requires": { "get-stdin": "^4.0.1" }, @@ -18527,8 +18776,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true, - "optional": true + "dev": true } } }, @@ -18543,7 +18791,6 @@ "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", "dev": true, - "optional": true, "requires": { "escape-string-regexp": "^1.0.2" } @@ -18886,15 +19133,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", - "dev": true, - "optional": true + "dev": true }, "tempfile": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", "dev": true, - "optional": true, "requires": { "temp-dir": "^1.0.0", "uuid": "^3.0.1" @@ -19235,8 +19480,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true, - "optional": true + "dev": true }, "timers-browserify": { "version": "2.0.2", @@ -19527,15 +19771,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true, - "optional": true + "dev": true }, "trim-repeated": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", "dev": true, - "optional": true, "requires": { "escape-string-regexp": "^1.0.2" } @@ -19570,6 +19812,12 @@ "prelude-ls": "~1.1.2" } }, + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -19619,7 +19867,6 @@ "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", "dev": true, - "optional": true, "requires": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -19630,7 +19877,6 @@ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", "dev": true, - "optional": true, "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4" @@ -19912,7 +20158,6 @@ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, - "optional": true, "requires": { "prepend-http": "^1.0.1" } @@ -19921,8 +20166,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true, - "optional": true + "dev": true }, "use": { "version": "1.1.2", @@ -20010,7 +20254,6 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, - "optional": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -20455,7 +20698,6 @@ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, - "optional": true, "requires": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" diff --git a/package.json b/package.json index a3d9a0a17c..8a92f3b068 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,8 @@ "grunt-uncss": "^0.8.6", "handlebars": "^4.7.6", "husky": "^0.14.3", + "imagemin-mozjpeg": "^9.0.0", + "imagemin-pngquant": "^9.0.1", "js-yaml": "^3.14.1", "lint-staged": "^9.5.0", "load-grunt-tasks": "^5.1.0", From 27e7945879107094a7192bf03bcf7523557bc2cb Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 23 Jan 2021 13:10:34 -0800 Subject: [PATCH 18/26] Create test.yml --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..ebd18f91fd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test From a25b45530d9aa3308c7843b2c081ca890793dd6c Mon Sep 17 00:00:00 2001 From: Rahul Mohata <54268438+Rahulm2310@users.noreply.github.com> Date: Sun, 24 Jan 2021 22:00:29 +0530 Subject: [PATCH 19/26] Update Gruntfile.js Co-authored-by: Kenneth Lim --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index f26b38daf5..f715c31d72 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -154,7 +154,7 @@ module.exports = function(grunt) { images: { options: { optimizationLevel: 2, - use: [mozjpeg(),pngquant()] //plugins for jpeg & png image compression + use: [mozjpeg({quality: 70}), pngquant()] //plugins for jpeg & png image compression }, files: [{ expand: true, @@ -505,4 +505,4 @@ module.exports = function(grunt) { // runs with just grunt command grunt.registerTask('default', ['build']); -}; \ No newline at end of file +}; From 2f65964fca1f3af5173bca0df0305ac9507852ee Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Mon, 25 Jan 2021 17:17:22 +0530 Subject: [PATCH 20/26] Adding space in the text part using html entity code --- i18n-tracking.yml | 6 +++--- src/data/en.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n-tracking.yml b/i18n-tracking.yml index cbea5ac6e3..0ea836b188 100644 --- a/i18n-tracking.yml +++ b/i18n-tracking.yml @@ -1,5 +1,6 @@ es: src/data/en.yml: + line 162: ' library in your html. To learn more visit ' line 163: ' library in your html. To learn more visit ' line 164: ' your-first-sketch7' line 97: ' get-started-button' @@ -185,7 +186,6 @@ es: line 159: ' processing-transition1' line 160: ' processing-transition2' line 161: ' processing-transition3' - line 162: ' processing-transition4' line 357: ' link-2-chung' line 358: ' link-3-chung' line 359: ' project-a-1-1-chung' @@ -1822,6 +1822,7 @@ es: line 604: ' color-custom-ranges-li3x2' ko: src/data/en.yml: + line 162: ' library in your html. To learn more visit ' line 163: ' library in your html. To learn more visit ' line 164: ' your-first-sketch7' line 97: ' get-started-button' @@ -2008,7 +2009,6 @@ ko: line 159: ' processing-transition1' line 160: ' processing-transition2' line 161: ' processing-transition3' - line 162: ' processing-transition4' line 357: ' link-2-chung' line 358: ' link-3-chung' line 359: ' project-a-1-1-chung' @@ -3644,6 +3644,7 @@ ko: line 604: ' color-custom-ranges-li3x2' zh-Hans: src/data/en.yml: + line 162: ' library in your html. To learn more visit ' line 163: ' library in your html. To learn more visit ' line 164: ' your-first-sketch7' line 97: ' get-started-button' @@ -3829,7 +3830,6 @@ zh-Hans: line 159: ' processing-transition1' line 160: ' processing-transition2' line 161: ' processing-transition3' - line 162: ' processing-transition4' line 357: ' link-2-chung' line 358: ' link-3-chung' line 359: ' project-a-1-1-chung' diff --git a/src/data/en.yml b/src/data/en.yml index 7f65018f81..fdd9b9b022 100644 --- a/src/data/en.yml +++ b/src/data/en.yml @@ -158,7 +158,7 @@ get started: your-first-sketch6: >- If you are using a screen reader, you must turn on the accessible outputs in the p5 online editor, outside the editor you must add the accessibility - library in your html. To learn more visit + library in your html. To learn more visit your-first-sketch7: 'using p5 with a screen reader tutorial' your-first-sketch8: >- If you've typed everything correctly, this will appear in the display From 1689fcecbc4a5589366a50ed40279020fa5eee48 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Wed, 27 Jan 2021 17:24:20 +0530 Subject: [PATCH 21/26] Corrected code for Inheritance which was not implementing inheritance using extends keyword --- .../examples/en/11_Objects/04_Inheritance.js | 23 +++++++++---------- .../examples/es/11_Objects/04_Inheritance.js | 23 +++++++++---------- .../examples/ko/11_Objects/04_Inheritance.js | 23 +++++++++---------- .../zh-Hans/11_Objects/04_Inheritance.js | 23 +++++++++---------- 4 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/data/examples/en/11_Objects/04_Inheritance.js b/src/data/examples/en/11_Objects/04_Inheritance.js index 32b6a630e3..088aeb0cb8 100644 --- a/src/data/examples/en/11_Objects/04_Inheritance.js +++ b/src/data/examples/en/11_Objects/04_Inheritance.js @@ -21,17 +21,23 @@ function draw() { spots.display(); } -class SpinArm { - constructor(x, y, s) { +class Spin { + constructor(x,y,s) { this.x = x; this.y = y; this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } +} + +class SpinArm extends Spin { + constructor(x, y, s) { + super(x,y,s) + } display() { strokeWeight(1); @@ -45,17 +51,10 @@ class SpinArm { } } -class SpinSpots { +class SpinSpots extends Spin { constructor(x, y, s, d) { - this.x = x; - this.y = y; - this.speed = s; + super(x,y,s) this.dim = d; - this.angle = 0.0; - } - - update() { - this.angle += this.speed; } display() { diff --git a/src/data/examples/es/11_Objects/04_Inheritance.js b/src/data/examples/es/11_Objects/04_Inheritance.js index d1b44272f3..070db34939 100644 --- a/src/data/examples/es/11_Objects/04_Inheritance.js +++ b/src/data/examples/es/11_Objects/04_Inheritance.js @@ -21,17 +21,23 @@ function draw() { spots.display(); } -class SpinArm { - constructor(x, y, s) { +class Spin { + constructor(x,y,s) { this.x = x; this.y = y; this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } +} + +class SpinArm extends Spin { + constructor(x, y, s) { + super(x,y,s) + } display() { strokeWeight(1); @@ -45,17 +51,10 @@ class SpinArm { } } -class SpinSpots { +class SpinSpots extends Spin { constructor(x, y, s, d) { - this.x = x; - this.y = y; - this.speed = s; + super(x,y,s) this.dim = d; - this.angle = 0.0; - } - - update() { - this.angle += this.speed; } display() { diff --git a/src/data/examples/ko/11_Objects/04_Inheritance.js b/src/data/examples/ko/11_Objects/04_Inheritance.js index 12b3737c05..b25d812abc 100644 --- a/src/data/examples/ko/11_Objects/04_Inheritance.js +++ b/src/data/examples/ko/11_Objects/04_Inheritance.js @@ -21,17 +21,23 @@ function draw() { spots.display(); } -class SpinArm { - constructor(x, y, s) { +class Spin { + constructor(x,y,s) { this.x = x; this.y = y; this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } +} + +class SpinArm extends Spin { + constructor(x, y, s) { + super(x,y,s) + } display() { strokeWeight(1); @@ -45,17 +51,10 @@ class SpinArm { } } -class SpinSpots { +class SpinSpots extends Spin { constructor(x, y, s, d) { - this.x = x; - this.y = y; - this.speed = s; + super(x,y,s) this.dim = d; - this.angle = 0.0; - } - - update() { - this.angle += this.speed; } display() { diff --git a/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js b/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js index fd4681e71a..87bca76d84 100644 --- a/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js +++ b/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js @@ -20,17 +20,23 @@ function draw() { spots.display(); } -class SpinArm { - constructor(x, y, s) { +class Spin { + constructor(x,y,s) { this.x = x; this.y = y; this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } +} + +class SpinArm extends Spin { + constructor(x, y, s) { + super(x,y,s) + } display() { strokeWeight(1); @@ -44,17 +50,10 @@ class SpinArm { } } -class SpinSpots { +class SpinSpots extends Spin { constructor(x, y, s, d) { - this.x = x; - this.y = y; - this.speed = s; + super(x,y,s) this.dim = d; - this.angle = 0.0; - } - - update() { - this.angle += this.speed; } display() { From 0288a7342f676651790f08fc0c67b058376e62f1 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Sun, 31 Jan 2021 00:03:14 +0530 Subject: [PATCH 22/26] Added space and removed extra whitespace at the end --- src/data/examples/en/11_Objects/04_Inheritance.js | 8 ++++---- src/data/examples/es/11_Objects/04_Inheritance.js | 8 ++++---- src/data/examples/ko/11_Objects/04_Inheritance.js | 8 ++++---- src/data/examples/zh-Hans/11_Objects/04_Inheritance.js | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/data/examples/en/11_Objects/04_Inheritance.js b/src/data/examples/en/11_Objects/04_Inheritance.js index 088aeb0cb8..85a27b4d23 100644 --- a/src/data/examples/en/11_Objects/04_Inheritance.js +++ b/src/data/examples/en/11_Objects/04_Inheritance.js @@ -22,7 +22,7 @@ function draw() { } class Spin { - constructor(x,y,s) { + constructor(x, y, s) { this.x = x; this.y = y; this.speed = s; @@ -36,7 +36,7 @@ class Spin { class SpinArm extends Spin { constructor(x, y, s) { - super(x,y,s) + super(x, y, s) } display() { @@ -53,7 +53,7 @@ class SpinArm extends Spin { class SpinSpots extends Spin { constructor(x, y, s, d) { - super(x,y,s) + super(x, y, s) this.dim = d; } @@ -67,4 +67,4 @@ class SpinSpots extends Spin { ellipse(this.dim/2, 0, this.dim, this.dim); pop(); } -} +} \ No newline at end of file diff --git a/src/data/examples/es/11_Objects/04_Inheritance.js b/src/data/examples/es/11_Objects/04_Inheritance.js index 070db34939..084e099e34 100644 --- a/src/data/examples/es/11_Objects/04_Inheritance.js +++ b/src/data/examples/es/11_Objects/04_Inheritance.js @@ -22,7 +22,7 @@ function draw() { } class Spin { - constructor(x,y,s) { + constructor(x, y, s) { this.x = x; this.y = y; this.speed = s; @@ -36,7 +36,7 @@ class Spin { class SpinArm extends Spin { constructor(x, y, s) { - super(x,y,s) + super(x, y, s) } display() { @@ -53,7 +53,7 @@ class SpinArm extends Spin { class SpinSpots extends Spin { constructor(x, y, s, d) { - super(x,y,s) + super(x, y, s) this.dim = d; } @@ -67,4 +67,4 @@ class SpinSpots extends Spin { ellipse(this.dim/2, 0, this.dim, this.dim); pop(); } -} +} \ No newline at end of file diff --git a/src/data/examples/ko/11_Objects/04_Inheritance.js b/src/data/examples/ko/11_Objects/04_Inheritance.js index b25d812abc..436bd40c3c 100644 --- a/src/data/examples/ko/11_Objects/04_Inheritance.js +++ b/src/data/examples/ko/11_Objects/04_Inheritance.js @@ -22,7 +22,7 @@ function draw() { } class Spin { - constructor(x,y,s) { + constructor(x, y, s) { this.x = x; this.y = y; this.speed = s; @@ -36,7 +36,7 @@ class Spin { class SpinArm extends Spin { constructor(x, y, s) { - super(x,y,s) + super(x, y, s) } display() { @@ -53,7 +53,7 @@ class SpinArm extends Spin { class SpinSpots extends Spin { constructor(x, y, s, d) { - super(x,y,s) + super(x, y, s) this.dim = d; } @@ -67,4 +67,4 @@ class SpinSpots extends Spin { ellipse(this.dim/2, 0, this.dim, this.dim); pop(); } -} +} \ No newline at end of file diff --git a/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js b/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js index 87bca76d84..950c8bfa3d 100644 --- a/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js +++ b/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js @@ -21,7 +21,7 @@ function draw() { } class Spin { - constructor(x,y,s) { + constructor(x, y, s) { this.x = x; this.y = y; this.speed = s; @@ -35,7 +35,7 @@ class Spin { class SpinArm extends Spin { constructor(x, y, s) { - super(x,y,s) + super(x, y, s) } display() { @@ -52,7 +52,7 @@ class SpinArm extends Spin { class SpinSpots extends Spin { constructor(x, y, s, d) { - super(x,y,s) + super(x, y, s) this.dim = d; } @@ -66,4 +66,4 @@ class SpinSpots extends Spin { ellipse(this.dim/2, 0, this.dim, this.dim); pop(); } -} +} \ No newline at end of file From 52c6cf2261aa3c54af0e8c3397eb56652d3dd268 Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Sun, 31 Jan 2021 17:49:41 +0530 Subject: [PATCH 23/26] Removed white extra white spaces --- src/data/examples/en/11_Objects/04_Inheritance.js | 2 +- src/data/examples/es/11_Objects/04_Inheritance.js | 2 +- src/data/examples/ko/11_Objects/04_Inheritance.js | 2 +- src/data/examples/zh-Hans/11_Objects/04_Inheritance.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/examples/en/11_Objects/04_Inheritance.js b/src/data/examples/en/11_Objects/04_Inheritance.js index 85a27b4d23..9070daa336 100644 --- a/src/data/examples/en/11_Objects/04_Inheritance.js +++ b/src/data/examples/en/11_Objects/04_Inheritance.js @@ -28,7 +28,7 @@ class Spin { this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } diff --git a/src/data/examples/es/11_Objects/04_Inheritance.js b/src/data/examples/es/11_Objects/04_Inheritance.js index 084e099e34..b1a0af4203 100644 --- a/src/data/examples/es/11_Objects/04_Inheritance.js +++ b/src/data/examples/es/11_Objects/04_Inheritance.js @@ -28,7 +28,7 @@ class Spin { this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } diff --git a/src/data/examples/ko/11_Objects/04_Inheritance.js b/src/data/examples/ko/11_Objects/04_Inheritance.js index 436bd40c3c..ab5a51bafa 100644 --- a/src/data/examples/ko/11_Objects/04_Inheritance.js +++ b/src/data/examples/ko/11_Objects/04_Inheritance.js @@ -28,7 +28,7 @@ class Spin { this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } diff --git a/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js b/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js index 950c8bfa3d..2218f3c83f 100644 --- a/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js +++ b/src/data/examples/zh-Hans/11_Objects/04_Inheritance.js @@ -27,7 +27,7 @@ class Spin { this.speed = s; this.angle = 0.0; } - + update() { this.angle += this.speed; } From ecd98724d5d43b3148dc846261695a24aed6b79e Mon Sep 17 00:00:00 2001 From: hdcola Date: Mon, 25 Jan 2021 23:44:08 -0500 Subject: [PATCH 24/26] Menu and donation page translated into Chinese --- src/data/zh-Hans.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/data/zh-Hans.yml b/src/data/zh-Hans.yml index f95658619a..b08932f4d3 100644 --- a/src/data/zh-Hans.yml +++ b/src/data/zh-Hans.yml @@ -4,7 +4,7 @@ Sidebar-Title: 网站导航 Home: 主页 Editor: 编辑器 Download: 下载 -Donate: Donate +Donate: 捐献 Start: 入门 Reference: 参考文献 Libraries: 程式库 @@ -14,7 +14,7 @@ Books: 书籍 Community: 社群 Contribute: 贡献 Forum: 论坛 -Showcase: Showcase +Showcase: 案例展示 footerxh1: 归功于 footer1: p5.js 目前由 footer2: 的原 @@ -227,12 +227,9 @@ download: support-title: 支持 p5.js! support-options: 支持方式 support-1: >- - We need your help! p5.js is free, open-source software. We want to make our - community as open and inclusive as possible. You can support this work by - making a donation to the + 我们需要您的帮助!p5.js是免费的开源软件。我们希望使我们的社区尽可能的开放和包容。您可以通过向支持p5.js的组织 support-2: >- - , the organization that supports p5.js. Your donation supports software - development for p5.js, education resources like code examples and tutorials, + 捐款来支持这项工作。您的捐款可以支持p5.js的软件开发、支持像代码示例和教程这样的教育资源、 support-3: 奖学金 support-4: 及 support-5: 社群活动。 From 8d500d6ea5029da0fb7cbd476078ff308f9c2310 Mon Sep 17 00:00:00 2001 From: limzykenneth Date: Wed, 3 Feb 2021 14:05:04 +0000 Subject: [PATCH 25/26] Edits on Chinese translation --- src/data/zh-Hans.yml | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/data/zh-Hans.yml b/src/data/zh-Hans.yml index b08932f4d3..530d9d31aa 100644 --- a/src/data/zh-Hans.yml +++ b/src/data/zh-Hans.yml @@ -92,7 +92,7 @@ get started: download9: here download10: >- . Run your local server within the downloaded folder and on your browser, go - to + to download11: 'http://localhost:{your-port-num}/empty-example' download4: >- 查看 index.html 您可以发现其中有个 p5.js 的链接。如果您想要使用极简化的档案(以加速网页加载的速度),将链接档案名改为 @@ -139,7 +139,7 @@ get started: your-first-sketch6: >- If you are using a screen reader, you must turn on the accessible outputs in the p5 online editor, outside the editor you must add the accessibility - library in your html. To learn more visit + library in your html. To learn more visit your-first-sketch7: using p5 with a screen reader tutorial your-first-sketch8: >- If you've typed everything correctly, this will appear in the display @@ -227,9 +227,9 @@ download: support-title: 支持 p5.js! support-options: 支持方式 support-1: >- - 我们需要您的帮助!p5.js是免费的开源软件。我们希望使我们的社区尽可能的开放和包容。您可以通过向支持p5.js的组织 + 我们需要您的帮助!p5.js 是免费的开源软件。我们希望使我们的社区尽可能的开放和包容。您可以通过向支持 p5.js 的组织 support-2: >- - 捐款来支持这项工作。您的捐款可以支持p5.js的软件开发、支持像代码示例和教程这样的教育资源、 + 捐款来支持这项工作。您的捐款可以支持 p5.js 的软件开发、制作范例代码及教程之类的教育资源、 support-3: 奖学金 support-4: 及 support-5: 社群活动。 @@ -417,15 +417,15 @@ learn: color-p2x3: ' 函数,我们能设置任何图形的颜色。我们也能使用 ' color-p2x4: ' 函数来设定窗口的背景颜色。如下范例。' color-code1: |- - background(255); // 设置背景颜色为白色 - stroke(0); // 设置外线颜色为黑色 - fill(150); // 设置填充色为灰色 + background(255); // 设置背景颜色为白色 + stroke(0); // 设置外线颜色为黑色 + fill(150); // 设置填充色为灰色 rect(50,50,75,100); // 绘制四方形 color-p3x1: '使用 ' color-p3x2: ' 及 ' color-p3x3: >- 函数将会分别去除外线色灰填充色。我们直觉上可能会以为“ stroke(0) ”表示没有外线,可是我们必须记得 0 - 在这并不代表“无”,然而是代表黑色。此外,我们必须记得不要同时去除 + 在这并不代表“无”,然而是代表黑色。此外,我们必须记得不要同时去除 color-p3x4: ' 及 ' color-p3x5: ' 不然不会有任何图形出现在画布上!' color-p4x1: 以此同时,如果我们绘制两个图形,p5.js 将会使用最近(代码内从上至下)所定义的外线色及填充色值。 @@ -455,7 +455,7 @@ learn: color-custom-ranges-title: 自定义颜色值范围 color-custom-ranges-p1x1: >- 介于 0 与 255 之间的 RGB 颜色值并不是 p5.js 唯一定义颜色的方法,事实上,我们能使用多种方法来定义颜色。比如说,您可能比较偏向于使用 - 0 至 100(如百分比)来定义颜色。为此您可以使用 + 0 至 100(如百分比)来定义颜色。为此您可以使用 color-custom-ranges-p2x1: 以上函数表示:“OK,我们要使用红、绿、蓝值来定义颜色。而他们的值将介于 0 至 100 之间。 color-custom-ranges-p3x1: 虽然一般上这么做不会提供任何便利,您可以为个别颜色值提供不同的数值范围: color-custom-ranges-p4x1: >- @@ -801,7 +801,7 @@ books: vastly popular JavaScript with the programming library p5.js. The skills you will acquire from this book are highly transferable to a myriad of industries and can be used towards building web applications, programmable - robots, or generative art. + robots, or generative art. book-5-order-a: Order from Apress book-5-order-b: Order from Amazon examples: @@ -903,14 +903,14 @@ showcase: project-q-2: How did you use p5.js in this project? project-a-2-1-roni-cantor: >- I used p5.js in this project to generate the sine wave and lerp (linear - interpolation) formulas and display the visuals in the + interpolation) formulas and display the visuals in the project-a-2-2-roni-cantor: >- . I then used a feature in my code that exported my programmed graphic into - an + an project-a-2-3-roni-cantor: ' file. I needed an SVG file to give to the plotter—an ' project-a-2-4-roni-cantor: >- —so that it understood where to draw the lines that I programmed. I sent - this information to the plotter with a program called + this information to the plotter with a program called project-a-2-5-roni-cantor: '!' project-q-3: What's your favorite p5.js feature? project-a-3-roni-cantor: ' because lines are fun and "lerp" is a fun word to say!' @@ -987,7 +987,7 @@ showcase: project-a-1-4-phuong: '," mainly taught by ' project-a-2-1-phuong: >- I used p5.js to work on the visual part of the game. The animation sprites - for Airi and the ghosts were drawn on an iPad app called + for Airi and the ghosts were drawn on an iPad app called project-a-2-2-phuong: ' and then integrated into ' project-a-2-3-phuong: ' code. I mainly used examples at p5.play as a reference.' project-a-2-4-phuong: 'For the endless scrolling background, I found a ' @@ -1001,7 +1001,7 @@ showcase: project-a-2-7-phuong: ' (currently, there is a beta version not available in public yet, but it will be very soon!). I added around 120 samples of my classmates saying the word "pew" with different intonations and 80 samples of background noise to train it. Then I integrated the model into the game with ' project-a-3-1-phuong: >- I really love how easily you can create, manipulate, and delete HTML blocks - and classes with the + and classes with the project-a-3-2-phuong: ' via ' project-a-3-3-phuong: ' etc. But my most favorite function is ' project-a-3-4-phuong: ', since this is where you create magic.' @@ -1031,12 +1031,12 @@ showcase: This summer, I gave myself a challenge of making typographic posters with coding, and this is one of the posters I made. I didn’t know until very recently that I could use motion sensor data with p5.js. I was also - watching + watching dan-shiffman-matterjs-tutorial: Dan Shiffman’s matter.js tutorial videos project-a-2-2-chung: ', so I thought why not combine the two and practice what I was learning?' project-a-3-1-chung: >- There are many things I love about p5.js such as the online community and - beginner friendliness. What I really like right now is the + beginner friendliness. What I really like right now is the project-a-3-2-chung: >- , with which I can not only work online for myself but also share URLs quickly in the present mode. For this project in particular, I had to do a @@ -1047,7 +1047,7 @@ showcase: project-a-4-3-chung: ' and build a tool for myself.' project-a-5-1-chung: >- As mentioned above, if you want to render out frames and video files out of - p5.js sketches, check out my + p5.js sketches, check out my project-a-5-2-chung: ' and let me know what you think.' creator-from-casey-louise: 'From New York, New York' project-a-1-1-casey-louise: >- @@ -1058,7 +1058,7 @@ showcase: interactive spaces based on sensor technologies. project-a-1-3-casey-louise: >- Casey: I started learning p5.js in 2018 in my first semester at ITP, though - I had been dabbling in + I had been dabbling in project-a-1-4-casey-louise: ' since 2012. I was introduced to Processing by my friend Pedro while I was studying graphic design, and it blew my mind. The idea of making my own tools for creating graphics and interactive art piqued my interest, but once I actually tried it, I was hooked. The first project I can remember was an eye that followed you around the screen, and it was sad when you left it alone.' project-a-1-5-casey-louise: >- Louise: I initially learned p5.js to make a website I was creating more @@ -1067,7 +1067,7 @@ showcase: project-a-2-1-casey-louise: >- Casey: I was putting off learning shaders for a long time, and I was also curious if I could use them in p5.js. Then I heard about a grant for open - source, storytelling, and learning resource projects at ITP called + source, storytelling, and learning resource projects at ITP called project-a-2-2-casey-louise: >- . Since I wasn't finding much in the way of p5.js + shader documentation, I decided to figure out how they're implemented in p5.js and create a resource @@ -1083,7 +1083,7 @@ showcase: project-a-4-1-casey-louise: >- Casey: The beginning of the project (figuring out how things work) was us reaching out to amazing people, asking questions, and asking for permission - to use their examples in our project. + to use their examples in our project. adam-ferris-repo-casey-louise: Adam Ferriss' GitHub repo project-a-4-2-casey-louise: ' really laid the groundwork for us in understanding how shaders work in p5.js and provided a framework of approachable examples for us to build on. For some specific p5.js-related issues we were having, we reached out to ' project-a-4-3-casey-louise: ' and ' @@ -1096,7 +1096,7 @@ showcase: Ferriss. Our aim was to do so in a way that a complete beginner can understand how to implement it, so it was as much a technical challenge as it was a challenge in teaching code to strangers and beginners. Here we drew - inspiration from the way the + inspiration from the way the openframeworks-book-casey-louise: openFrameworks book project-a-4-7-casey-louise: ' is written. A fun "hey, it’s not hard and you can do it too" approach is what we believe in.' project-a-5-1-casey-louise: 'Check out the ' @@ -1139,10 +1139,10 @@ teach: teach-title2: Teach teach-intro1: >- Every teaching has its own unique goals, messages, conditions, and - environments. + environments. teach-intro2: >- By documenting and sharing p5 workshops, classes, and materials, we hope to - better connect the p5.js learner and educator communities around the world. + better connect the p5.js learner and educator communities around the world. teach-intro3: Share or recommend teach-intro4: 'your own teaching experiences, too!' teach-heading: p5 Teaching Resources @@ -1190,14 +1190,14 @@ teach: teach-case1-content3: Advanced teach-case1-content4: >- To introduce a new public to programming through fun and compelling - examples. + examples. teach-case1-content5: >- Method: in-person workshop, 1 hour per session, with different participant each times. The students were using (Ubuntu) machines with the p5.js web editor. I was teaching using a video projector as well as a board. teach-case1-content5-1: >- Materials: The exercises I gave where accessible through p5.js web-editor - links available in + links available in teach-case2-title: >- Making The Thing that Makes the Thing: Exploring Generative Art & Design with p5.js @@ -1210,7 +1210,7 @@ teach: teach-case2-content3: 'Priti: Intermediate & Ajith: Advanced' teach-case2-content4: >- To explore generative art & design and recreate some classical works - with p5.js. + with p5.js. teach-case2-content5: 'Methods: In-person, collaborative, hands-on workshop.' teach-case2-content5-1: 'Materials: ' teach-case2-content5-2: 'course page ' @@ -1325,7 +1325,7 @@ teach: ml5.js and p5.js. teach-case9-content5: >- This class is a mix of lectures, coding sessions, group discussions, and - presentations. I used + presentations. I used teach-case9-content5-1: GitHub teach-case9-content5-2: ' to host class syllabus and all the coding materials, Google Slides for lectures and p5.js Web Editor for live coding sessions. Every week, there were one-on-one office hours to talk about any difficulties of coming up with an idea for the homework or any coding changes.' teach-case9-content5-3: 'Methods: online/offline lectures and critiques.' @@ -1340,7 +1340,7 @@ teach: teach-case10-content5: >- p5.js source code (for the introductory project), JavaScript source code (illustrating some basic JavaScript functionalities), accompanying slides in - .pdf format, all hosted publicly on GitHub. + .pdf format, all hosted publicly on GitHub. teach-case10-content5-1: Overview teach-case10-content5-2: ' of the workshop and its contents (including all links to the material hosted on GitHub) on my academic webpage.' teach-case11-title: Digital Weaving & Physical Computing Workshop Series From e54ff82e5f72495d07ec78501909462896d69780 Mon Sep 17 00:00:00 2001 From: limzykenneth Date: Wed, 3 Feb 2021 14:07:42 +0000 Subject: [PATCH 26/26] Automatic update of translation files (8d500d6ea5029da0fb7cbd476078ff308f9c2310) --- src/data/zh-Hans.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/data/zh-Hans.yml b/src/data/zh-Hans.yml index 530d9d31aa..c86fa4f9f9 100644 --- a/src/data/zh-Hans.yml +++ b/src/data/zh-Hans.yml @@ -226,10 +226,8 @@ download: supported-browsers: 浏览器支持 support-title: 支持 p5.js! support-options: 支持方式 - support-1: >- - 我们需要您的帮助!p5.js 是免费的开源软件。我们希望使我们的社区尽可能的开放和包容。您可以通过向支持 p5.js 的组织 - support-2: >- - 捐款来支持这项工作。您的捐款可以支持 p5.js 的软件开发、制作范例代码及教程之类的教育资源、 + support-1: 我们需要您的帮助!p5.js 是免费的开源软件。我们希望使我们的社区尽可能的开放和包容。您可以通过向支持 p5.js 的组织 + support-2: 捐款来支持这项工作。您的捐款可以支持 p5.js 的软件开发、制作范例代码及教程之类的教育资源、 support-3: 奖学金 support-4: 及 support-5: 社群活动。 @@ -1030,8 +1028,7 @@ showcase: project-a-2-1-chung: >- This summer, I gave myself a challenge of making typographic posters with coding, and this is one of the posters I made. I didn’t know until very - recently that I could use motion sensor data with p5.js. I was also - watching + recently that I could use motion sensor data with p5.js. I was also watching dan-shiffman-matterjs-tutorial: Dan Shiffman’s matter.js tutorial videos project-a-2-2-chung: ', so I thought why not combine the two and practice what I was learning?' project-a-3-1-chung: >-