Skip to content

Commit

Permalink
ite-plugin-ssr.com -> ike
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 22, 2023
1 parent 697fa49 commit 202566e
Show file tree
Hide file tree
Showing 769 changed files with 1,555 additions and 1,555 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: "🙏 Help & Questions"
url: https://github.com/brillout/vite-plugin-ssr/discussions
url: https://github.com/brillout/vike/discussions
about: Get help and ask questions.
- name: "💬 Chit-chat"
url: https://discord.com/invite/hfHhnJyVg8
about: Casual conversations about vite-plugin-ssr and broader topics.
about: Casual conversations about vike and broader topics.
10 changes: 5 additions & 5 deletions .github/workflows/ci/getTestJobs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ describe('getTestJobs()', () => {
"jobTestFiles": [
".github/workflows/ci/getTestJobs.spec.ts",
"test/renderPage.spec.ts",
"vite-plugin-ssr/shared/route/deduceRouteStringFromFilesystemPath.spec.ts",
"vite-plugin-ssr/shared/route/resolvePrecedence/overall.spec.ts",
"vite-plugin-ssr/shared/route/resolvePrecedence/route-strings.spec.ts",
"vite-plugin-ssr/shared/route/resolveRouteString.spec.ts",
"vite-plugin-ssr/utils/parseUrl.spec.ts",
"vike/shared/route/deduceRouteStringFromFilesystemPath.spec.ts",
"vike/shared/route/resolvePrecedence/overall.spec.ts",
"vike/shared/route/resolvePrecedence/route-strings.spec.ts",
"vike/shared/route/resolveRouteString.spec.ts",
"vike/utils/parseUrl.spec.ts",
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install
run: pnpm install

- name: Build vite-plugin-ssr
- name: Build vike
run: pnpm run build

- name: Build docs
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## System requirements

> These requirements are only needed for developing the source code of vite-plugin-ssr. The npm package `vite-plugin-ssr` can be used with Windows and with any package manager.
> These requirements are only needed for developing the source code of vike. The npm package `vike` can be used with Windows and with any package manager.
- Node.js `>= v16.0.0`.
- [pnpm](https://pnpm.io/).
Expand All @@ -28,22 +28,22 @@
Download and install the entire monorepo:

```shell
git clone git@github.com:brillout/vite-plugin-ssr
git clone git@github.com:brillout/vike
# Go to the monorepo root
cd vite-plugin-ssr/
cd vike/
pnpm install
```

#### Build & Dev

Build vite-plugin-ssr's source code:
Build vike's source code:

```shell
# At the monorepo root
pnpm run build
```

Develop vite-plugin-ssr:
Develop vike:

```shell
# At the monorepo root
Expand Down Expand Up @@ -71,7 +71,7 @@ cd examples/some-example/ && pnpm exec test-e2e
pnpm exec test-e2e ome-exampl # At the monorepo root
```

> On Debian, [these additional steps](https://github.com/brillout/vite-plugin-ssr/issues/283#issuecomment-1072974554) are required.
> On Debian, [these additional steps](https://github.com/brillout/vike/issues/283#issuecomment-1072974554) are required.
<br/>

Expand All @@ -87,7 +87,7 @@ New examples should be minimal and implement only what you want to showcase.

Follow the setup instructions at [Basics](#basics).

> The `README` instructions of examples use `npm`. We use `pnpm` instead if we want to install the entire monorepo and build & link vite-plugin-ssr's source code.
> The `README` instructions of examples use `npm`. We use `pnpm` instead if we want to install the entire monorepo and build & link vike's source code.
To run the example:

Expand Down
20 changes: 10 additions & 10 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ All essentials:

I'm not aware of any framework that implements *all* these features which I consider must-haves. (For example Next.js is missing isomorphic data fetching.)

Unique vite-plugin-ssr features:
Unique vike features:
- [Do-one-thing-do-it-well architecture](https://vike.dev/architecture)
- From a server-perspective, vite-plugin-ssr is just a middleware (a pure function)
- Vite-plugin-ssr can be easily integrated into any deployment strategy
- From a server-perspective, vike is just a middleware (a pure function)
- Vike can be easily integrated into any deployment strategy
- Especially important for large companies that already have a deployment architecture
- vite-plugin-ssr allows the user to use different UI frameworks for the same app
- For example, a vite-plugin-ssr sponsor uses vite-plugin-ssr to use Solid for all its pages except for one page that uses React because it needs a React library that doesn't exist for Solid
- vike allows the user to use different UI frameworks for the same app
- For example, a vike sponsor uses vike to use Solid for all its pages except for one page that uses React because it needs a React library that doesn't exist for Solid
- Important for Solid: for React users that are tempted to use Solid, Solid can sell the story "try Solid while being able to fallback to React, e.g. if a page needs some React library".
- Users can build a custom [Framework-as-a-Product](https://vike.land/#framework-as-a-product). (Vike has been designed so that frameworks can be built on top of it.)
- [Custom configs](https://vike.dev/meta)
- Low-level primites allowing users to deeply integrate with data fetching tools.
- For example, vite-plugin-ssr sponsors use it to deeply integrate Relay. (Facebook's internal framework deeply integrates with Relay in ways that aren't possible with Next.js.)
- For example, vike sponsors use it to deeply integrate Relay. (Facebook's internal framework deeply integrates with Relay in ways that aren't possible with Next.js.)
- URL rewriting for both [novel DX and novel UX](https://twitter.com/brillout/status/1687431520569425920) around authentication and authorization

Marketing boost of using "Vike - The Open Framework" &mdash; collaboration and openness being one of Vike's core value.
Expand All @@ -47,7 +47,7 @@ No known bugs, most notably:

Things missing that some frameworks have (but is on the roadmap):
- Nested Layouts (TODO: update ticket with latest design)
- Typesafe links ([#698](https://github.com/brillout/vite-plugin-ssr/issues/698))
- Typesafe links ([#698](https://github.com/brillout/vike/issues/698))
- Single Route File

Minor features that can be life changing for some users:
Expand All @@ -57,18 +57,18 @@ Minor features that can be life changing for some users:
- Low-level i18n hooks which allow to implement i18n without compromise (not a single user has reported a missing i18n use case, covering all i18n use cases is hard)
- Not only Route Guards but also Route Functions (define your route with a function for full programmatic flexibility)
- `pageContext.isBackwardsNavigation` (https://vike.dev/pageContext) for backwards/forward page transition animations
- vite-plugin-ssr can be loaded twice (or more) on the server-side, (some deployement architectures need this)
- vike can be loaded twice (or more) on the server-side, (some deployement architectures need this)
- Catches and interupts infinite loops of URL redirections and URL rewrites

And lots of details:
- [Automatic frontend deployment synchronization](https://vike.dev/deploy-sync)
- `93` warning messages that help the user. For example:
- Warning is shown when a hook takes more than 4 seconds to resolve (avoiding the user to ask himself "why is my vite-plugin-ssr app hanging?")
- Warning is shown when a hook takes more than 4 seconds to resolve (avoiding the user to ask himself "why is my vike app hanging?")
- Warning is shown when client runtime is included twice in the bundle
- Warning wrongly using `process.env.NODE_ENV`, including docs: https://vike.dev/NODE_ENV
- `294` helpul error messages. For example:
- Upon a 404 in dev, the complete list of routes is shown
- Helpful error when different versions of vite-plugin-ssr are loaded
- Helpful error when different versions of vike are loaded
- Typo in an option name (with "Did you mean xxx instead?")
- Proper development error hanlding (hard to achieve, especially since Vite is bogus about it)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

**Introducion & documentation** :arrow_right: [vike.dev](https://vike.dev)
<br/>
**Examples (official)** :arrow_right: [examples/](https://github.com/brillout/vite-plugin-ssr/tree/main/examples)
**Examples (official)** :arrow_right: [examples/](https://github.com/brillout/vike/tree/main/examples)
<br/>
**Examples (community)** :arrow_right: Many tools have community examples of being used with `vite-plugin-ssr` – search [vike.dev](https://vike.dev) (`CTRL+K`) for the tool you want an example of.
**Examples (community)** :arrow_right: Many tools have community examples of being used with `vike` – search [vike.dev](https://vike.dev) (`CTRL+K`) for the tool you want an example of.

**Version history (& breaking changes)** :arrow_right: [CHANGELOG.md](/CHANGELOG.md)

Expand All @@ -14,7 +14,7 @@
<br/>
**Request a feature** :arrow_right: [GitHub Issue > Feature Request](https://github.com/vitejs/vite/issues/new/choose).
<br/>
**Get help** :arrow_right: [GitHub Discussions](https://github.com/brillout/vite-plugin-ssr/discussions).
**Get help** :arrow_right: [GitHub Discussions](https://github.com/brillout/vike/discussions).
<br/>
**Chit-chat** :arrow_right: [Discord](https://discord.com/invite/hfHhnJyVg8).

Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vite-plugin-ssr": "^0.4.142"
"vike": "^0.4.142"
},
"type": "module"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Page() {
<>
<h1>About</h1>
<p>
Example of using <code>vite-plugin-ssr</code>.
Example of using <code>vike</code>.
</p>
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const passToClient = ['pageProps', 'urlPathname']

import ReactDOMServer from 'react-dom/server'
import { PageShell } from './PageShell'
import { escapeInject, dangerouslySkipEscape } from 'vite-plugin-ssr/server'
import { escapeInject, dangerouslySkipEscape } from 'vike/server'
import logoUrl from './logo.svg'
import type { PageContextServer } from './types'

Expand All @@ -21,7 +21,7 @@ async function render(pageContext: PageContextServer) {
// See https://vike.dev/head
const { documentProps } = pageContext.exports
const title = (documentProps && documentProps.title) || 'Vite SSR app'
const desc = (documentProps && documentProps.description) || 'App using Vite + vite-plugin-ssr'
const desc = (documentProps && documentProps.description) || 'App using Vite + vike'

const documentHtml = escapeInject`<!DOCTYPE html>
<html lang="en">
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-react-ts/renderer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
// When using Server Routing
PageContextBuiltInClientWithServerRouting as PageContextBuiltInClient
//*/
} from 'vite-plugin-ssr/types'
} from 'vike/types'

type Page = (pageProps: PageProps) => React.ReactElement
type PageProps = Record<string, unknown>
Expand Down
8 changes: 4 additions & 4 deletions boilerplates/boilerplate-react-ts/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file isn't processed by Vite, see https://github.com/brillout/vite-plugin-ssr/issues/562
// This file isn't processed by Vite, see https://github.com/brillout/vike/issues/562
// Consequently:
// - When changing this file, you needed to manually restart your server for your changes to take effect.
// - To use your environment variables defined in your .env files, you need to install dotenv, see https://vike.dev/env
Expand All @@ -9,11 +9,11 @@
// - See vavite + vite-pugin-ssr examples at https://github.com/cyco130/vavite/tree/main/examples
// - vite-node (https://github.com/antfu/vite-node)
// - HatTip (https://github.com/hattipjs/hattip)
// - You can use Bati (https://batijs.github.io/) to scaffold a vite-plugin-ssr + HatTip app. Note that Bati generates apps that use the V1 design (https://vike.dev/migration/v1-design) and Vike packages (https://vike.dev/vike-packages)
// - You can use Bati (https://batijs.github.io/) to scaffold a vike + HatTip app. Note that Bati generates apps that use the V1 design (https://vike.dev/migration/v1-design) and Vike packages (https://vike.dev/vike-packages)

import express from 'express'
import compression from 'compression'
import { renderPage } from 'vite-plugin-ssr/server'
import { renderPage } from 'vike/server'
import { root } from './root.js'
const isProduction = process.env.NODE_ENV === 'production'

Expand Down Expand Up @@ -48,7 +48,7 @@ async function startServer() {
// Other middlewares (e.g. some RPC middleware such as Telefunc)
// ...

// Vite-plugin-ssr middleware. It should always be our last middleware (because it's a
// Vike middleware. It should always be our last middleware (because it's a
// catch-all middleware superseding any middleware placed after it).
app.get('*', async (req, res, next) => {
const pageContextInit = {
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-react-ts/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import react from '@vitejs/plugin-react'
import ssr from 'vite-plugin-ssr/plugin'
import ssr from 'vike/plugin'
import { UserConfig } from 'vite'

const config: UserConfig = {
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-dom": "^18.2.0",
"sirv": "^2.0.3",
"vite": "^4.4.9",
"vite-plugin-ssr": "^0.4.142"
"vike": "^0.4.142"
},
"type": "module"
}
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-react/pages/about/index.page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Page() {
<>
<h1>About</h1>
<p>
Example of using <code>vite-plugin-ssr</code>.
Example of using <code>vike</code>.
</p>
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const passToClient = ['pageProps', 'urlPathname']

import ReactDOMServer from 'react-dom/server'
import { PageShell } from './PageShell'
import { escapeInject, dangerouslySkipEscape } from 'vite-plugin-ssr/server'
import { escapeInject, dangerouslySkipEscape } from 'vike/server'
import logoUrl from './logo.svg'

async function render(pageContext) {
Expand All @@ -20,7 +20,7 @@ async function render(pageContext) {
// See https://vike.dev/head
const { documentProps } = pageContext.exports
const title = (documentProps && documentProps.title) || 'Vite SSR app'
const desc = (documentProps && documentProps.description) || 'App using Vite + vite-plugin-ssr'
const desc = (documentProps && documentProps.description) || 'App using Vite + vike'

const documentHtml = escapeInject`<!DOCTYPE html>
<html lang="en">
Expand Down
8 changes: 4 additions & 4 deletions boilerplates/boilerplate-react/server/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file isn't processed by Vite, see https://github.com/brillout/vite-plugin-ssr/issues/562
// This file isn't processed by Vite, see https://github.com/brillout/vike/issues/562
// Consequently:
// - When changing this file, you needed to manually restart your server for your changes to take effect.
// - To use your environment variables defined in your .env files, you need to install dotenv, see https://vike.dev/env
Expand All @@ -9,11 +9,11 @@
// - See vavite + vite-pugin-ssr examples at https://github.com/cyco130/vavite/tree/main/examples
// - vite-node (https://github.com/antfu/vite-node)
// - HatTip (https://github.com/hattipjs/hattip)
// - You can use Bati (https://batijs.github.io/) to scaffold a vite-plugin-ssr + HatTip app. Note that Bati generates apps that use the V1 design (https://vike.dev/migration/v1-design) and Vike packages (https://vike.dev/vike-packages)
// - You can use Bati (https://batijs.github.io/) to scaffold a vike + HatTip app. Note that Bati generates apps that use the V1 design (https://vike.dev/migration/v1-design) and Vike packages (https://vike.dev/vike-packages)

import express from 'express'
import compression from 'compression'
import { renderPage } from 'vite-plugin-ssr/server'
import { renderPage } from 'vike/server'
import { root } from './root.js'
const isProduction = process.env.NODE_ENV === 'production'

Expand Down Expand Up @@ -48,7 +48,7 @@ async function startServer() {
// Other middlewares (e.g. some RPC middleware such as Telefunc)
// ...

// Vite-plugin-ssr middleware. It should always be our last middleware (because it's a
// Vike middleware. It should always be our last middleware (because it's a
// catch-all middleware superseding any middleware placed after it).
app.get('*', async (req, res, next) => {
const pageContextInit = {
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-react/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import react from '@vitejs/plugin-react'
import ssr from 'vite-plugin-ssr/plugin'
import ssr from 'vike/plugin'

export default {
plugins: [react(), ssr()]
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vite-plugin-ssr": "^0.4.142",
"vike": "^0.4.142",
"vue": "^3.3.4"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-vue-ts/pages/about/index.page.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<h1>About</h1>
<p>Example of app using <code>vite-plugin-ssr</code>.</p>
<p>Example of app using <code>vike</code>.</p>
</template>

<style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const passToClient = ['pageProps', 'urlPathname']

import { renderToString as renderToString_ } from '@vue/server-renderer'
import type { App } from 'vue'
import { escapeInject, dangerouslySkipEscape } from 'vite-plugin-ssr/server'
import { escapeInject, dangerouslySkipEscape } from 'vike/server'
import { createApp } from './app'
import logoUrl from './logo.svg'
import type { PageContextServer } from './types'
Expand All @@ -20,7 +20,7 @@ async function render(pageContext: PageContextServer) {
// See https://vike.dev/head
const { documentProps } = pageContext.exports
const title = (documentProps && documentProps.title) || 'Vite SSR app'
const desc = (documentProps && documentProps.description) || 'App using Vite + vite-plugin-ssr'
const desc = (documentProps && documentProps.description) || 'App using Vite + vike'

const documentHtml = escapeInject`<!DOCTYPE html>
<html lang="en">
Expand Down
2 changes: 1 addition & 1 deletion boilerplates/boilerplate-vue-ts/renderer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {
// When using Server Routing
PageContextBuiltInClientWithServerRouting as PageContextBuiltInClient
//*/
} from 'vite-plugin-ssr/types'
} from 'vike/types'
import type { ComponentPublicInstance } from 'vue'

type Component = ComponentPublicInstance // https://stackoverflow.com/questions/63985658/how-to-type-vue-instance-out-of-definecomponent-in-vue-3/63986086#63986086
Expand Down
8 changes: 4 additions & 4 deletions boilerplates/boilerplate-vue-ts/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file isn't processed by Vite, see https://github.com/brillout/vite-plugin-ssr/issues/562
// This file isn't processed by Vite, see https://github.com/brillout/vike/issues/562
// Consequently:
// - When changing this file, you needed to manually restart your server for your changes to take effect.
// - To use your environment variables defined in your .env files, you need to install dotenv, see https://vike.dev/env
Expand All @@ -9,11 +9,11 @@
// - See vavite + vite-pugin-ssr examples at https://github.com/cyco130/vavite/tree/main/examples
// - vite-node (https://github.com/antfu/vite-node)
// - HatTip (https://github.com/hattipjs/hattip)
// - You can use Bati (https://batijs.github.io/) to scaffold a vite-plugin-ssr + HatTip app. Note that Bati generates apps that use the V1 design (https://vike.dev/migration/v1-design) and Vike packages (https://vike.dev/vike-packages)
// - You can use Bati (https://batijs.github.io/) to scaffold a vike + HatTip app. Note that Bati generates apps that use the V1 design (https://vike.dev/migration/v1-design) and Vike packages (https://vike.dev/vike-packages)

import express from 'express'
import compression from 'compression'
import { renderPage } from 'vite-plugin-ssr/server'
import { renderPage } from 'vike/server'
import { root } from './root.js'
const isProduction = process.env.NODE_ENV === 'production'

Expand Down Expand Up @@ -48,7 +48,7 @@ async function startServer() {
// Other middlewares (e.g. some RPC middleware such as Telefunc)
// ...

// Vite-plugin-ssr middleware. It should always be our last middleware (because it's a
// Vike middleware. It should always be our last middleware (because it's a
// catch-all middleware superseding any middleware placed after it).
app.get('*', async (req, res, next) => {
const pageContextInit = {
Expand Down
Loading

0 comments on commit 202566e

Please sign in to comment.