Skip to content

Commit

Permalink
chore: several minor updates & improvements
Browse files Browse the repository at this point in the history
chore: update sponsors page

chore: wip

chore: wip

chore: remove get started section

chore: wip

chore: wip

chore: wip

chore: add license

chore: wip

chore: wip

chore: wip

chore: wip

chore: add note

chore: sponsorpage updates

chore: wip

chore: wip

chore: wip

chore: add white logo

chore: wip

chore: fix links

chore: wip

chore: wip

chore: wip

chore: wip
  • Loading branch information
chrisbbreuer committed Dec 25, 2024
1 parent 71e64ef commit 1c58942
Show file tree
Hide file tree
Showing 16 changed files with 318 additions and 55 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.lockb binary diff=lockb
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ logs
node_modules
temp
docs/.vitepress/cache
.env
4 changes: 4 additions & 0 deletions .vscode/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ biomejs
bluesky
booleanish
bumpp
bunfig
bunx
changelogen
changelogithub
Expand All @@ -18,6 +19,7 @@ dtsx
entrypoints
heroicons
iconify
localtunnels
lockb
openweb
outdir
Expand All @@ -27,9 +29,11 @@ prefetch
preinstall
quickfix
shikijs
shoutout
socio
Solana
Spatie
sponsorware
stacksjs
tlsx
twoslash
Expand Down
24 changes: 12 additions & 12 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,20 @@ const analyticsHead: HeadConfig[] = [
]

const nav = [
{ text: 'News', link: 'https://stacksjs.org/news' },
{ text: 'Changelog', link: 'https://github.com/stacksjs/vite-plugin-local/releases' },
// { text: 'Blog', link: 'https://updates.ow3.org' },
{
text: 'Resources',
items: [
{ text: 'Team', link: '/team' },
{ text: 'Sponsors', link: '/sponsors' },
{ text: 'Partners', link: '/partners' },
{ text: 'Postcardware', link: '/postcardware' },
{ text: 'License', link: '/license' },
{
items: [
{
text: 'Awesome Stacks',
link: 'https://github.com/stacksjs/awesome-stacks',
},
{
text: 'Contributing',
link: 'https://github.com/stacksjs/vite-plugin-local/blob/main/.github/CONTRIBUTING.md',
},
{ text: 'Awesome Stacks', link: 'https://github.com/stacksjs/awesome-stacks' },
{ text: 'Contributing', link: 'https://github.com/stacksjs/vite-plugin-local/blob/main/.github/CONTRIBUTING.md' },
],
},
],
Expand All @@ -46,11 +41,13 @@ const sidebar = [
{
text: 'Get Started',
items: [
{ text: 'Introduction', link: '/intro' },
{ text: 'Intro', link: '/intro' },
{ text: 'Install', link: '/install' },
{ text: 'Usage', link: '/usage' },
{ text: 'Config', link: '/config' },
],
},
{ text: 'Showcase', link: '/Showcase' },
]

export default withPwa(
Expand All @@ -69,14 +66,17 @@ export default withPwa(
['meta', { property: 'og:locale', content: 'en' }],
['meta', { property: 'og:title', content: 'vite-plugin-local | Pretty development URLs, and HTTPS. Zero config, zero setup.' }],
['meta', { property: 'og:site_name', content: 'vite-plugin-local' }],
['meta', { property: 'og:image', content: './images/og-image.png' }],
['meta', { property: 'og:image', content: '/images/og-image.png' }],
['meta', { property: 'og:url', content: 'https://vite-plugin-local.netlify.app/' }],
// ['script', { 'src': 'https://cdn.usefathom.com/script.js', 'data-site': '', 'data-spa': 'auto', 'defer': '' }],
...analyticsHead,
],

themeConfig: {
logo: './images/logo-transparent.svg',
logo: {
light: './images/logo-transparent.svg',
dark: './images/logo-white-transparent.svg',
},

nav,
sidebar,
Expand Down
69 changes: 69 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Configuration

The plugin can be configured with the following options:

```ts
// vite.config.ts
import type { LocalConfig } from 'vite-plugin-local'
import { defineConfig } from 'vite'
import Local from 'vite-plugin-local'

const config: LocalConfig = {
/**
* Enable/disable the plugin
* @default true
*/
enabled: true,

/**
* The target domain to proxy to (e.g., 'my-app.localhost')
* @example 'my-app.test'
* @example 'example.com'
* @default 'stacks.localhost'
*/
domain: 'my-app.local', // default: stacks.localhost

/**
* SSL/TLS configuration
* - true: uses default SSL config
* - false: disables SSL
* - object: custom SSL configuration
* @default false
* @example true
*/
https: true, // default: true, pass TlsConfig options for custom certificates

/**
* Cleanup options
* - true: cleanup everything
* - false: cleanup nothing
* - object: cleanup specific items
* @default { hosts: true, certs: false }
* @example { hosts: true, certs: true }
*/
cleanup: {
certs: true, // default: false, cleans up the certificates created on server shutdown
hosts: true, // default: true, cleans up /etc/hosts on server shutdown
},

/**
* By default, VitePress resolves inbound links to URLs ending with .html.
* However, some users may prefer "Clean URLs" without the .html extension
* for example, example.com/path instead of example.com/path.html.
* @default false
*/
cleanUrls: true, // default: false, cleans up URLs by not requiring the .html extension

/**
* Enable verbose logging
* @default false
*/
verbose: true, // default: false, enables detailed logging
}

export default defineConfig({
plugins: [
Local(config)
]
})
```
51 changes: 41 additions & 10 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
# Install

## Bun & Node.js
Installing `vite-plugin-local` is easy. Simply pull it in via your package manager of choice.

```bash
npm install -d vite-plugin-local
#bun install -d @stacksjs/vite-plugin-local
::: code-group

# or, invoke immediately
bunx vite-plugin-local
npx vite-plugin-local
```bash [npm]
npm install --save-dev vite-plugin-local

# or
# npm i -d vite-plugin-local
```

```bash [bun]
bun install --dev vite-plugin-local

# or
# bun add --dev vite-plugin-local
# bun i -d vite-plugin-local
```

_We are looking to publish this package npm under the name `vite-plugin-local`. We are also hoping npm will release the name for us._
```bash [yarn]
yarn add --dev vite-plugin-local

# or
# yarn i -d vite-plugin-local
```

## Binaries
:::

## Usage

This minimal usage example shows how to use `vite-plugin-local` in your Vite configuration, using the plugin’s default settings.

```javascript
// vite.config.{js,ts}
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import local from 'vite-plugin-local'

export default defineConfig({
plugins: [
vue(), // svelte(), react(), ...
local()
]
})
```

For now, you can download the `vite-plugin-local` binaries from the [releases page](https://github.com/stacksjs/vite-plugin-local/releases/tag/v0.4.1). Choose the binary that matches your platform and architecture:
To read about the more elaborate usage API, check out the the following page in our documentation.
33 changes: 5 additions & 28 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,18 @@

`vite-plugin-local` is a smart reverse proxy for local development, with HTTPS support, and other goodies.

## Local Development

> A smart Vite plugin that enables pretty development URLs, including HTTPS.
## Features

- Pretty development URLs
- Smart HTTPS management
- Automatically cleans URLs
- Lightweight
- _Soon: Local Tunneling_

## Changelog

Please see our [releases](https://github.com/stacksjs/vite-plugin-local/releases) page for more information on what has changed recently.

## Contributing

Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.

## Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)

For casual chit-chat with others using this package:

[Join the Stacks Discord Server](https://discord.gg/stacksjs)

## Postcardware

Two things are true: Stacks OSS will always stay open-source, and we do love to receive postcards from wherever Stacks is used! 🌍 _We also publish them on our website._
> A smart Vite plugin that enables pretty development URLs, including HTTPS.
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎
::: info
We are soon releasing [local tunnel](https://localtunnel.sh/) support.
:::

## Sponsors

Expand All @@ -54,6 +31,6 @@ We would like to extend our thanks to the following sponsors for funding Stacks

## License

The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
The MIT License (MIT). Please see [LICENSE](/license) for more information.

Made with 💙
21 changes: 21 additions & 0 deletions docs/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2024 Stacks.js

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.
8 changes: 8 additions & 0 deletions docs/partners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Partners

The following companies and organizations are supporting Stacks development through partnerships:

- [JetBrains](https://www.jetbrains.com/)
- [The Solana Foundation](https://solana.com/)

If you are interested in becoming a partner, please reach out to us.
11 changes: 11 additions & 0 deletions docs/postcardware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Postcardware

Two things are true: Stacks OSS will always stay open-source, and we do love to receive postcards from wherever Stacks is used! 🌍

_We also publish them on our website._

## Address

Our address in the US is:

Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎
4 changes: 4 additions & 0 deletions docs/public/images/logo-white-transparent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/showcase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Showcase

Here are all the cool projects that people have built using `vite-plugin-local`. If you have something you’d like to share, please share it with us in any way _(on Discord, Social Media, or via a PR, etc.)_, and we’ll add it here.
Loading

0 comments on commit 1c58942

Please sign in to comment.