Skip to content

My simple React + TypeScript template for VS Code

Notifications You must be signed in to change notification settings

ahuglajbclajep/my-react-template

Repository files navigation

my-react-template

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/main

Additional Configuration

Using with clsx & prettier-plugin-tailwindcss

See also:

$ npm i clsx
$ npm i -D prettier-plugin-tailwindcss

.vscode/settings.json

{
  /* Extension specific */
+ "tailwindCSS.classFunctions": ["clsx"]
}

.prettierrc.mjs

/**
 * @type {import("prettier").Config}
 */
const config = {
  plugins: ["prettier-plugin-tailwindcss"],
  tailwindFunctions: ["clsx"],
};

export default config;

package.json

{
- "prettier": {}
}
Using with gh-pages

See also:

$ npm i -D gh-pages

package.json

{
  "scripts": {
    "preview": "vite preview",
+   "deploy": "npm run build && gh-pages -d dist -v '.*' -f",
    "lint:type": "tsc",
  }
}

License

MIT

About

My simple React + TypeScript template for VS Code

Topics

Resources

Stars

Watchers

Forks