-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new files and update dependencies
- Loading branch information
Showing
11 changed files
with
3,554 additions
and
65 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,20 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
- run: npm install |
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,29 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
if: ${{ github.repository_owner == 'myrax_byte' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
- run: npm run build | ||
- name: Create Release Pull Request | ||
uses: changesets/action@v1 | ||
with: | ||
version: npx changeset version | ||
publish: npx changeset publish | ||
commit: "[ci] release" | ||
title: "[ci] release" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,47 @@ | ||
# Vite Tunnel | ||
|
||
![Screenshot](./.github/assets/screenshot.png) | ||
|
||
Vite Tunnel is an Vite plugin that allows you to expose your local Vite server to the internet using [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps). | ||
|
||
## Installation | ||
|
||
To install Vite Tunnel, run the following command with your preferred package manager: | ||
|
||
```sh | ||
npm install -D @vite-libs/tunnel | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { defineConfig } from "vite"; | ||
|
||
import ViteTunnelPlugin from "@vite-libs/tunnel"; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ViteTunnelPlugin()], | ||
}); | ||
``` | ||
|
||
Upon first starting a tunnel, you will be prompted to accept the terms of the Cloudflare License, Terms and Privacy Policy on the command line. Once you accept these terms, a tunnel will be initiated and a public URL for your local Vite server will be displayed inside the toolbar. | ||
|
||
## Configuration | ||
|
||
Vite Tunnel accepts the following options: | ||
|
||
```ts | ||
ViteTunnelPlugin({ | ||
// The local server port to expose. Defaults to 5521. | ||
port: 5521, | ||
// The local server hostname to expose. Defaults to localhost. | ||
host: "localhost", | ||
// The local server protocol to use. Defaults to http. | ||
protocol: "http", | ||
// Whether to verify the local server TLS certificate. Defaults to false. | ||
verifyTLS: false, | ||
// Whether to accept the Cloudflare terms of service. Defaults to false. | ||
acceptCloudflareNotice: false, | ||
}); | ||
``` |
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
Oops, something went wrong.