npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@universis/common

v15.3.1

Published

Universis - common directives and services

Downloads

397

Readme

@universis/common

Universis is a coordinated effort by Greek academic institutions to build a Student Information System as an open source platform. The target is to serve our common needs to support academic and administrative processes.

@universis/common package contains common components and services for building client applications for Universis project.

Usage

npm i @universis/common

Development

Import @universis/common as submodule in any angular cli project by replacing newProjectRoot as already configured in your angular.json

git submodule add https://gitlab.com/universis/common.git <newProjectRoot>/common

e.g.

git submodule add https://gitlab.com/universis/common.git projects/common

Add the following entries to tsconfig.app.json#compilerOptions.paths:

{
    "compilerOptions": {
        "paths": {
            "@universis/common/routing": [
                "<newProjectRoot>/common/routing/src/public_api"
            ],
            "@universis/common/testing": [
                "<newProjectRoot>/common/testing/src/public_api"
            ],
            "@universis/common": [
                "<newProjectRoot>/common/src/public_api"
            ]
            ...
        }
    }
}  

If you want to include @universis/common as an angular cli project, include the following section in angular.json under projects:

"projects": {
  "common": {
    "root": "<newProjectRoot>/common",
    "sourceRoot": "<newProjectRoot>/common/src",
    "projectType": "library",
    "prefix": "lib",
    "architect": {
      "build": {
        "builder": "@angular-devkit/build-ng-packagr:build",
        "options": {
          "tsConfig": "<newProjectRoot>/common/tsconfig.lib.json",
          "project": "<newProjectRoot>/common/ng-package.json"
        }
      },
      "test": {
        "builder": "@angular-devkit/build-angular:karma",
        "options": {
          "main": "<newProjectRoot>/common/src/test.ts",
          "polyfills": "<newProjectRoot>/common/src/polyfills.ts",
          "tsConfig": "<newProjectRoot>/common/tsconfig.spec.json",
          "karmaConfig": "<newProjectRoot>/common/karma.conf.js",
          "watch": false,
          "codeCoverage": true,
          "scripts": []
        }
      },
      "lint": {
        "builder": "@angular-devkit/build-angular:tslint",
        "options": {
          "tsConfig": [
            "<newProjectRoot>/common/tsconfig.lib.json",
            "<newProjectRoot>/common/tsconfig.spec.json"
          ],
          "exclude": [
            "**/node_modules/**"
          ]
        }
      }
    }
  },
  ...
}

Testing

Intro

In order to test @universis/common package, we use Karma as our test-runner and Jasmine as our testing framework. We also use Puppeteer, a high-level API to manipulate the dev-tools of any chromium based browser. You should keep in mind that puppeteer is a peer dependency of the whole project and should be placed in the parent directory of the repository universis.

Example

To run all of our tests simply run

ng test common

This will compile the common package and run our test suite in a ChromeHeadless browser with no sandbox.

Extra

You can also have a visual representation of the tests running by adding

      ChromeNoSandbox: {
        base: 'Chrome',
        flags: [
          '--no-sandbox',
          '--enable-logging=stderr',
          '--disable-web-security',
          '--disable-gpu',
          '--no-proxy-server'
        ]
      },

under the customLaunchers in packages/common/karma.conf.js