Frontend for Miracle TV
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Dale 71f32ef097
feat: Skeleton layout
hace 1 mes
.storybook feat: failed storybook, grid hace 1 mes
public init hace 2 meses
src feat: Skeleton layout hace 1 mes
tests/unit init hace 2 meses
.browserslistrc init hace 2 meses
.editorconfig init hace 2 meses
.envrc Nix-ready package hace 2 meses
.eslintrc.js init hace 2 meses
.gitignore feat: Added storybook hace 1 mes
README.md misc: Update README.md hace 1 mes
default.nix feat: Skeleton layout hace 1 mes
package.json feat: Skeleton layout hace 1 mes
shell.nix feat: Added storybook hace 1 mes
tsconfig.json init hace 2 meses
vue.config.js feat: Added storybook hace 1 mes
yarn.lock feat: Skeleton layout hace 1 mes
yarn.nix feat: Skeleton layout hace 1 mes

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