A simple React and TypeScript template for VS Code.
$ git clone -b template git@github.com:ahuglajbclajep/my-react-template.git REPOSITORY && cd $_
$ npm i; npm run dev
$ git branch -m main
$ git remote set-url origin git@github.com:OWNER/REPOSITORY.git
$ git branch --set-upstream-to=origin/mainUsing with clsx & prettier-plugin-tailwindcss
See also:
- https://github.com/lukeed/clsx?tab=readme-ov-file#tailwind-support
- https://github.com/tailwindlabs/prettier-plugin-tailwindcss
- tailwindlabs/tailwindcss#7554
$ npm i clsx
$ npm i -D prettier-plugin-tailwindcss{
/* Extension specific */
+ "tailwindCSS.classFunctions": ["clsx"]
}.prettierrc.mjs
/**
* @type {import("prettier").Config}
*/
const config = {
plugins: ["prettier-plugin-tailwindcss"],
tailwindFunctions: ["clsx"],
};
export default config;{
- "prettier": {}
}Using with gh-pages
See also:
$ npm i -D gh-pages{
"scripts": {
"preview": "vite preview",
+ "deploy": "npm run build && gh-pages -d dist -v '.*' -f",
"lint:type": "tsc",
}
}MIT