-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
488a66b
commit 204c889
Showing
350 changed files
with
26,942 additions
and
4,559 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: daltonmenezes | ||
patreon: daltonmenezes |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: autofix.ci # needed to securely identify the workflow | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
autofix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- name: Fix lint issues | ||
run: pnpm run lint:fix | ||
- uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 | ||
with: | ||
commit-message: 'style: apply lint fixes' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish Any Commit | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- '!**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build:package | ||
|
||
- run: pnpx pkg-pr-new publish --no-template --compact './packages/electron-router-dom' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm dlx commitlint --edit $1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
auto-install-peers=true | ||
shamefully-hoist=true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"version": 1.1, | ||
"atDirectives": [ | ||
{ | ||
"name": "@tailwind", | ||
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@apply", | ||
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#apply" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@responsive", | ||
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@screen", | ||
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#screen" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@variants", | ||
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#variants" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"bradlc.vscode-tailwindcss" | ||
], | ||
|
||
"unwantedRecommendations": [ | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,69 @@ | ||
{ | ||
"eslint.workingDirectories": [ | ||
{ | ||
"mode": "auto" | ||
"pattern": "apps/*/" | ||
}, | ||
{ | ||
"pattern": "packages/*/" | ||
}, | ||
{ | ||
"pattern": "examples/*/" | ||
} | ||
], | ||
|
||
"tailwindCSS.experimental.configFile": { | ||
"apps/desktop/tailwind.config.ts": "apps/desktop/**", | ||
"apps/web/tailwind.config.ts": "apps/web/**", | ||
"examples/basic/tailwind.config.ts": "examples/basic/**", | ||
"examples/with-loaders/tailwind.config.ts": "examples/with-loaders/**", | ||
"examples/with-query-string/tailwind.config.ts": "examples/with-query-string/**", | ||
"examples/with-multiple-windows/tailwind.config.ts": "examples/with-multiple-windows/**" | ||
}, | ||
|
||
"tailwindCSS.experimental.classRegex": [ | ||
[ | ||
"cva\\(([^)]*)\\)", | ||
"[\"'`]([^\"'`]*).*?[\"'`]" | ||
], | ||
[ | ||
"cn\\(([^)]*)\\)", | ||
"[\"'`]([^\"'`]*).*?[\"'`]" | ||
], | ||
], | ||
|
||
"tailwindCSS.classAttributes": [ | ||
"class", | ||
"className", | ||
"tw" | ||
], | ||
|
||
"css.customData": [ | ||
".vscode/css.json" | ||
], | ||
|
||
"[javascript]": { | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
}, | ||
|
||
"[typescript]": { | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
}, | ||
|
||
"[typescriptreact]": { | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
] | ||
}, | ||
|
||
"eslint.validate": [ | ||
"javascript", | ||
"typescript" | ||
], | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 - * Dalton Menezes | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,80 @@ | ||
# Turborepo starter | ||
|
||
This is an official starter Turborepo. | ||
|
||
## Using this example | ||
|
||
Run the following command: | ||
|
||
```sh | ||
npx create-turbo@latest | ||
``` | ||
|
||
## What's inside? | ||
|
||
This Turborepo includes the following packages/apps: | ||
|
||
### Apps and Packages | ||
|
||
- `docs`: a [Next.js](https://nextjs.org/) app | ||
- `web`: another [Next.js](https://nextjs.org/) app | ||
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications | ||
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) | ||
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo | ||
|
||
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). | ||
|
||
### Utilities | ||
|
||
This Turborepo has some additional tools already setup for you: | ||
|
||
- [TypeScript](https://www.typescriptlang.org/) for static type checking | ||
- [ESLint](https://eslint.org/) for code linting | ||
- [Prettier](https://prettier.io) for code formatting | ||
|
||
### Build | ||
|
||
To build all apps and packages, run the following command: | ||
|
||
``` | ||
cd my-turborepo | ||
pnpm build | ||
<p align="center"> | ||
<a href="#"> | ||
<img alt="Electron Router DOM - A react-router-dom adapter for Electron apps" src="https://github.com/user-attachments/assets/2bbef3c6-d34e-4bc9-ade3-e17f06e034a8" /> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
<!-- GitHub --> | ||
<a href="https://github.com/sponsors/daltonmenezes"> | ||
<img alt="github url" src="https://img.shields.io/badge/support%20on-github-1C1E26?style=for-the-badge&labelColor=1C1E26&color=ffe27a"/> | ||
</a> | ||
<!-- Patreon --> | ||
<a href="https://www.patreon.com/daltonmenezes"> | ||
<img alt="patreon url" src="https://img.shields.io/badge/support%20on-patreon-1C1E26?style=for-the-badge&labelColor=1C1E26&color=50e1c7"/> | ||
</a> | ||
<!-- Version --> | ||
<a href="https://github.com/daltonmenezes/electron-router-dom/releases"> | ||
<img alt="releases url" src="https://img.shields.io/github/v/release/daltonmenezes/electron-router-dom.svg?style=for-the-badge&labelColor=1C1E26&color=ffe27a"/> | ||
</a> | ||
<!-- License --> | ||
<a href="https://github.com/daltonmenezes/electron-router-dom/blob/main/LICENSE.md"> | ||
<img alt="license url" src="https://img.shields.io/badge/license%20-MIT-1C1E26?style=for-the-badge&labelColor=1C1E26&color=50e1c7"/> | ||
</a> | ||
</p> | ||
|
||
If you've ever tried using the `react-router-dom` library with `Electron`, | ||
you've probably had trouble getting it to work properly, | ||
both in development and production environments. | ||
|
||
From this, the `Electron Router DOM` library was born, | ||
which aims to facilitate the integration of `react-router-dom` with `Electron` and window routing, | ||
where each window can have its own routing. | ||
|
||
# Features | ||
|
||
- 🚀 Ready for production and development environments | ||
- 📱 Window routing support | ||
- 🌐 Support for `query strings` sent from the main process to the renderer | ||
- 🧬 Type-safe API designed to provide good DX | ||
|
||
# Installation | ||
|
||
> **Minimum required versions** | ||
> | ||
> - electron: >=17.0 | ||
> - react: >=18.0 | ||
> - react-router-dom: >=6.22.3 | ||
In your terminal and in the root folder of your application, run: | ||
|
||
```bash | ||
npm i electron-router-dom | ||
``` | ||
|
||
### Develop | ||
**Router DOM is a peer dependency**, if you haven't installed it yet or your package manager won't handle it automatically for you, so run: | ||
|
||
To develop all apps and packages, run the following command: | ||
|
||
``` | ||
cd my-turborepo | ||
pnpm dev | ||
```bash | ||
npm i react-router-dom | ||
``` | ||
|
||
### Remote Caching | ||
# Links | ||
- [Documentation](https://electron-router-dom.daltonmenezes.com/docs) | ||
- [Blog](https://electron-router-dom.daltonmenezes.com/blog) | ||
- [Examples](https://github.com/daltonmenezes/electron-router-dom/tree/main/examples) | ||
|
||
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. | ||
|
||
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands: | ||
# Contributing | ||
> **Note**: contributions are always welcome, but always **ask first**, — please — before work on a PR. | ||
``` | ||
cd my-turborepo | ||
npx turbo login | ||
``` | ||
|
||
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). | ||
|
||
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo: | ||
|
||
``` | ||
npx turbo link | ||
``` | ||
That said, there's a bunch of ways you can contribute to this project, like by: | ||
|
||
## Useful Links | ||
- :beetle: Reporting a bug | ||
- :page_facing_up: Improving documentation | ||
- :rotating_light: Sharing this project and recommending it to your friends | ||
- :dollar: Supporting this project on GitHub Sponsors or Patreon | ||
- :star2: Giving a star on this repository | ||
|
||
Learn more about the power of Turborepo: | ||
# License | ||
|
||
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) | ||
- [Caching](https://turbo.build/repo/docs/core-concepts/caching) | ||
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) | ||
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) | ||
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration) | ||
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) | ||
[MIT © Dalton Menezes](https://github.com/daltonmenezes/electron-router-dom/blob/main/LICENSE) |
Oops, something went wrong.