Frontend for Miracle TV
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
Dale 71f32ef097
feat: Skeleton layout
1 miesiąc temu
.storybook feat: failed storybook, grid 1 miesiąc temu
public init 2 miesięcy temu
src feat: Skeleton layout 1 miesiąc temu
tests/unit init 2 miesięcy temu
.browserslistrc init 2 miesięcy temu
.editorconfig init 2 miesięcy temu
.envrc Nix-ready package 2 miesięcy temu
.eslintrc.js init 2 miesięcy temu
.gitignore feat: Added storybook 1 miesiąc temu
README.md misc: Update README.md 1 miesiąc temu
default.nix feat: Skeleton layout 1 miesiąc temu
package.json feat: Skeleton layout 1 miesiąc temu
shell.nix feat: Added storybook 1 miesiąc temu
tsconfig.json init 2 miesięcy temu
vue.config.js feat: Added storybook 1 miesiąc temu
yarn.lock feat: Skeleton layout 1 miesiąc temu
yarn.nix feat: Skeleton layout 1 miesiąc temu

README.md

Miracle TV Frontend

Frontend portion of MiracleTV Suite.

Built with TypeScript, Vue and Nix.

This package is intended to work with

MiracleTV Backend and

MiracleTV Shared

Roadmap

Nix / NixOS

For Nix and NixOS users

Project setup

nix-shell

Alternatively, .envrc is available with use_nix for ease of access with direnv

Project build

nix-build

Will build the frontend and produce the following output:

  • dist/ - Containing all of the build output of yarn build
  • tarballs/${artifactName}.${version}.tar.gz - Tarball with contents of dist as an artifact, where artifactName is usually miracle-tv-frontend and version is typycally matching release version

Running as a package

Import this as a package and use it

let
    # Import package (some way i.e. save default.nix as ./miracle-tv-frontend.nix
    ...
    miracle-tv-frontend = import ./miracle-tv-frontend.nix;
    ...
in {
    ...
    location."/" = {
        # Use dist folder of built package as source for content
        # i.e. here in nginx location block
        root = "${miracle-tv-frontend}/dist";
    };
    ...
};

General Instructions

For every common distro, ensure you're using NodeJS >14.0 and yarn with the same Node version.

Common Procedure

  • Project setup yarn install
  • Compile and hot-reloads for development yarn serve
  • Compile and minify for production yarn build
  • Run your unit tests yarn test:unit
  • Lint and fix files yarn lint
  • Customize configuration (See Configuration Reference).

Contribution Checklist

Nix / NixOS

  • Make sure that nix-build produces usable output.
    1. An output is considered usable if ./result/dist contains desired frontend, i.e. if servable with http-server and functioning
  • If adding a new package, do not forget to generate new yarn.nix by running yarn2nix > yarn.nix
    1. yarn2nix should be available inside nix-shell
    2. A good idea is to run nix-collect-garbage && nix-build after that to make sure project builds

Other Distros

  • Make sure that yarn build produces usable output
    1. An output is considered usable if ./dist/ contains desired frontend, i.e. if servable with http-server and functioning
  • If adding a new package, mention that you cannot update yarn.nix when opening a pull-request
    1. Somebody should be able to update it and commit it into your pull-request or otherwise help you out