Skip to content

molior-dbs/molior-web

Repository files navigation

molior-web

The purpose of molior is to build Debian packages out of git repositories based on a mirror of a specific Debian version and therefore creating reproducible builds. Build environments are structured into projects and versions, which may include mirrors and versions of other projects.

Molior performs the following tasks:
<ul>
    <li>create mirrors of Debian repositories</li>
    <li>create projects based on a Debian mirror, include dependencies to other projects or mirrors</li>
    <li>build packages into project repositories (i386, amd64, armhf, arm64)</li>
    <li>create deployments of projects (ISO Installer, VirtualBox, images, ...)</li>
</ul>

Frontend

Requirements

  • NodeJS (>=6.0)
  • npm

Development

For frontend development VSCode is recommended (but not needed).

Login into Development Environment

  1. Open your vagrant box

Clone the molior repo (not this repo here) and run the following commands in it:

vagrant up molior
vagrant ssh molior

Then run:

cd molior-web
  1. Run Webpack in watch mode inside vagrant box.

Everytime when you change a file, webpack will automatically compile the application and copies the files to the /var/www/molior-web

npm run dev-server

Linter

Run the following command, to check the HTML & JavaScript code. Always check the linter, before committing!

npm run lint

ngdoc

sTo generate the documentation, run the following command.

View the documentation with SimpleHTTPServer (Python required).

cd doc/molior-web/
python -m SimpleHTTPServer 8000

Style Guide

Try to follow this style guide good as possible

Test

Run

Development

Runs the tests in Chrome Headless and Google Chrome in watch mode. Thats means everytime a file change gets detected, the tests will run automatically again.

npm test

Production

Runs the tests once in Chrome Headless.

npm run test-production

Technologies

  • Jasmine Behaviour driven JavaScript testing framework
  • Mocha JavaScript Test Runner
  • Google Chrome Google Chrome for development testing
  • Karma Coverage Keeps track of the testcoverage
  • Babel Precompiles ES6 to ES5. Because PhantomJS does not support ES6 at the moment