This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { dirname, join } from 'node:path' | |
import { fileURLToPath } from 'node:url' | |
export const __dirname = join(dirname(fileURLToPath(import.meta.url)), '..') // '..' dans le cas ou il est dans un dossier utils par exemple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hack for https://memory-game-elieb77.vercel.app/ | |
// Just copy and paste the code into the console after clicking on "Play". | |
console.clear() | |
console.info("Neka Hack2000 - Memory Game init...."); | |
let cards = document.querySelectorAll("div[class^='styles___card__']"); | |
let backCards = document.querySelectorAll("div[class^='styles___back']"); | |
let imagesUrls = []; | |
let identifications = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo Welcome to the automatic setup of a Reactjs app by Neka ✨ | |
echo ⚠️ The name of your application must be in miniscule and the words separated by dashes, for example: my-app | |
echo What do you want to name your application ? | |
read name | |
echo Creation of the $name application, in progress 🛠️ | |
npx create-react-app $name --template typescript && cd $name/ && npm uninstall web-vitals && npm uninstall @testing-library/jest-dom && npm uninstall @testing-library/react && npm uninstall @testing-library/user-event && npm i react-router-dom && sed -i '/eject/d' package.json && sed -i '/test/d' package.json && sed -i '/jest/d' package.json && sed -i '/reportWebVitals/d' src/index.tsx && sed -i '/CRA-vitals/d' src/index.tsx && sed -i '/measuring performance/d' src/index.tsx && sed -i '/"build": "react-scripts build",/c\ "build": "react-scripts build"' package.json && sed -i '/"react-app",/c\ "react-app"' package.json && npm i sass && mkdir src/assets && mkdir src/assets/fonts && mkdir src/assets/images && mkdir src/ |