From 18c7e414c646e02d32e10f320ac193b640bbe5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rosinni=20Rodr=C3=ADguez?= <43686922+rosinni@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:32:19 +0000 Subject: [PATCH 1/2] vite lesson --- package-lock.json | 591 ++++++++++++++++++++++++++++++++++ src/content/lesson/vite.es.md | 62 ++++ src/content/lesson/vite.md | 62 ++++ 3 files changed, 715 insertions(+) create mode 100644 package-lock.json create mode 100644 src/content/lesson/vite.es.md create mode 100644 src/content/lesson/vite.md diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..7a82cc354 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,591 @@ +{ + "name": "gatsby-starter-default", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "clix": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/clix/-/clix-2.2.2.tgz", + "integrity": "sha512-KMfcKwuxAnK4Pz3s6DBxKxOyv77cPVgsVgELtyy2RLX7uekqHaxxOqtiMiu9th0e0YSkTxwk/dFkdXlQLek1NQ==", + "dev": true, + "requires": { + "clix-logger": "1.0.2", + "extend": "3.0.0", + "glob-expand": "0.2.1", + "jq-trim": "0.1.2", + "optionator": "0.8.2", + "os-homedir": "1.0.2", + "path-is-absolute": "1.0.1", + "read-json-sync": "1.1.1" + } + }, + "clix-logger": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clix-logger/-/clix-logger-1.0.2.tgz", + "integrity": "sha512-6APxcAFFCPE/plUK7uZ/UjQdz7EECRlN8vhzw0ustWvdhClTmzA6Fuyi99ItMhJEuPuEHGuq9mONtuXbAIhLOQ==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "extend": "3.0.0", + "moment": "2.22.2" + } + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "del": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/del/-/del-1.2.1.tgz", + "integrity": "sha512-y43KQ302qc1NEygMXswb4bEOyP34h4b/ew9lnID6rqxFp0WhLolYmbeoREBFwyalUxvnUm8SskLmI9UOw+sChA==", + "dev": true, + "requires": { + "each-async": "^1.0.0", + "globby": "^2.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^3.0.0", + "rimraf": "^2.2.8" + } + }, + "each-async": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz", + "integrity": "sha512-0hJGub96skwr+sUojv7zQ0kc9i4jn3SwLiLk8Jr7KDz7aaaMzkN5UX3a/9ZhzC0OfZVyXHhlHcjC0KVOiKZ+HQ==", + "dev": true, + "requires": { + "onetime": "^1.0.0", + "set-immediate-shim": "^1.0.0" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "extend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "integrity": "sha512-5mYyg57hpD+sFaJmgNL9BidQ5C7dmJE3U5vzlRWbuqG+8dytvYEoxvKs6Tj5cm3LpMsFvRt20qz1ckezmsOUgQ==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "dev": true + }, + "front-matter": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-3.2.1.tgz", + "integrity": "sha512-YUhgEhbL6tG+Ok3vTGIoSDKqcr47aSDvyhEqIv8B+YuBJFsPnOiArNXTPp2yO07NL+a0L4+2jXlKlKqyVcsRRA==", + "dev": true, + "requires": { + "js-yaml": "^3.13.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "git-toplevel": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/git-toplevel/-/git-toplevel-1.1.1.tgz", + "integrity": "sha512-ytnF1ZpGVZZcvxbKIan88ixdW5XFcHh8eJn/54oJqXwDaB7n5rKXleaFMB0FooeVx5H2mXKZUpKL0XZ8DrknhQ==", + "dev": true, + "requires": { + "es6-promise": "^3.0.2", + "jq-trim": "^0.1.1" + } + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + } + }, + "glob-expand": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/glob-expand/-/glob-expand-0.2.1.tgz", + "integrity": "sha512-n4jbv3kllQeyu9D719PYGBTg/geJbQz3SX0iToDc88WPlYtefx4HAHilb1bPLlXudE9lrRF8JZ2isGuqzt35RA==", + "dev": true, + "requires": { + "glob": "~4.5.x", + "lodash": "~4.13.x" + } + }, + "globby": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-2.1.0.tgz", + "integrity": "sha512-CqRID2dMaN4Zi9PANiQHhmKaGu7ZASehBLnaDogjR9L3L1EqAGFhflafT0IrSN/zm9xFk+KMTXZCN8pUYOiO/Q==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "async": "^1.2.1", + "glob": "^5.0.3", + "object-assign": "^3.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "jq-trim": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/jq-trim/-/jq-trim-0.1.2.tgz", + "integrity": "sha512-fR2TKTr+Em+KzuZidXNAD+VhBJi2hmauE1zzqNWy/nwuoqdoqyQxkP2fOgcbXG9uNA8ahQtIPjNZIOPQrDNHxA==", + "dev": true + }, + "js-yaml": { + "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", + "esprima": "^4.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.13.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz", + "integrity": "sha512-j/GRONYpkXt1aB1bQHzkq0Th7zhv/syoDVrzCDA3FDMntIin0b7TjXi62q9juDC+QfhRs9COr0LFW38vQSH9Tg==", + "dev": true + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha512-jQo6o1qSVLEWaw3l+bwYA2X0uLuK2KjNh2wjgO7Q/9UJnXr1Q3yQKR8BI0/Bt/rPg75e6SMW4hW/6cBHVTZUjA==", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "requires": { + "minimist": "^1.2.6" + } + }, + "moment": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha512-LRvkBHaJGnrcWvqsElsOhHCzj8mU39wLx5pQ0pc6s153GynCTsPdGdqsVNKAQD9sKnWj11iF7TZx9fpLwdD3fw==", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha512-jHP15vXVGeVh1HuaA2wY6lxk+whK/x4KBG88VXeRma7CCun7iGD5qPc4eYykQ9sdQvg8jkwFKsSxHln2ybW3xQ==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha512-GZ+g4jayMqzCRMgB2sol7GiCLjKfS1PINkjmx8spcKce1LiVqcbQreXwqs2YAFXC6R03VIG28ZS31t8M866v6A==", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha512-oCOQ8AIC2ciLy/sE2ehafRBleBgDLvzGhBRRev87sP7ovnbvQfqpc3XFI0DhHey2OfVoNV91W+GPC6B3540/5Q==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true + }, + "precommit": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/precommit/-/precommit-1.2.2.tgz", + "integrity": "sha512-kesKErtroAWkFchA8bsm6jFYMDrFREcOquvKGGcxFBpTjbsMEmijSkhMr1isCrFw74sqw2kP6Tczyg2Z+kgf8Q==", + "dev": true, + "requires": { + "clix": "^2.0.16", + "del": "^1.2.0", + "es6-promise": "^3.2.1", + "git-toplevel": "^1.1.0", + "read-file": "^0.2.0", + "stringformat": "0.0.5", + "write": "^0.1.1" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true + }, + "read-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/read-file/-/read-file-0.2.0.tgz", + "integrity": "sha512-na/zgd5KplGlR+io+ygXQMIoDfX/Y0bNS5+P2TOXOTk5plquOVd0snudCd30hZJAsnVK2rxuxUP2z0CN+Aw1lQ==", + "dev": true + }, + "read-json-sync": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz", + "integrity": "sha512-gsW+Au195RPGTIAlJ+rNMwI5Zo6l7au+ZbMDs5pXw7Y1duGk6ZXnEbZq3o7PLuv6jD521bvjvto5imTyulSHBw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "stringformat": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringformat/-/stringformat-0.0.5.tgz", + "integrity": "sha512-yl77JaBIcWA2I7cYABq06d//cn2zVGi1U7vNzeddE5dcQL6eHpjDm4wni4ajF+k+fAThAGJ7oHVOtt5yYwNfoA==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "write": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.1.1.tgz", + "integrity": "sha512-5FF3KWOYfu9t17XyUwHoTnMJ8djTo3ObPjDpFmdK7mOIkqlDq3uqwMGqu+vsA09lR1pWSIYS+7LFIZZK+FQwPA==", + "dev": true, + "requires": { + "mkdirp": "^0.5.0" + } + } + } +} diff --git a/src/content/lesson/vite.es.md b/src/content/lesson/vite.es.md new file mode 100644 index 000000000..4bac5187f --- /dev/null +++ b/src/content/lesson/vite.es.md @@ -0,0 +1,62 @@ +--- +title: "Introducción a Vite como Empaquetador de Módulos" +subtitle: "Aprende cómo funciona Vite como un moderno empaquetador de módulos y compáralo con Webpack para entender sus ventajas únicas." +cover: "https://example.com/vite-module-bundler-cover.jpg" +textColor: "black" +date: "2024-01-20T10:00:00-04:00" +tags: ["vite", "javascript", "webpack", "desarrollo web"] +status: "draft" +--- + + + +# Introducción a Vite como Module Bundler + +Este documento está diseñado para explicar cómo funciona Vite como *module bundler* y qué lo hace una opción destacada para el desarrollo web moderno, especialmente para aquellos que están empezando y no tienen experiencia previa con *module bundlers*. También se incluye una comparación con Webpack para entender mejor sus diferencias. + +## ¿Qué es un Module Bundler? + +Un *module bundler* es una herramienta que combina diferentes archivos y recursos de tu proyecto (JavaScript, CSS, imágenes, etc.) en un archivo o conjunto de archivos optimizados que el navegador puede interpretar eficientemente. Esto es necesario porque los navegadores no entienden los módulos de JavaScript de la misma manera que los escribimos en el desarrollo moderno. + +Por ejemplo: +- Combina múltiples archivos `.js` en un único archivo `bundle.js`. +- Optimiza los archivos para mejorar la velocidad de carga en el navegador. + +## ¿Qué es Vite? + +Vite es un *module bundler* y servidor de desarrollo moderno que se enfoca en proporcionar una experiencia rápida y eficiente para los desarrolladores. A diferencia de otros *bundlers* más tradicionales, Vite se destaca por su rapidez y simplicidad, especialmente durante el desarrollo. + +### Principales características de Vite + +1. **Servidor de desarrollo rápido**: Vite utiliza *esbuild* para transformar los módulos de JavaScript y servirlos directamente al navegador. Esto elimina la necesidad de un *bundling* completo durante el desarrollo. + +2. **Recarga en caliente (Hot Module Replacement, HMR)**: Detecta cambios en tus archivos y los aplica al navegador de inmediato, sin recargar toda la página. + +3. **Optimización para producción**: Aunque el desarrollo es rápido, Vite utiliza Rollup para empaquetar tu aplicación cuando la preparas para producción. + +4. **Compatibilidad con módulos nativos de ES**: Los navegadores modernos pueden cargar módulos de ES directamente. Vite aprovecha esto para evitar procesamiento innecesario. + +## Comparación: Vite vs. Webpack + +A continuación, se presenta una comparación entre Vite y Webpack, dos de las herramientas más populares para empaquetar proyectos web: + +| Característica | Vite | Webpack | +|--------------------------|------------------------------|-----------------------------| +| **Velocidad en desarrollo** | Muy rápida gracias a ESBuild. | Más lenta debido al *bundling* inicial. | +| **Configuración inicial** | Configuración mínima. | Más compleja y detallada. | +| **Recarga en caliente** | Más rápida y eficiente. | Funciona bien, pero puede ser más lenta. | +| **Soporte de plugins** | Usa plugins de Rollup. | Ecosistema de plugins robusto. | +| **Producción** | Usa Rollup para optimización.| Bundling completo. | + +### ¿Cuándo elegir Vite? + +- Si buscas velocidad y simplicidad durante el desarrollo. +- Si trabajas en un proyecto moderno que puede aprovechar los navegadores con soporte para ES Modules. +- Si prefieres una herramienta más ligera. + +### ¿Cuándo elegir Webpack? + +- Si trabajas en un proyecto grande que requiere soporte avanzado de plugins o configuraciones complejas. +- Si necesitas compatibilidad con navegadores más antiguos. + +En conclusión, Vite es una excelente opción para desarrolladores que buscan un enfoque rápido y eficiente para construir aplicaciones modernas. Aunque Webpack sigue siendo una opción robusta y flexible, Vite se destaca por su facilidad de uso y velocidad, especialmente para principiantes o proyectos nuevos. diff --git a/src/content/lesson/vite.md b/src/content/lesson/vite.md new file mode 100644 index 000000000..ba4e09910 --- /dev/null +++ b/src/content/lesson/vite.md @@ -0,0 +1,62 @@ +--- +title: "Introduction to Vite as a Module Bundler" +subtitle: "Learn how Vite works as a modern module bundler and compare it to Webpack to understand its unique advantages." +cover: "https://example.com/vite-module-bundler-cover.jpg" +textColor: "black" +date: "2024-01-20T10:00:00-04:00" +tags: ["vite", "javascript", "webpack", "web development"] +status: "draft" +--- + + + +# Introduction to Vite as a Module Bundler + +This document is designed to explain how Vite works as a *module bundler* and why it stands out as a modern web development tool. It’s aimed at beginners who may not yet understand what a *module bundler* is. A section comparing Vite to Webpack is also included to provide further clarity. + +## What is a Module Bundler? + +A *module bundler* is a tool that combines various files and resources in your project (JavaScript, CSS, images, etc.) into one or more optimized files that the browser can efficiently interpret. This is essential because browsers don’t natively understand JavaScript modules as written in modern development practices. + +For example: +- It combines multiple `.js` files into a single `bundle.js`. +- Optimizes files to improve browser loading speed. + +## What is Vite? + +Vite is a modern *module bundler* and development server that focuses on providing a fast and efficient developer experience. Unlike more traditional bundlers, Vite stands out for its speed and simplicity, especially during the development phase. + +### Key Features of Vite + +1. **Fast Development Server**: Vite uses *esbuild* to transform JavaScript modules and serve them directly to the browser. This eliminates the need for full bundling during development. + +2. **Hot Module Replacement (HMR)**: Detects changes in your files and applies them to the browser instantly without reloading the entire page. + +3. **Production Optimization**: While development is fast, Vite uses Rollup to bundle your application when preparing for production. + +4. **Native ES Module Support**: Modern browsers can load ES Modules directly. Vite leverages this to avoid unnecessary processing. + +## Comparison: Vite vs. Webpack + +Below is a comparison between Vite and Webpack, two of the most popular tools for bundling web projects: + +| Feature | Vite | Webpack | +|--------------------------|------------------------------|-----------------------------| +| **Development Speed** | Very fast, thanks to ESBuild.| Slower due to initial bundling. | +| **Initial Setup** | Minimal configuration. | More complex and detailed. | +| **Hot Module Replacement** | Faster and more efficient. | Works well but can be slower. | +| **Plugin Support** | Uses Rollup plugins. | Extensive plugin ecosystem. | +| **Production** | Uses Rollup for optimization.| Complete bundling. | + +### When to Choose Vite? + +- If you prioritize speed and simplicity during development. +- If you are working on a modern project that can leverage browsers with ES Module support. +- If you prefer a lightweight tool. + +### When to Choose Webpack? + +- If you're working on a large-scale project requiring advanced plugin support or complex configurations. +- If you need compatibility with older browsers. + +Vite is an excellent choice for developers seeking a fast and efficient approach to building modern applications. While Webpack remains a robust and flexible option, Vite shines with its ease of use and speed, especially for beginners or new projects. From efd1924dcf65365d7ca5715b4dd58bc968041e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rosinni=20Rodr=C3=ADguez?= <43686922+rosinni@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:02:11 +0000 Subject: [PATCH 2/2] how to concatenate strings on python spanish --- ...how-to-concatenate-strings-on-python.es.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 src/content/how-to/how-to-concatenate-strings-on-python.es.md diff --git a/src/content/how-to/how-to-concatenate-strings-on-python.es.md b/src/content/how-to/how-to-concatenate-strings-on-python.es.md new file mode 100644 index 000000000..713bdb5a3 --- /dev/null +++ b/src/content/how-to/how-to-concatenate-strings-on-python.es.md @@ -0,0 +1,156 @@ +--- +title: "Cómo concatenar cadenas en Python" +subtitle: "Aprende a concatenar cadenas en Python de manera eficiente. Explora técnicas de manipulación de cadenas y mejora tus habilidades de programación hoy mismo." +tags: ["python", "strings"] + +--- + + +## Cómo concatenar cadenas en Python + + +La concatenación de cadenas es el proceso de unir dos cadenas en una sola. La forma más sencilla de concatenar cadenas en Python es utilizando el método **format string**. Este método consiste en añadir la letra "f" antes de las comillas de la cadena, como en `f"Hola mundo"`, y luego puedes concatenar variables colocándolas entre llaves `{}` dentro de las comillas. Aquí tienes un ejemplo: + +```python +name = "4Geeks" + +print(f"Hello from {name}!") +#Output -> Hello from 4Geeks! +``` + + +En el ejemplo anterior, estamos utilizando la variable `name` para concatenarla a la cadena. + +La concatenación de cadenas es una acción común que nosotros, como [desarrolladores de software](https://4geeksacademy.com/us/coding-bootcamps/part-time-full-stack-developer), debemos realizar en casi cualquier proyecto. Hay muchas maneras de concatenar cadenas; puedes usar la que mejor se adapte a tus necesidades. + +## Concatenar cadenas en Python usando el operador + + +La forma más familiar de concatenar cadenas para la mayoría de las personas es utilizando el operador `+`. Mira este ejemplo que explica cómo funciona: + + +```python +name = "Alex" + +print("Hello my name is " + name + " and I'm a developer") +#Output-> Hello my name is Alex and I'm a developer +``` + +> Nota el espacio después de `is` y antes de `and`. Si no los hubiéramos agregado, la salida habría sido algo como esto: `Hello my name isAlexand I'm a developer`. Recuerda agregar los espacios cuando sea necesario. + +## Concatenar cadenas usando el operador += + +También podemos usar el operador `+=` para concatenar cadenas. Es bastante similar a usar el operador `+`, pero en este caso modificaremos el valor de la cadena original. + + +```python +#Concatenate using the += operator +fullname = "Alex " +lastname = "Smith" +fullname += lastname +print(fullname) +#Output-> Alex Smith +``` + +> Nota que hay un espacio dentro de la cadena, de lo contrario, el valor de `fullname` sería "AlexSmith". Recuerda agregar los espacios cuando sea necesario. + +### Concatenar un valor entero o flotante con texto usando str() + +Los números y las cadenas son tipos de datos completamente diferentes. Cuando queramos agregar un número (int, float, etc.) a una cadena, necesitaremos usar `str()` para convertir ese número en una cadena. + + +```python +# Concatenate using the + Operator with numbers +geeks_word = "Geeks" +geeks_number = 4 +print("At " + str(geeks_number) + geeks_word + " Academy we love Python! <3") +#Output-> At 4Geeks Academy we love python! <3 +``` + +Como se mencionó anteriormente, estamos agregando espacios para que el render respete las reglas de escritura. + +Si no convirtieramos la variable `int1` a **cadena**, recibiríamos el siguiente error, indicando que estamos intentando concatenar un entero con una cadena. + + +```python +TypeError: can only concatenate str (not "int") to str +``` + +## Concatenar cadenas en Python usando f-Strings + +Las f-Strings de Python (literales de cadenas formateadas) hacen que escribir cadenas sea más rápido y mucho más fácil. Esta opción fue [introducida en Python](https://4geeks.com/lesson/intro-to-python) 3.6, por lo que debes tener en cuenta la compatibilidad hacia atrás al utilizarla. + +Este es uno de los métodos más utilizados entre los desarrolladores experimentados debido a la facilidad de insertar `variables` dentro de los **corchetes**. La(s) variable(s) se evaluarán y se mostrará una representación en cadena. + +Implementación: + + +```python +#Concatenate using the f-Strings method +geek_word = "Geeks" +print(f"Showing the geek_word variable: {geek_word} using f-String") +#Output-> Showing the geek_word variable: Geeks using f-String +``` + +Al utilizar la concatenación con `f-Strings`, no necesitamos convertir los números (Int, Float, etc.) a cadena para poder mostrarlos dentro de los corchetes. + +```python +#Concatenate using the f-Strings method with numbers +geek_word = "Geeks" +geek_number = 4 +print(f"At {geek_number}{geek_word} Academy we love Python! <3") +#Output-> At 4Geeks Academy we love python! <3 +``` + +## Concatenar usando .format() + +Otra forma de concatenar [cadenas en Python](https://4geeks.com/lesson/working-with-strings-in-python) es utilizando el método `format()`. Funciona de manera similar a los `f-Strings`, ya que ambos utilizan corchetes `{}` para insertar variables, pero está disponible desde la versión 2.7. + +Este método tampoco necesita convertir los valores numéricos en cadenas. + + +```python +#Concatenate using the .format() method +geek_word = "Geeks" +geek_number = 4 +text = "{}{} Academy".format(geek_number, geek_word) +print(text) +#Output-> 4GeeksAcademy +``` + +Como puedes ver, el resultado devuelto es el esperado, pero sin espacio entre las palabras. + +## Concatenar usando el operador % + +El operador `%` es una forma más antigua de concatenar cadenas que funciona de manera muy similar al método `.format()`. Usamos `%s` como marcadores de posición para diferentes valores, como lo hicimos con los corchetes en los ejemplos anteriores. + + +```python +#Concatenate using the % Operator +geek_word = "Geeks" +geek_number = 4 +text = "%s%s Academy" % (geek_number, geek_word) +print(text) +#Output-> 4Geeks Academy +``` + +## Concatenar usando el operador * + +El uso del operador `*` no es una concatenación de la manera en que hemos estado haciendo hasta ahora. El operador `*` se utiliza para la multiplicación y eso es exactamente lo que hace: multiplica la cadena por la cantidad indicada. + + +```python +#Concatenate using the * Operator +str1 = "4Geeks Academy " +print(str1*3) +#Output-> 4Geeks Academy 4Geeks Academy 4Geeks Academy +``` + +> Si formateas correctamente la variable **cadena** (dejando un espacio al final de la oración/palabra), esta es la mejor manera de repetir una línea de texto tantas veces como necesites. + + + +# Recommended Material + +If you want to learn more about how to concatenate strings in Python and explore the different methods available, we invite you to check out this **interactive tutorial**. + +