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

t-systems-aurelia-components

v1.1.4

Published

Common useful components for the Aurelia framework

Downloads

189

Readme

Aurelia components

npm

Common useful components for the Aurelia Framework (https://aurelia.io)

Documentation

You can find the documentation within the source.

Install

npm install t-systems-aurelia-components --save

Use in your Aurelia project

Since this library doesn't provide any precompiled dist/ files, you need to reference the source code in your project.

Aurelia features

Open main.ts

aurelia.use
    .globalResources([
        PLATFORM.moduleName('t-systems-aurelia-components/src/value-converters/date-format-value-converter'),
    ])

Direct imports

import {CacheService} from "t-systems-aurelia-components/src/service/cache-service";

Locale related features

Some extensions like date-format-value-converter or currency-value-converter support localization. To change their internal locale, use the aurelia-i18n library.

import {I18N} from 'aurelia-i18n';
import {autoinject} from 'aurelia-framework';

@autoinject()
export class App {
    constructor(
        private readonly _i18n:I18N
    ) {
        this._i18n.setLocale("en");
    }
}

Dependencies

Some of these libraries have dependencies which are not provided by this library, so please install them by yourself in your project.

npm install moment --save

If you want to use the sanitize-html-html-sanitizer value-converter:

npm install sanitize-html --save

Publish this library to NPM

  1. Enable 2FA in your account
  2. Login as user (not as organisation)
    npm login
  3. Change version in package.json
  4. Run
    npm publish

Developing with this library

You can develop and bundling with this library directly by adding the library repository as dependency:

git clone https://github.com/telekom-mms/aurelia-components.git t-system-aurelia-components

cd your-project
npm install ../t-systems-aurelia-components

In this case you may need to install the library's dependencies first:

cd t-systems-aurelia-components
npm install [email protected]

Unit tests

Run jest tests with

npm test

If tests are finished an HTML report is opened automatically.

References

  • Build and publish: https://medium.com/cameron-nokes/the-30-second-guide-to-publishing-a-typescript-package-to-npm-89d93ff7bccd
  • https://lerna.js.org/
  • Typescript unit testing: https://www.testim.io/blog/typescript-unit-testing-101/