Skip to content

Commit

Permalink
Add GH Actions test workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmacarthur committed Sep 30, 2022
1 parent f79f539 commit 4901249
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It's an increasingly common pattern to independently develop small applications

This plugin swaps out your local `index.html` file for a public page of your choosing. You'll get the UI, styles, and other assets just as if you were on the actual page, but still get to keep the snappy developer experience of a typical Vite setup.

\*\*\*\*## Installation
## Installation

`npm install vite-plugin-proxy-page`

Expand Down Expand Up @@ -81,7 +81,7 @@ Using this example, a new `<div id="app"></div>` node will be prepended to the `
| `remoteUrl` | The full URL of the page you want proxy. Ex: "https://example-site.com/my-page" | `true` |
| `remoteEntryPoint` | A RegExp or string of the deployed bundle URL. If this is set, the script tag loading that bundle will be removed from the proxied page's HTML in order to prevent unexpected bundle collisions with your local version. Ex: "./production-bundle.js" or /\./production-bundle\.js/ | `false` |
| `rootNode` | An object for specifying the HTML ID of the node you'd like to inject on to the page (`id`), as well as a CSS selector for where you'd like to prepend it (the default is the body). Ex: `{ id: "myApp", prependTo: ".ArticleContent" }`. | `false` |
| `cacheHtml` | Determines whether the remote HTML will be cached in memory while your Vite server runs, rather than refetching after each page refresh or local code change. By default, this is set to `true`. | `false` |
| `cacheHtml` | Determines whether the remote HTML will be cached in memory while your Vite server runs, rather than refetching after each page reload or local code change. By default, this is set to `true`. | `false` |

## Contributions

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-proxy-page",
"version": "0.1.2",
"version": "0.2.0",
"license": "MIT",
"author": "Alex MacArthur (https://macarthur.me)",
"homepage": "https://macarthur.me/posts/project-local-spa-onto-production-page",
Expand Down

0 comments on commit 4901249

Please sign in to comment.