Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dimaslz/preact-ts-tailwindcss
https://github.com/dimaslz/preact-ts-tailwindcss
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dimaslz/preact-ts-tailwindcss
- Owner: dimaslz
- Created: 2021-02-26T23:45:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-27T15:01:28.000Z (almost 4 years ago)
- Last Synced: 2024-11-04T01:42:24.210Z (about 2 months ago)
- Language: JavaScript
- Homepage: preact-ts-tailwindcss-dimaslz.vercel.app
- Size: 467 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PREACT app with Typescript and Tailwind CSS
This is my basic setup to work with PREACT, built with [https://github.com/preactjs/preact-cli](https://github.com/preactjs/preact-cli) with some updates.**NOTE**: This repository doesn't pretend to be the solution, just a help maybe, basic setup to start a project with [PREACT](https://preactjs.com/), last versions of TS and Tailwind.
Feel free to fork, I hope to help you :), feedback are welcome.* Eslint: updated with https://github.com/developit/eslint-config-developit
* Move tests close to component
* Move CSS to SASS (.css files to .scss)
* Allow use .env files ([https://github.com/robinvdvleuten/preact-cli-plugin-env-vars](https://github.com/robinvdvleuten/preact-cli-plugin-env-vars))
* Commit linter ([https://www.conventionalcommits.org/en/v1.0.0/](https://www.conventionalcommits.org/en/v1.0.0/))## CLI Commands
* `yarn install`: Installs dependencies* `yarn dev`: Run a development, HMR server (by default is using port 8080, --port XXXX to change it)
* `yarn serve`: Run a production-like server
* `yarn build`: Production-ready build
* `yarn lint`: Pass TypeScript files using ESLint
* `yarn test`: Run Jest and Enzyme with
[`enzyme-adapter-preact-pure`](https://github.com/preactjs/enzyme-adapter-preact-pure) for
your testsFor detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).
## Setup ENV vars
```javascript
PREACT_APP_SECRET="my secret string"
```use in your code as
```javascript
console.log("env variable", process.env.PREACT_APP_SECRET);
```## Author
Dimas Lรณpez ยท FullStack Software Developer๐ฆ https://twitter.com/dimaslz
๐จ๐ปโ๐ป https://dimaslz.dev
๐ https://www.linkedin.com/in/dimaslopezzurita