This is a boilerplate project that uses modern CRA typescript template with styled-components and twin.macro library.
git clone https://github.com/mingcrypto/cra-ts-twin.macro-boilerplate.git
cd cra-ts-twin.macro-boilerplate
npm install
npm start
npx create-react-app my-app --template typescript
cd my-app
npm install [email protected] tailwindcss [email protected]
npm install @types/styled-components -D
And add babel macros config in package.json file.
"babelMacros": {
"twin": {
"preset": "styled-components"
}
}
That's it! 🎉
I've added one of the best eslint rules configuration with prettier, husky and commitlint.
Also for VSCode users, there's VSCode settings.json file for twin.macro intelligence and prettier rules.
If you have any issues or questions, feel free to create github issue here - https://github.com/mingcrypto/cra-ts-twin.macro-boilerplate/issues
Thank you!