Frontend for Miracle TV
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dale 71f32ef097
feat: Skeleton layout
1 month ago
.storybook feat: failed storybook, grid 1 month ago
public init 2 months ago
src feat: Skeleton layout 1 month ago
tests/unit init 2 months ago
.browserslistrc init 2 months ago
.editorconfig init 2 months ago
.envrc Nix-ready package 2 months ago
.eslintrc.js init 2 months ago
.gitignore feat: Added storybook 1 month ago
README.md misc: Update README.md 1 month ago
default.nix feat: Skeleton layout 1 month ago
package.json feat: Skeleton layout 1 month ago
shell.nix feat: Added storybook 1 month ago
tsconfig.json init 2 months ago
vue.config.js feat: Added storybook 1 month ago
yarn.lock feat: Skeleton layout 1 month ago
yarn.nix feat: Skeleton layout 1 month ago

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