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 месец
.storybook feat: failed storybook, grid преди 1 месец
public init преди 2 месеца
src feat: Skeleton layout преди 1 месец
tests/unit init преди 2 месеца
.browserslistrc init преди 2 месеца
.editorconfig init преди 2 месеца
.envrc Nix-ready package преди 2 месеца
.eslintrc.js init преди 2 месеца
.gitignore feat: Added storybook преди 1 месец
README.md misc: Update README.md преди 1 месец
default.nix feat: Skeleton layout преди 1 месец
package.json feat: Skeleton layout преди 1 месец
shell.nix feat: Added storybook преди 1 месец
tsconfig.json init преди 2 месеца
vue.config.js feat: Added storybook преди 1 месец
yarn.lock feat: Skeleton layout преди 1 месец
yarn.nix feat: Skeleton layout преди 1 месец

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