Skip to content

Commit

Permalink
Remove copyAssets()
Browse files Browse the repository at this point in the history
  • Loading branch information
ModelEarth committed Sep 24, 2024
1 parent 136b697 commit 25865b3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,20 @@ The Feed-Player interface that is both visually appealing and intuitive to use.

## Getting Started

Fork our two repos (localsite and feed) and clone into your webroot
To contribute, fork our [four primary repos](https://github.com/ModelEarth?tab=repositories) and clone into your webroot:

git clone https://github.com/[your account]/localsite.git
git clone https://github.com/[your account]/feed.git
git clone https://github.com/[your account]/swiper.git
git clone https://github.com/[your account]/home.git

### Folders in your website root

```ini
website
├─ home
├─ localsite
├─ swiper
└─ feed
├─ README.md
├─ dist
Expand All @@ -105,16 +109,10 @@ website
### Start a web server in your webroot

```
python3 -m venv env
source env/bin/activate
python -m http.server 8887
```

On Windows, the second line is:

env\Scripts\activate

### The primary pages will be visible here:
### The primary FeedPlayer pages will be visible here:

[Feed Player - localhost:8887/feed](http://localhost:8887/feed/)
[Feed View - localhost:8887/feed/view](http://localhost:8887/feed/view/)
Expand Down Expand Up @@ -160,7 +158,7 @@ yarn install --immutable --immutable-cache --check-cache
The command above requires yarn 2 and prevents third-parties from altering the checked-in packages before submitting them. [Source](https://stackoverflow.com/questions/58482655/what-is-the-closest-to-npm-ci-in-yarn).
It's the equivalent to `npm ci` to avoid updating package-lock.json, which occurs with `npm install`.

### 3. Start the development server
### 3. Start a development server (optional)

<!--Skip this step. Port 5173 does not currently work because the files are looking for a base path containing "feed".-->

Expand Down
3 changes: 1 addition & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">

<head>
<!-- feedplayer.html is sent to dist/index.html during Yarn Build -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="./assets/site.webmanifest">
Expand All @@ -21,7 +21,6 @@
</head>

<body>
<!-- template.html is sent to dist/index.html -->
<div id="root"></div>

<div class="content contentpadding large-list" style="padding-top:10px">
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

<body>

<!-- Yarn Dev is still using index.html.
Change it to use feedplayer.html like Yarn Build does. -->
<div id="root" style="text-align: center;line-height: 0px;"><img src="src/assets/images/intro-a.jpg" style="border-radius:20px;"><div style="margin-top:20px;z-index:1000">Broken by build. Manually update the index .js and .css files to include the newly built ID values.</div></div>

<div class="content contentpadding large-list" style="padding-top:0px">
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "video-player",
"private": true,
"version": "0.0.0",
"name": "feed-player",
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build --config vite.config.js && node postBuild.js",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
Expand All @@ -29,8 +28,6 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"vite": "^5.4.2",
"vite-plugin-copy": "^0.1.6",
"vite-plugin-static-copy": "^1.0.6"
"vite": "^5.4.2"
}
}
2 changes: 0 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import copyAssets from './vite-plugin-copy';
import fs from 'fs';
import path from 'path';

export default defineConfig({
plugins: [
react(),
copyAssets(),
renameHtml() // Add the plugin here
],
base: '', // Otherwise '/assets' is the default
Expand Down

0 comments on commit 25865b3

Please sign in to comment.