Jellyfin-web: [Feature Request] [Documentation] Getting started developing

Created on 17 Sep 2019  路  3Comments  路  Source: jellyfin/jellyfin-web

Description
I think it would be extremely helpful if there was a CONTRIBUTING.md or README.md that explained clear steps on how to develop the jellyfin-web with a local server. Do we copy the main directory? The dist folder? Where do we copy? Etc.

This should help attract new developers as the setup is daunting with no documentation (except for the good docs on the main jellyfin server setup).

I figured this would fit better here rather than the feathub.

bug good first issue

Most helpful comment

Since https://github.com/jellyfin/jellyfin-web/pull/605 is merged,it's not required anymore to rebuild on every change - you can fire up the webpack dev server using yarn serve and open http://localhost:8080, select a backend server and change files - webpack will reload automatically.

All 3 comments

I really want to make some improvements to simplify this going forward, but here is my current process to run an instance of the website locally and connect to an existing Jellyfin server.

  1. Fork and clone this repository.
  2. Run yarn install.
  3. Apply this patch to enable multiserver support and make the necessary changes to index.html to load the main scripts.
  4. Start a web server hosting the static files in dist/. PHP and Python include servers that you can use for this anything that can server static files will work. I use cd dist && sudo python3 -m http.server 80 (sudo is needed to bind to port 80 on my operating system).
  5. Open the site in a browser. In the case above this would just be at http://localhost. The loading spinner will continue to display, but proceed to select "Change Server" then "Add Server" and add your Jellyfin server url.
  6. Make changes to the web source.
  7. Run yarn build.
  8. Refresh to view changes in browser.

my setup with vsc lock like this
1.Fork and clone jellyfin repository
2.open it with vsc workspace
3.add jellyfin-web submodule in to workspace

  1. jellyfin.Server/Program.cs change this
    webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web", "src"); to webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web", "dist");
    and this to
    MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj change this
    <None Include="jellyfin-web\src\**\*.*"> to <None Include="jellyfin-web\dist\**\*.*">
    5.open jellyfin-web in vsc terminal
    6.yarn install
    7.yarn run build
    note: every time you change code must run yarn run build
    8.start debugging

Since https://github.com/jellyfin/jellyfin-web/pull/605 is merged,it's not required anymore to rebuild on every change - you can fire up the webpack dev server using yarn serve and open http://localhost:8080, select a backend server and change files - webpack will reload automatically.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chnaski picture chnaski  路  3Comments

mooninite picture mooninite  路  7Comments

JonnyHaystack picture JonnyHaystack  路  5Comments

AndreCarvalho picture AndreCarvalho  路  6Comments

Steve0w3n picture Steve0w3n  路  6Comments