diff --git a/build.js b/build.js index cf38082592a0dca4bbbc87cf98fee36ae7a2f4a0..2b14e728da6877b6de1ea5ddb5c2a34fd4445a42 100644 --- a/build.js +++ b/build.js @@ -4,12 +4,13 @@ const fs = require("fs"); const browserify = require("browserify"); +const curDir = process.cwd(); // Handle home page const b = browserify(); -b.add(`${process.cwd()}/src/main.js`) +b.add(`${curDir}/src/main.js`) .bundle() - .pipe(fs.createWriteStream(`${process.cwd()}/public/main.js`)); + .pipe(fs.createWriteStream(`${curDir}/public/main.js`)); // Handle subpages function getPageHtml(pagename) { @@ -29,11 +30,11 @@ function getPageHtml(pagename) { `; } -const files = fs.readdirSync(`${process.cwd()}/src/pages`); +const pages = fs.readdirSync(`${curDir}/src/pages`); -for (const f of files) { - const fPath = `${process.cwd()}/src/pages/${f}`; - const targetDirPath = `${process.cwd()}/public/${f}`; +for (const p of pages) { + const fPath = `${curDir}/src/pages/${p}`; + const targetDirPath = `${curDir}/public/${p}`; if (!fs.existsSync(targetDirPath)) { fs.mkdirSync(targetDirPath); @@ -43,8 +44,27 @@ for (const f of files) { b.add(fPath) .bundle() - .pipe(fs.createWriteStream(`${targetDirPath}/${f}.js`)); + .pipe(fs.createWriteStream(`${targetDirPath}/${p}.js`)); const page = fs.createWriteStream(`${targetDirPath}/index.html`); - page.write(getPageHtml(f)); + page.write(getPageHtml(p)); +} + +// If pages have been deleted in source, remove them in output directory too. +for (const dir of fs.readdirSync(`${curDir}/public`).filter(f => { + const stats = fs.statSync(`${curDir}/public/${f}`); + return stats.isDirectory(); +})) { + if (!pages.includes(dir)) { + const dPath = `${curDir}/public/${dir}`; + try { + const nestedFiles = fs.readdirSync(dPath); + for (const nf of nestedFiles) { + fs.unlinkSync(`${dPath}/${nf}`); + } + fs.rmdirSync(dPath); + } catch (error) { + console.error(error); + } + } } diff --git a/package-lock.json b/package-lock.json index 4a95f2a41163eea631177d5dc63abd24d5cb10bc..608ceced56c36033815258ca6933f4faca93995d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "jsonparse": "1.3.1", + "through": "2.3.8" } }, "acorn": { @@ -26,9 +26,9 @@ "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", "dev": true, "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" + "acorn": "7.4.1", + "acorn-walk": "7.2.0", + "xtend": "4.0.2" } }, "acorn-walk": { @@ -43,8 +43,8 @@ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "normalize-path": "3.0.0", + "picomatch": "2.2.2" } }, "array-filter": { @@ -59,10 +59,10 @@ "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "bn.js": "4.11.9", + "inherits": "2.0.4", + "minimalistic-assert": "1.0.1", + "safer-buffer": "2.1.2" }, "dependencies": { "bn.js": { @@ -79,7 +79,7 @@ "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", "dev": true, "requires": { - "object-assign": "^4.1.1", + "object-assign": "4.1.1", "util": "0.10.3" }, "dependencies": { @@ -106,7 +106,7 @@ "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", "dev": true, "requires": { - "array-filter": "^1.0.0" + "array-filter": "1.0.0" } }, "balanced-match": { @@ -139,7 +139,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -149,7 +149,7 @@ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "7.0.1" } }, "brorand": { @@ -164,12 +164,12 @@ "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "dev": true, "requires": { - "JSONStream": "^1.0.3", - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" + "JSONStream": "1.3.5", + "combine-source-map": "0.8.0", + "defined": "1.0.0", + "safe-buffer": "5.2.1", + "through2": "2.0.5", + "umd": "3.0.3" } }, "browser-resolve": { @@ -178,7 +178,7 @@ "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", "dev": true, "requires": { - "resolve": "^1.17.0" + "resolve": "1.19.0" } }, "browserify": { @@ -187,54 +187,54 @@ "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", "dev": true, "requires": { - "JSONStream": "^1.0.3", - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^2.0.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.1", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^3.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.2.1", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.2.3", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "^1.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum-object": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^3.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", + "JSONStream": "1.3.5", + "assert": "1.5.0", + "browser-pack": "6.1.0", + "browser-resolve": "2.0.0", + "browserify-zlib": "0.2.0", + "buffer": "5.2.1", + "cached-path-relative": "1.0.2", + "concat-stream": "1.6.2", + "console-browserify": "1.2.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "defined": "1.0.0", + "deps-sort": "2.0.1", + "domain-browser": "1.2.0", + "duplexer2": "0.1.4", + "events": "3.2.0", + "glob": "7.1.6", + "has": "1.0.3", + "htmlescape": "1.1.1", + "https-browserify": "1.0.0", + "inherits": "2.0.4", + "insert-module-globals": "7.2.1", + "labeled-stream-splicer": "2.0.2", + "mkdirp-classic": "0.5.3", + "module-deps": "6.2.3", + "os-browserify": "0.3.0", + "parents": "1.0.1", + "path-browserify": "1.0.1", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "read-only-stream": "2.0.0", + "readable-stream": "2.3.7", + "resolve": "1.19.0", + "shasum-object": "1.0.0", + "shell-quote": "1.7.2", + "stream-browserify": "3.0.0", + "stream-http": "3.1.1", + "string_decoder": "1.3.0", + "subarg": "1.0.0", + "syntax-error": "1.4.0", + "through2": "2.0.5", + "timers-browserify": "1.4.2", "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.12.0", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" + "url": "0.11.0", + "util": "0.12.3", + "vm-browserify": "1.1.2", + "xtend": "4.0.2" } }, "browserify-aes": { @@ -243,12 +243,12 @@ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.4", + "safe-buffer": "5.2.1" } }, "browserify-cipher": { @@ -257,9 +257,9 @@ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "browserify-aes": "1.2.0", + "browserify-des": "1.0.2", + "evp_bytestokey": "1.0.3" } }, "browserify-des": { @@ -268,10 +268,10 @@ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "cipher-base": "1.0.4", + "des.js": "1.0.1", + "inherits": "2.0.4", + "safe-buffer": "5.2.1" } }, "browserify-rsa": { @@ -280,8 +280,8 @@ "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", "dev": true, "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" + "bn.js": "5.1.3", + "randombytes": "2.1.0" } }, "browserify-sign": { @@ -290,15 +290,15 @@ "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "dev": true, "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "bn.js": "5.1.3", + "browserify-rsa": "4.1.0", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.5.3", + "inherits": "2.0.4", + "parse-asn1": "5.1.6", + "readable-stream": "3.6.0", + "safe-buffer": "5.2.1" }, "dependencies": { "readable-stream": { @@ -307,9 +307,9 @@ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "inherits": "2.0.4", + "string_decoder": "1.3.0", + "util-deprecate": "1.0.2" } } } @@ -320,7 +320,7 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "~1.0.5" + "pako": "1.0.11" } }, "buffer": { @@ -329,8 +329,8 @@ "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "1.5.1", + "ieee754": "1.2.1" } }, "buffer-from": { @@ -363,8 +363,8 @@ "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" + "function-bind": "1.1.1", + "get-intrinsic": "1.0.2" } }, "chokidar": { @@ -373,14 +373,14 @@ "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "anymatch": "3.1.1", + "braces": "3.0.2", + "fsevents": "2.1.3", + "glob-parent": "5.1.1", + "is-binary-path": "2.1.0", + "is-glob": "4.0.1", + "normalize-path": "3.0.0", + "readdirp": "3.5.0" } }, "cipher-base": { @@ -389,8 +389,8 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.4", + "safe-buffer": "5.2.1" } }, "combine-source-map": { @@ -399,10 +399,10 @@ "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", "dev": true, "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" + "convert-source-map": "1.1.3", + "inline-source-map": "0.6.2", + "lodash.memoize": "3.0.4", + "source-map": "0.5.7" } }, "concat-map": { @@ -417,10 +417,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.1.1", + "inherits": "2.0.4", + "readable-stream": "2.3.7", + "typedarray": "0.0.6" } }, "console-browserify": { @@ -453,8 +453,8 @@ "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" + "bn.js": "4.11.9", + "elliptic": "6.5.3" }, "dependencies": { "bn.js": { @@ -471,11 +471,11 @@ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "cipher-base": "1.0.4", + "inherits": "2.0.4", + "md5.js": "1.3.5", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" } }, "create-hmac": { @@ -484,12 +484,12 @@ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.4", + "ripemd160": "2.0.2", + "safe-buffer": "5.2.1", + "sha.js": "2.4.11" } }, "crypto-browserify": { @@ -498,17 +498,17 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "browserify-cipher": "1.0.1", + "browserify-sign": "4.2.1", + "create-ecdh": "4.0.4", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.4", + "pbkdf2": "3.1.1", + "public-encrypt": "4.0.3", + "randombytes": "2.1.0", + "randomfill": "1.0.4" } }, "dash-ast": { @@ -523,7 +523,7 @@ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "object-keys": "1.1.1" } }, "defined": { @@ -538,10 +538,10 @@ "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", "dev": true, "requires": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" + "JSONStream": "1.3.5", + "shasum-object": "1.0.0", + "subarg": "1.0.0", + "through2": "2.0.5" } }, "des.js": { @@ -550,8 +550,8 @@ "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "inherits": "2.0.4", + "minimalistic-assert": "1.0.1" } }, "detective": { @@ -560,9 +560,9 @@ "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", "dev": true, "requires": { - "acorn-node": "^1.6.1", - "defined": "^1.0.0", - "minimist": "^1.1.1" + "acorn-node": "1.8.2", + "defined": "1.0.0", + "minimist": "1.2.5" } }, "diffie-hellman": { @@ -571,9 +571,9 @@ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "bn.js": "4.11.9", + "miller-rabin": "4.0.1", + "randombytes": "2.1.0" }, "dependencies": { "bn.js": { @@ -596,7 +596,7 @@ "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "dev": true, "requires": { - "readable-stream": "^2.0.2" + "readable-stream": "2.3.7" } }, "elliptic": { @@ -605,13 +605,13 @@ "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "bn.js": "4.11.9", + "brorand": "1.1.0", + "hash.js": "1.1.7", + "hmac-drbg": "1.0.1", + "inherits": "2.0.4", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" }, "dependencies": { "bn.js": { @@ -628,18 +628,18 @@ "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "es-to-primitive": "1.2.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "has-symbols": "1.0.1", + "is-callable": "1.2.2", + "is-negative-zero": "2.0.1", + "is-regex": "1.1.1", + "object-inspect": "1.9.0", + "object-keys": "1.1.1", + "object.assign": "4.1.2", + "string.prototype.trimend": "1.0.3", + "string.prototype.trimstart": "1.0.3" } }, "es-to-primitive": { @@ -648,9 +648,9 @@ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "1.2.2", + "is-date-object": "1.0.2", + "is-symbol": "1.0.3" } }, "events": { @@ -665,8 +665,8 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "md5.js": "1.3.5", + "safe-buffer": "5.2.1" } }, "fast-safe-stringify": { @@ -681,7 +681,7 @@ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "to-regex-range": "^5.0.1" + "to-regex-range": "5.0.1" } }, "foreach": { @@ -721,9 +721,9 @@ "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "function-bind": "1.1.1", + "has": "1.0.3", + "has-symbols": "1.0.1" } }, "glob": { @@ -732,12 +732,12 @@ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.4", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-parent": { @@ -746,7 +746,7 @@ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "4.0.1" } }, "has": { @@ -755,7 +755,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "function-bind": "1.1.1" } }, "has-symbols": { @@ -770,9 +770,9 @@ "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "inherits": "2.0.4", + "readable-stream": "3.6.0", + "safe-buffer": "5.2.1" }, "dependencies": { "readable-stream": { @@ -781,9 +781,9 @@ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "inherits": "2.0.4", + "string_decoder": "1.3.0", + "util-deprecate": "1.0.2" } } } @@ -794,8 +794,8 @@ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "inherits": "2.0.4", + "minimalistic-assert": "1.0.1" } }, "hmac-drbg": { @@ -804,9 +804,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "hash.js": "1.1.7", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "htmlescape": { @@ -833,8 +833,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -849,7 +849,7 @@ "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", "dev": true, "requires": { - "source-map": "~0.5.3" + "source-map": "0.5.7" } }, "insert-module-globals": { @@ -858,16 +858,16 @@ "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", "dev": true, "requires": { - "JSONStream": "^1.0.3", - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" + "JSONStream": "1.3.5", + "acorn-node": "1.8.2", + "combine-source-map": "0.8.0", + "concat-stream": "1.6.2", + "is-buffer": "1.1.6", + "path-is-absolute": "1.0.1", + "process": "0.11.10", + "through2": "2.0.5", + "undeclared-identifiers": "1.1.3", + "xtend": "4.0.2" } }, "is-arguments": { @@ -876,7 +876,7 @@ "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", "dev": true, "requires": { - "call-bind": "^1.0.0" + "call-bind": "1.0.0" } }, "is-binary-path": { @@ -885,7 +885,7 @@ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { - "binary-extensions": "^2.0.0" + "binary-extensions": "2.1.0" } }, "is-buffer": { @@ -906,7 +906,7 @@ "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", "dev": true, "requires": { - "has": "^1.0.3" + "has": "1.0.3" } }, "is-date-object": { @@ -933,7 +933,7 @@ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-negative-zero": { @@ -954,7 +954,7 @@ "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "1.0.1" } }, "is-symbol": { @@ -963,7 +963,7 @@ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "1.0.1" } }, "is-typed-array": { @@ -972,11 +972,11 @@ "integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1" + "available-typed-arrays": "1.0.2", + "call-bind": "1.0.0", + "es-abstract": "1.18.0-next.1", + "foreach": "2.0.5", + "has-symbols": "1.0.1" } }, "isarray": { @@ -997,8 +997,8 @@ "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", "dev": true, "requires": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" + "inherits": "2.0.4", + "stream-splicer": "2.0.1" } }, "lodash.memoize": { @@ -1013,9 +1013,9 @@ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "hash-base": "3.1.0", + "inherits": "2.0.4", + "safe-buffer": "5.2.1" } }, "miller-rabin": { @@ -1024,8 +1024,8 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "bn.js": "4.11.9", + "brorand": "1.1.0" }, "dependencies": { "bn.js": { @@ -1054,7 +1054,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -1075,21 +1075,21 @@ "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", "dev": true, "requires": { - "JSONStream": "^1.0.3", - "browser-resolve": "^2.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" + "JSONStream": "1.3.5", + "browser-resolve": "2.0.0", + "cached-path-relative": "1.0.2", + "concat-stream": "1.6.2", + "defined": "1.0.0", + "detective": "5.2.0", + "duplexer2": "0.1.4", + "inherits": "2.0.4", + "parents": "1.0.1", + "readable-stream": "2.3.7", + "resolve": "1.19.0", + "stream-combiner2": "1.1.1", + "subarg": "1.0.0", + "through2": "2.0.5", + "xtend": "4.0.2" } }, "normalize-path": { @@ -1122,10 +1122,10 @@ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" + "call-bind": "1.0.0", + "define-properties": "1.1.3", + "has-symbols": "1.0.1", + "object-keys": "1.1.1" } }, "once": { @@ -1134,7 +1134,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-browserify": { @@ -1155,7 +1155,7 @@ "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", "dev": true, "requires": { - "path-platform": "~0.11.15" + "path-platform": "0.11.15" } }, "parse-asn1": { @@ -1164,11 +1164,11 @@ "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", "dev": true, "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "asn1.js": "5.4.1", + "browserify-aes": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.1.1", + "safe-buffer": "5.2.1" } }, "path-browserify": { @@ -1201,11 +1201,11 @@ "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "dev": true, "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.2.1", + "sha.js": "2.4.11" } }, "picomatch": { @@ -1232,12 +1232,12 @@ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" + "bn.js": "4.11.9", + "browserify-rsa": "4.1.0", + "create-hash": "1.2.0", + "parse-asn1": "5.1.6", + "randombytes": "2.1.0", + "safe-buffer": "5.2.1" }, "dependencies": { "bn.js": { @@ -1272,7 +1272,7 @@ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { - "safe-buffer": "^5.1.0" + "safe-buffer": "5.2.1" } }, "randomfill": { @@ -1281,8 +1281,8 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "randombytes": "2.1.0", + "safe-buffer": "5.2.1" } }, "read-only-stream": { @@ -1291,7 +1291,7 @@ "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", "dev": true, "requires": { - "readable-stream": "^2.0.2" + "readable-stream": "2.3.7" } }, "readable-stream": { @@ -1300,13 +1300,13 @@ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.4", + "isarray": "1.0.0", + "process-nextick-args": "2.0.1", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" }, "dependencies": { "safe-buffer": { @@ -1321,7 +1321,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } } } @@ -1332,7 +1332,7 @@ "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { - "picomatch": "^2.2.1" + "picomatch": "2.2.2" } }, "resolve": { @@ -1341,8 +1341,8 @@ "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" + "is-core-module": "2.2.0", + "path-parse": "1.0.6" } }, "ripemd160": { @@ -1351,8 +1351,8 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.1.0", + "inherits": "2.0.4" } }, "safe-buffer": { @@ -1373,7 +1373,7 @@ "integrity": "sha512-fhyqEbMIycQA4blrz/C0pYhv2o4x2y6FYYAH0CshBw3DXh5D5wyERgxw0ptdau1orc/GhNrhF7DFN2etyOCEng==", "dev": true, "requires": { - "chokidar": ">=2.0.0 <4.0.0" + "chokidar": "3.4.3" } }, "sha.js": { @@ -1382,8 +1382,8 @@ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.4", + "safe-buffer": "5.2.1" } }, "shasum-object": { @@ -1392,7 +1392,7 @@ "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", "dev": true, "requires": { - "fast-safe-stringify": "^2.0.7" + "fast-safe-stringify": "2.0.7" } }, "shell-quote": { @@ -1419,8 +1419,8 @@ "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", "dev": true, "requires": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" + "inherits": "2.0.4", + "readable-stream": "3.6.0" }, "dependencies": { "readable-stream": { @@ -1429,9 +1429,9 @@ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "inherits": "2.0.4", + "string_decoder": "1.3.0", + "util-deprecate": "1.0.2" } } } @@ -1442,8 +1442,8 @@ "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "requires": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" + "duplexer2": "0.1.4", + "readable-stream": "2.3.7" } }, "stream-http": { @@ -1452,10 +1452,10 @@ "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", "dev": true, "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" + "builtin-status-codes": "3.0.0", + "inherits": "2.0.4", + "readable-stream": "3.6.0", + "xtend": "4.0.2" }, "dependencies": { "readable-stream": { @@ -1464,9 +1464,9 @@ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "inherits": "2.0.4", + "string_decoder": "1.3.0", + "util-deprecate": "1.0.2" } } } @@ -1477,8 +1477,8 @@ "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" + "inherits": "2.0.4", + "readable-stream": "2.3.7" } }, "string.prototype.trimend": { @@ -1487,8 +1487,8 @@ "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" + "call-bind": "1.0.0", + "define-properties": "1.1.3" } }, "string.prototype.trimstart": { @@ -1497,8 +1497,8 @@ "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" + "call-bind": "1.0.0", + "define-properties": "1.1.3" } }, "string_decoder": { @@ -1507,7 +1507,7 @@ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { - "safe-buffer": "~5.2.0" + "safe-buffer": "5.2.1" } }, "subarg": { @@ -1516,7 +1516,7 @@ "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "dev": true, "requires": { - "minimist": "^1.1.0" + "minimist": "1.2.5" } }, "syntax-error": { @@ -1525,7 +1525,7 @@ "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", "dev": true, "requires": { - "acorn-node": "^1.2.0" + "acorn-node": "1.8.2" } }, "through": { @@ -1540,8 +1540,8 @@ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "readable-stream": "2.3.7", + "xtend": "4.0.2" } }, "timers-browserify": { @@ -1550,7 +1550,7 @@ "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", "dev": true, "requires": { - "process": "~0.11.0" + "process": "0.11.10" } }, "to-regex-range": { @@ -1559,7 +1559,7 @@ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "is-number": "^7.0.0" + "is-number": "7.0.0" } }, "tty-browserify": { @@ -1586,11 +1586,11 @@ "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", "dev": true, "requires": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" + "acorn-node": "1.8.2", + "dash-ast": "1.0.0", + "get-assigned-identifiers": "1.2.0", + "simple-concat": "1.0.1", + "xtend": "4.0.2" } }, "url": { @@ -1617,12 +1617,12 @@ "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", "dev": true, "requires": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" + "inherits": "2.0.4", + "is-arguments": "1.1.0", + "is-generator-function": "1.0.8", + "is-typed-array": "1.1.4", + "safe-buffer": "5.2.1", + "which-typed-array": "1.1.4" } }, "util-deprecate": { @@ -1643,13 +1643,13 @@ "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.1", - "is-typed-array": "^1.1.3" + "available-typed-arrays": "1.0.2", + "call-bind": "1.0.0", + "es-abstract": "1.18.0-next.1", + "foreach": "2.0.5", + "function-bind": "1.1.1", + "has-symbols": "1.0.1", + "is-typed-array": "1.1.4" } }, "wrappy": { diff --git a/public/education/education.js b/public/education/education.js new file mode 100644 index 0000000000000000000000000000000000000000..7781b9d99064c9cbe252f5788821acd6efbf6fb4 --- /dev/null +++ b/public/education/education.js @@ -0,0 +1,382 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ +"use strict"; + +module.exports = { + setRenderCycleRoot(renderCycleRoot) { + this.renderCycleRoot = renderCycleRoot; + }, + objectToHtml: function objectToHtml(obj) { + const { tag } = obj; + + const node = document.createElement(tag); + const excludeKeys = ["tag", "contents", "style_rules", "state"]; + + Object.keys(obj) + .filter(attr => !excludeKeys.includes(attr)) + .forEach(attr => { + if (attr === "class") { + node.classList.add(...obj[attr].split(" ").filter(s => s !== "")); + } else { + node[attr] = obj[attr]; + } + }); + if (obj.contents && typeof obj.contents === "string") { + node.innerHTML = obj.contents; + } else { + obj.contents && + obj.contents.length > 0 && + obj.contents.forEach(el => { + switch (typeof el) { + case "string": + node.innerHTML = el; + break; + case "object": + node.appendChild(objectToHtml(el)); + break; + } + }); + } + + if (obj.style_rules) { + Object.keys(obj.style_rules).forEach(rule => { + node.style[rule] = obj.style_rules[rule]; + }); + } + + return node; + }, + renderCycle: function () { + this.subRender(this.renderCycleRoot.render(), document.getElementsByTagName("main")[0], { + mode: "replace", + }); + }, + subRender(object, htmlNode, options = { mode: "append" }) { + const insert = this.objectToHtml(object); + switch (options.mode) { + case "append": + htmlNode.appendChild(insert); + break; + case "override": + htmlNode.innerHTML = ""; + htmlNode.appendChild(insert); + break; + case "insert-before": + htmlNode.insertBefore(insert, htmlNode.childNodes[options.insertIndex]); + break; + case "adjacent": + /** + * options.insertLocation must be one of: + * + * afterbegin + * afterend + * beforebegin + * beforeend + */ + htmlNode.insertAdjacentHTML(options.insertLocation, insert); + break; + case "replace": + htmlNode.parentNode.replaceChild(insert, htmlNode); + break; + case "remove": + htmlNode.remove(); + break; + } + }, +}; + +},{}],2:[function(require,module,exports){ +"use strict"; + +class EducationPage { + constructor(args) { + Object.assign(this, args); + } + + render() { + return { + tag: "div", + contents: [ + { + tag: "h1", + contents: "Pédagogie", + }, + { + tag: "h2", + contents: "Game studio club", + }, + { + tag: "h3", + contents: "Apprendre à créer un jeu vidéo de A à Z", + }, + { + tag: "p", + contents: + "La création d'un jeu vidéo c'est l'occasion d'aborder plein de choses différentes !", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Dessin et création 2D", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: "Créer des décors et des personnages", + }, + { + tag: "li", + contents: "Dessiner sur ordinateur", + }, + { + tag: "li", + contents: "Créer des animations 2D", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Musique et effets sonores", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Utiliser des logiciels de son et des synthétiseurs", + }, + { + tag: "li", + contents: "Composer une musique", + }, + { + tag: "li", + contents: "Faire une prise de son", + }, + { + tag: "li", + contents: "Mixer un enregistrement", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Développer un univers", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Écrire une histoire, construire une narration", + }, + { + tag: "li", + contents: "Imaginer des mondes et des personnages", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Concevoir le jeu", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: "Comprendre ce qui fait le jeu", + }, + { + tag: "li", + contents: "Développer les mécanismes du gameplay", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Programmation informatique", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Apprendre pas à pas à coder avec différents langages de programmation", + }, + { + tag: "li", + contents: + "Découvrir les bases du web en créant des mini-jeux en lignes", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Mathématiques et pysique", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Le jeu vidéo et l'informatique en général, c'est l'occasion de découvrir plein de sujets en maths et en physique tout en s'amusant !", + }, + { + tag: "li", + contents: + "Algorithmie, logique, calcul décimal, ensembles, géométrie, trigonométrie, algèbre linéaire ,vecteurs, repères en 2 dimensions ...", + }, + ], + }, + ], + }, + ], + }, + ], + }; + } +} + +module.exports = EducationPage; + +},{}],3:[function(require,module,exports){ +"use strict"; + +"use strict"; +const runPage = require("../../run-page"); +const EducationPage = require("./education"); +runPage(EducationPage); + +},{"../../run-page":4,"./education":2}],4:[function(require,module,exports){ +"use strict"; + +const objectHtmlRenderer = require("./lib/object-html-renderer"); +const Template = require("./template/template"); + +module.exports = function runPage(PageComponent) { + const template = new Template({ page: new PageComponent() }); + objectHtmlRenderer.setRenderCycleRoot(template); + objectHtmlRenderer.renderCycle(); +}; + +},{"./lib/object-html-renderer":1,"./template/template":5}],5:[function(require,module,exports){ +"use strict"; + +class Template { + constructor(props) { + this.props = props; + } + + render() { + return { + tag: "main", + contents: [ + { + tag: "header", + contents: [ + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/", + contents: "Home", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/games/", + contents: "Jeux", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/software-development/", + contents: "Software development", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/education/", + contents: "Pédagogie", + }, + ], + }, + ], + }, + ], + }, + { + tag: "div", + id: "page-container", + contents: [this.props.page.render()], + }, + { + tag: "footer", + contents: [ + { + tag: "a", + href: "mailto:kuadrado-software@tutanota.com", + contents: "kuadrado-software@tutanota.com", + }, + ], + }, + ], + }; + } +} + +module.exports = Template; + +},{}]},{},[3]); diff --git a/public/example2/index.html b/public/education/index.html similarity index 62% rename from public/example2/index.html rename to public/education/index.html index 99bde30402c8b093e16713f87325c7ea85e02f24..4ce83d17341eafaf08a4dbef2ee28004c169bd60 100644 --- a/public/example2/index.html +++ b/public/education/index.html @@ -3,12 +3,12 @@ <html> <head> <meta charset="utf-8" /> - <title>Kuadrado Software - example2</title> + <title>Kuadrado Software - education</title> <link href="../../style/style.css" rel="stylesheet" /> </head> <body> <main></main> </body> - <script type="text/javascript" src="./example2.js"></script> + <script type="text/javascript" src="./education.js"></script> </html> \ No newline at end of file diff --git a/public/example/example.js b/public/games/games.js similarity index 53% rename from public/example/example.js rename to public/games/games.js index 5c6fcefeab7db0e3ec124267b696e3844c907434..7501c48b3f5fecf3dde05eb395d220f9300f0a60 100644 --- a/public/example/example.js +++ b/public/games/games.js @@ -87,54 +87,128 @@ module.exports = { },{}],2:[function(require,module,exports){ "use strict"; -class Example { +class GamesPage { constructor(args) { Object.assign(this, args); } render() { return { - tag: "main", + tag: "div", contents: [ { tag: "h1", - contents: "Example", - }, - { - tag: "a", - href: "/public/", - contents: "Home", - }, - {tag:"br"}, - { - tag: "a", - href: "../example2/", - contents: "Example page 2", + contents: "Games", }, ], }; } } -module.exports = Example; +module.exports = GamesPage; },{}],3:[function(require,module,exports){ "use strict"; "use strict"; const runPage = require("../../run-page"); -const Example = require("./example"); -runPage(Example); +const GamesPage = require("./games"); +runPage(GamesPage); -},{"../../run-page":4,"./example":2}],4:[function(require,module,exports){ +},{"../../run-page":4,"./games":2}],4:[function(require,module,exports){ "use strict"; const objectHtmlRenderer = require("./lib/object-html-renderer"); +const Template = require("./template/template"); module.exports = function runPage(PageComponent) { - const page = new PageComponent(); - objectHtmlRenderer.setRenderCycleRoot(page); + const template = new Template({ page: new PageComponent() }); + objectHtmlRenderer.setRenderCycleRoot(template); objectHtmlRenderer.renderCycle(); }; -},{"./lib/object-html-renderer":1}]},{},[3]); +},{"./lib/object-html-renderer":1,"./template/template":5}],5:[function(require,module,exports){ +"use strict"; + +class Template { + constructor(props) { + this.props = props; + } + + render() { + return { + tag: "main", + contents: [ + { + tag: "header", + contents: [ + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/", + contents: "Home", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/games/", + contents: "Jeux", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/software-development/", + contents: "Software development", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/education/", + contents: "Pédagogie", + }, + ], + }, + ], + }, + ], + }, + { + tag: "div", + id: "page-container", + contents: [this.props.page.render()], + }, + { + tag: "footer", + contents: [ + { + tag: "a", + href: "mailto:kuadrado-software@tutanota.com", + contents: "kuadrado-software@tutanota.com", + }, + ], + }, + ], + }; + } +} + +module.exports = Template; + +},{}]},{},[3]); diff --git a/public/example/index.html b/public/games/index.html similarity index 63% rename from public/example/index.html rename to public/games/index.html index a37773d2c2fd6065f440f75e39596380d6021072..21b93ee2aab48731d30e97ff5db137ec19e9ba13 100644 --- a/public/example/index.html +++ b/public/games/index.html @@ -3,12 +3,12 @@ <html> <head> <meta charset="utf-8" /> - <title>Kuadrado Software - example</title> + <title>Kuadrado Software - games</title> <link href="../../style/style.css" rel="stylesheet" /> </head> <body> <main></main> </body> - <script type="text/javascript" src="./example.js"></script> + <script type="text/javascript" src="./games.js"></script> </html> \ No newline at end of file diff --git a/public/main.js b/public/main.js index 215efcdcbc65360f90f32d1ae805d8d5eeedb78a..af03547a403c73c6fc634c90146e7fcec98ea32c 100644 --- a/public/main.js +++ b/public/main.js @@ -8,17 +8,12 @@ class HomePage { render() { return { - tag: "main", + tag: "div", contents: [ { tag: "h1", contents: "Kuadrado Software", }, - { - tag: "a", - href: "example/", - contents: "Example page", - }, ], }; } @@ -124,11 +119,96 @@ runPage(HomePage); "use strict"; const objectHtmlRenderer = require("./lib/object-html-renderer"); +const Template = require("./template/template"); module.exports = function runPage(PageComponent) { - const page = new PageComponent(); - objectHtmlRenderer.setRenderCycleRoot(page); + const template = new Template({ page: new PageComponent() }); + objectHtmlRenderer.setRenderCycleRoot(template); objectHtmlRenderer.renderCycle(); }; -},{"./lib/object-html-renderer":2}]},{},[3]); +},{"./lib/object-html-renderer":2,"./template/template":5}],5:[function(require,module,exports){ +"use strict"; + +class Template { + constructor(props) { + this.props = props; + } + + render() { + return { + tag: "main", + contents: [ + { + tag: "header", + contents: [ + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/", + contents: "Home", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/games/", + contents: "Jeux", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/software-development/", + contents: "Software development", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/education/", + contents: "Pédagogie", + }, + ], + }, + ], + }, + ], + }, + { + tag: "div", + id: "page-container", + contents: [this.props.page.render()], + }, + { + tag: "footer", + contents: [ + { + tag: "a", + href: "mailto:kuadrado-software@tutanota.com", + contents: "kuadrado-software@tutanota.com", + }, + ], + }, + ], + }; + } +} + +module.exports = Template; + +},{}]},{},[3]); diff --git a/public/software-development/index.html b/public/software-development/index.html new file mode 100644 index 0000000000000000000000000000000000000000..22249bb1c025bf5ee3c830a964a569f41e53716c --- /dev/null +++ b/public/software-development/index.html @@ -0,0 +1,14 @@ + +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <title>Kuadrado Software - software-development</title> + <link href="../../style/style.css" rel="stylesheet" /> + </head> + <body> + <main></main> + </body> + <script type="text/javascript" src="./software-development.js"></script> +</html> + \ No newline at end of file diff --git a/public/example2/example2.js b/public/software-development/software-development.js similarity index 52% rename from public/example2/example2.js rename to public/software-development/software-development.js index e82ff5bd33002296b4de0139014fbfbbb06ce52a..0fb1acb6f9e66c499846cdc72dd49965af80b2dc 100644 --- a/public/example2/example2.js +++ b/public/software-development/software-development.js @@ -87,54 +87,128 @@ module.exports = { },{}],2:[function(require,module,exports){ "use strict"; -class Example2 { +class SoftwareDevelopment { constructor(args) { Object.assign(this, args); } render() { return { - tag: "main", + tag: "div", contents: [ { tag: "h1", - contents: "Example 2", - }, - { - tag: "a", - href: "/public/", - contents: "Home", - }, - { tag: "br" }, - { - tag: "a", - href: "../example/", - contents: "Example page", + contents: "Software", }, ], }; } } -module.exports = Example2; +module.exports = SoftwareDevelopment; },{}],3:[function(require,module,exports){ "use strict"; +"use strict"; const runPage = require("../../run-page"); -const Example2 = require("./example2"); - -runPage(Example2); +const SoftwareDevelopment = require("./software-development"); +runPage(SoftwareDevelopment); -},{"../../run-page":4,"./example2":2}],4:[function(require,module,exports){ +},{"../../run-page":4,"./software-development":2}],4:[function(require,module,exports){ "use strict"; const objectHtmlRenderer = require("./lib/object-html-renderer"); +const Template = require("./template/template"); module.exports = function runPage(PageComponent) { - const page = new PageComponent(); - objectHtmlRenderer.setRenderCycleRoot(page); + const template = new Template({ page: new PageComponent() }); + objectHtmlRenderer.setRenderCycleRoot(template); objectHtmlRenderer.renderCycle(); }; -},{"./lib/object-html-renderer":1}]},{},[3]); +},{"./lib/object-html-renderer":1,"./template/template":5}],5:[function(require,module,exports){ +"use strict"; + +class Template { + constructor(props) { + this.props = props; + } + + render() { + return { + tag: "main", + contents: [ + { + tag: "header", + contents: [ + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/", + contents: "Home", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/games/", + contents: "Jeux", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/software-development/", + contents: "Software development", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/education/", + contents: "Pédagogie", + }, + ], + }, + ], + }, + ], + }, + { + tag: "div", + id: "page-container", + contents: [this.props.page.render()], + }, + { + tag: "footer", + contents: [ + { + tag: "a", + href: "mailto:kuadrado-software@tutanota.com", + contents: "kuadrado-software@tutanota.com", + }, + ], + }, + ], + }; + } +} + +module.exports = Template; + +},{}]},{},[3]); diff --git a/src/homepage.js b/src/homepage.js index 1d81f0778903f4c18ad4abee89ceb45661c8ceee..77948a24efa7d2619862652a1fcb57f0d5ad043f 100644 --- a/src/homepage.js +++ b/src/homepage.js @@ -7,17 +7,12 @@ class HomePage { render() { return { - tag: "main", + tag: "div", contents: [ { tag: "h1", contents: "Kuadrado Software", }, - { - tag: "a", - href: "example/", - contents: "Example page", - }, ], }; } diff --git a/src/pages/education/education.js b/src/pages/education/education.js new file mode 100644 index 0000000000000000000000000000000000000000..605720464d77f7d160713aa1fce044f8674e2fb9 --- /dev/null +++ b/src/pages/education/education.js @@ -0,0 +1,189 @@ +"use strict"; + +class EducationPage { + constructor(args) { + Object.assign(this, args); + } + + render() { + return { + tag: "div", + contents: [ + { + tag: "h1", + contents: "Pédagogie", + }, + { + tag: "h2", + contents: "Game studio club", + }, + { + tag: "h3", + contents: "Apprendre à créer un jeu vidéo de A à Z", + }, + { + tag: "p", + contents: + "La création d'un jeu vidéo c'est l'occasion d'aborder plein de choses différentes !", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Dessin et création 2D", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: "Créer des décors et des personnages", + }, + { + tag: "li", + contents: "Dessiner sur ordinateur", + }, + { + tag: "li", + contents: "Créer des animations 2D", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Musique et effets sonores", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Utiliser des logiciels de son et des synthétiseurs", + }, + { + tag: "li", + contents: "Composer une musique", + }, + { + tag: "li", + contents: "Faire une prise de son", + }, + { + tag: "li", + contents: "Mixer un enregistrement", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Développer un univers", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Écrire une histoire, construire une narration", + }, + { + tag: "li", + contents: "Imaginer des mondes et des personnages", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Concevoir le jeu", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: "Comprendre ce qui fait le jeu", + }, + { + tag: "li", + contents: "Développer les mécanismes du gameplay", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Programmation informatique", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Apprendre pas à pas à coder avec différents langages de programmation", + }, + { + tag: "li", + contents: + "Découvrir les bases du web en créant des mini-jeux en lignes", + }, + ], + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "strong", + contents: "Mathématiques et pysique", + }, + { + tag: "ul", + contents: [ + { + tag: "li", + contents: + "Le jeu vidéo et l'informatique en général, c'est l'occasion de découvrir plein de sujets en maths et en physique tout en s'amusant !", + }, + { + tag: "li", + contents: + "Algorithmie, logique, calcul décimal, ensembles, géométrie, trigonométrie, algèbre linéaire ,vecteurs, repères en 2 dimensions ...", + }, + ], + }, + ], + }, + ], + }, + ], + }; + } +} + +module.exports = EducationPage; diff --git a/src/pages/education/index.js b/src/pages/education/index.js new file mode 100644 index 0000000000000000000000000000000000000000..91113ae314ef63784d40156f85110a7048a4387f --- /dev/null +++ b/src/pages/education/index.js @@ -0,0 +1,6 @@ +"use strict"; + +"use strict"; +const runPage = require("../../run-page"); +const EducationPage = require("./education"); +runPage(EducationPage); diff --git a/src/pages/example/example.js b/src/pages/example/example.js deleted file mode 100644 index 6417c377ba1df616ba659c7c2156dd050b87d73a..0000000000000000000000000000000000000000 --- a/src/pages/example/example.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -class Example { - constructor(args) { - Object.assign(this, args); - } - - render() { - return { - tag: "main", - contents: [ - { - tag: "h1", - contents: "Example", - }, - { - tag: "a", - href: "/public/", - contents: "Home", - }, - {tag:"br"}, - { - tag: "a", - href: "../example2/", - contents: "Example page 2", - }, - ], - }; - } -} - -module.exports = Example; diff --git a/src/pages/example2/example2.js b/src/pages/example2/example2.js deleted file mode 100644 index e16ddd721a50b0ffa2af5f7533ed3cf58178531f..0000000000000000000000000000000000000000 --- a/src/pages/example2/example2.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -class Example2 { - constructor(args) { - Object.assign(this, args); - } - - render() { - return { - tag: "main", - contents: [ - { - tag: "h1", - contents: "Example 2", - }, - { - tag: "a", - href: "/public/", - contents: "Home", - }, - { tag: "br" }, - { - tag: "a", - href: "../example/", - contents: "Example page", - }, - ], - }; - } -} - -module.exports = Example2; diff --git a/src/pages/example2/index.js b/src/pages/example2/index.js deleted file mode 100644 index 6cdec61e645d8acdc52b82e1206766ebd312b8c9..0000000000000000000000000000000000000000 --- a/src/pages/example2/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -const runPage = require("../../run-page"); -const Example2 = require("./example2"); - -runPage(Example2); diff --git a/src/pages/games/games.js b/src/pages/games/games.js new file mode 100644 index 0000000000000000000000000000000000000000..3583a6f950bd055dce16a872bb84c8f56e7b4d24 --- /dev/null +++ b/src/pages/games/games.js @@ -0,0 +1,21 @@ +"use strict"; + +class GamesPage { + constructor(args) { + Object.assign(this, args); + } + + render() { + return { + tag: "div", + contents: [ + { + tag: "h1", + contents: "Games", + }, + ], + }; + } +} + +module.exports = GamesPage; diff --git a/src/pages/example/index.js b/src/pages/games/index.js similarity index 55% rename from src/pages/example/index.js rename to src/pages/games/index.js index 51f90450aa1888cbba6f818129051128843d0b5c..0c92ded33db9b7c8ce9fa054d091d0c3ac54a384 100644 --- a/src/pages/example/index.js +++ b/src/pages/games/index.js @@ -2,5 +2,5 @@ "use strict"; const runPage = require("../../run-page"); -const Example = require("./example"); -runPage(Example); +const GamesPage = require("./games"); +runPage(GamesPage); diff --git a/src/pages/software-development/index.js b/src/pages/software-development/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2907e1badcf83b7608f178139edb405a732db46d --- /dev/null +++ b/src/pages/software-development/index.js @@ -0,0 +1,6 @@ +"use strict"; + +"use strict"; +const runPage = require("../../run-page"); +const SoftwareDevelopment = require("./software-development"); +runPage(SoftwareDevelopment); diff --git a/src/pages/software-development/software-development.js b/src/pages/software-development/software-development.js new file mode 100644 index 0000000000000000000000000000000000000000..e85932cf9e1ae00ba29c4dc8321f462cc4093aea --- /dev/null +++ b/src/pages/software-development/software-development.js @@ -0,0 +1,21 @@ +"use strict"; + +class SoftwareDevelopment { + constructor(args) { + Object.assign(this, args); + } + + render() { + return { + tag: "div", + contents: [ + { + tag: "h1", + contents: "Software", + }, + ], + }; + } +} + +module.exports = SoftwareDevelopment; diff --git a/src/run-page.js b/src/run-page.js index 0f31728f07011bf4585ed60db174e8c713476344..5a305d5cd6d1306ec175bc55df3a74e4777e098f 100644 --- a/src/run-page.js +++ b/src/run-page.js @@ -1,9 +1,10 @@ "use strict"; const objectHtmlRenderer = require("./lib/object-html-renderer"); +const Template = require("./template/template"); module.exports = function runPage(PageComponent) { - const page = new PageComponent(); - objectHtmlRenderer.setRenderCycleRoot(page); + const template = new Template({ page: new PageComponent() }); + objectHtmlRenderer.setRenderCycleRoot(template); objectHtmlRenderer.renderCycle(); }; diff --git a/src/style.scss b/src/style.scss index 48c3bd429f3fa3874420d31e14656d6e57816dd0..5ac33dfbea9192f134fdd3f4c4c4ed9193331fdf 100644 --- a/src/style.scss +++ b/src/style.scss @@ -7,5 +7,5 @@ body { } main { - background-color: #eee; + // } diff --git a/src/template/template.js b/src/template/template.js new file mode 100644 index 0000000000000000000000000000000000000000..a637c043795f0fe09f05c5a5096466788d664fa8 --- /dev/null +++ b/src/template/template.js @@ -0,0 +1,82 @@ +"use strict"; + +class Template { + constructor(props) { + this.props = props; + } + + render() { + return { + tag: "main", + contents: [ + { + tag: "header", + contents: [ + { + tag: "ul", + contents: [ + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/", + contents: "Home", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/games/", + contents: "Jeux", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/software-development/", + contents: "Software development", + }, + ], + }, + { + tag: "li", + contents: [ + { + tag: "a", + href: "/public/education/", + contents: "Pédagogie", + }, + ], + }, + ], + }, + ], + }, + { + tag: "div", + id: "page-container", + contents: [this.props.page.render()], + }, + { + tag: "footer", + contents: [ + { + tag: "a", + href: "mailto:kuadrado-software@tutanota.com", + contents: "kuadrado-software@tutanota.com", + }, + ], + }, + ], + }; + } +} + +module.exports = Template; diff --git a/style/style.css b/style/style.css index 07596c69b10e92fcd6474fdec8e0bd02a1aaabb7..0a8822d78ca508f103cb52fffa2d5909b30e1b8a 100644 --- a/style/style.css +++ b/style/style.css @@ -6,8 +6,4 @@ body * { box-sizing: border-box; } -main { - background-color: #eee; -} - /*# sourceMappingURL=style.css.map */ diff --git a/style/style.css.map b/style/style.css.map index 0528b41192a08d9aef9430ce51cdec5296174294..6f0f49cd363a9adb70d6cff73ec270138c0bce45 100644 --- a/style/style.css.map +++ b/style/style.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../src/style.scss"],"names":[],"mappings":"AAAA;EAII;EACA;;AAJA;EACI;;;AAMR;EACI","file":"style.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../src/style.scss"],"names":[],"mappings":"AAAA;EAII;EACA;;AAJA;EACI","file":"style.css"} \ No newline at end of file