mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-01 14:33:38 +00:00
Move files to better locations and remove possibley out of date readme content
This commit is contained in:
parent
0d3990fffa
commit
bd797873f4
23 changed files with 6 additions and 68 deletions
66
README.md
66
README.md
|
|
@ -31,7 +31,7 @@ This repository contains a number of different things:
|
|||
|
||||
1. `packages/webamp`: The code for the [Webamp NPM module](https://www.npmjs.com/package/webamp)
|
||||
2. `packages/webamp/demo`: The code for the demo site which lives at [webamp.org](https://webamp.org), see the next section for more details
|
||||
3. `packages/webamp/examples`: A few small examples showing how to use the NPM module
|
||||
3. `examples`: A few small examples showing how to use the NPM module
|
||||
4. `packages/*`: A few small projects that are either related to Webamp, or may some day be a part of Webamp
|
||||
|
||||
## About the Demo Site
|
||||
|
|
@ -47,70 +47,6 @@ Additionally, it makes use of some private Webamp APIs to add the following func
|
|||
|
||||
- [Butterchun](https://github.com/jberg/butterchurn) integration to render [MilkDrop](https://en.wikipedia.org/wiki/MilkDrop) visualizations. We intend to make this part of the public API soon.
|
||||
- "Screenshot" mode `https://webamp.org/?screenshot=1` which can be used together with [Puppeteer](https://github.com/GoogleChrome/puppeteer) to automate the generation of Winamp skin screenshots
|
||||
-
|
||||
|
||||
## Development
|
||||
|
||||
I do most development by starting the demo site in dev mode and iterating that way. The following commands will install all dependencies, run an initial development build and then start a local server. Every time you save a file, it will rebuild the bundle and automatically refresh the page.
|
||||
|
||||
# Clone the repo
|
||||
cd webamp
|
||||
# __Note:__ Please use yarn over npm, since yarn will respect our `yarn.lock` file
|
||||
yarn install
|
||||
yarn start
|
||||
|
||||
`http://localhost:8080/` should automatically open in your browser.
|
||||
|
||||
# Run tests and lint checks
|
||||
yarn test
|
||||
|
||||
## Building the demo site (webamp.org)
|
||||
|
||||
To do an optimized build of the demo site, you can run:
|
||||
|
||||
yarn run build
|
||||
|
||||
If you wish to test this build locally, run:
|
||||
|
||||
yarn run serve
|
||||
|
||||
Then open the local ip/port that is output to the console in your browser.
|
||||
|
||||
## Building the NPM module
|
||||
|
||||
The NPM module is built separately from the demo site. To build it run:
|
||||
|
||||
yarn run build-library
|
||||
|
||||
This will write files to `./built`.
|
||||
|
||||
## Testing
|
||||
|
||||
yarn test
|
||||
|
||||
This will run the tests the linter and the type checker.
|
||||
|
||||
To update snapshots run
|
||||
|
||||
yarn test -u
|
||||
|
||||
## Deploying the Demo Site
|
||||
|
||||
[Netlify](https://www.netlify.com/) watches GitHub for new versions of master. When a new version is seen, it is automatically built using `npm run build` and pushed to the server. Additionally, Netlify will run a build on every pull request and include a link under the heading "Deploy preview ready!". This enables easy high level testing of pull requests.
|
||||
|
||||
In short, deploying should be as simple as pushing a commit to master.
|
||||
|
||||
Additionally, if you want to fork the project, deploying should be as simple as setting up a free Netlify account.
|
||||
|
||||
### Advanced Usage
|
||||
|
||||
There are some "feature flags" which you can manipulate by passing a specially crafted URL hash. Simply supply a JSON blob after the `#` of the URL to change these settings:
|
||||
|
||||
- `skinUrl` (string) Url of the default skin to use. Note, this file must be served with the correct Allows Origin header.
|
||||
- `audioUrl` (string) Url of the default audio file to use. Note, this file must be served with the correct Allows Origin header.
|
||||
- `initialState` (object) Override the [initial Redux state](js/reducers/index.ts). Values from this object will be recursively merged into the actual default state.
|
||||
|
||||
**Note:** These are intended mostly as development tools and are subject to change at any time.
|
||||
|
||||
## Community
|
||||
|
||||
|
|
|
|||
4
examples/parcel/index.js
Normal file
4
examples/parcel/index.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Webamp from "webamp";
|
||||
|
||||
const webamp = new Webamp();
|
||||
webamp.renderWhenReady(document.getElementById("app"));
|
||||
|
|
@ -4,6 +4,7 @@ This directory contains a number of examples of how to add Webamp to a project.
|
|||
|
||||
- [Minimal](./minimal) Stick Webamp in a `<script>` tag, and add a few lines of JavaScript to get Webamp on your page.
|
||||
- [Webpack](./webpack) Install Webamp via NPM and bundle it in a Webpack bundle.
|
||||
- [Parcel](./parcel) Install Webamp via NPM and bundle it in a Parcel bundle.
|
||||
- [Webpack Lazyload](./webpackLazyLoad) **In progress**
|
||||
- [Minimal Milkdrop](./minimalMilkdrop) **In progress**
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import Webamp from "webamp";
|
||||
|
||||
new Webamp({}).renderWhenReady(document.getElementById("app"));
|
||||
Loading…
Add table
Add a link
Reference in a new issue