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

@informaticon/lib.nodejs.base.template

v0.1.0

Published

Informaticon Typescript and SCSS library

Downloads

6

Readme

lib.nodejs.base.template

Commitizen friendly

This package contains everything frontend-related of our informaticon template. This package is published to npm as @information/lib.nodejs.base.template. It is a new version of the @informaticon/base-assets package (Guide for migration).

Prerequisites

Your project is already prepared to use npm packages, and you already have a bundler like Webpack, Rollup, or something similar set up.

If you are unsure on how to set that up in a Play! project, check out the internal Using Webpack with Play! Framework guide.

Contributions

Please see CONTRIBUTING.md for information on contributions to this package.

Usage

  • add the lib.play.base.template dependency in your project. Please see the README for more information.

    :handshake: Compatibility

    | Version | lib.play.base.template | | -------- | ------------------------ | | 0.1.0+ | 1.0.0+ |

  • install the package via npm

    npm i @informaticon/lib.nodejs.base.template -D
  • import and init components used in your application

    The needed stylesheets are already imported via the InfComponents

    import { InfNotification } from '@informaticon/lib.nodejs.base.template/notification';
    import { InfCollapsible } from '@informaticon/lib.nodejs.base.template/collapsible';
    import { InfConfirm } from '@informaticon/lib.nodejs.base.template/confirm';
    import { InfDialog } from '@informaticon/lib.nodejs.base.template/dialog';
    import { InfNavToggle } from '@informaticon/lib.nodejs.base.template/nav';
    import { InfPopup } from '@informaticon/lib.nodejs.base.template/popup';
    import { InfTabulator } from '@informaticon/lib.nodejs.base.template/table';
    import { InfTour } from '@informaticon/lib.nodejs.base.template/tour';
    import { ChoicesController } from '@informaticon/lib.nodejs.base.template/choices';
    import '../stylesheets/main.scss';
    
    export class Loader {
    	constructor() {
    		document.addEventListener('DOMContentLoaded', () => this.ready());
    	}
    
    	private ready(): void {
    		let collapsibles: InfCollapsible[] = InfCollapsible.init();
    		let confirms: Map<string, InfConfirm> = InfConfirm.init();
    		let dialogs: InfDialog[] = InfDialog.init();
    		let navToggle: InfNavToggle = InfNavToggle.init();
    		let popups: InfPopup[] = InfPopup.init();
    		let tabulators: InfTabulator[] = InfTabulator.init();
    		let tours: Map<string, InfTour> = InfTour.init();
    
    		new ChoicesController().ready();
    
    		// the noficiation don't have to be initalized
    		InfNotification.showInfo('Hello World!');
    	}
    }
    new Loader();

    The init functions provide a Map<> structure where you can access the specific item for components that are identified by a specific name, other components are simply returned as an array of components.

  • add the main stylesheet to enable informaticon layout in your main.css file

    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/layout/main.css';

    You can overwrite CSS3 variables if you reassign them after this import.

    :bulb: Importing scss instead of compiled css
    You can also import the source SCSS code instead of the compiled CSS:

    @import "~@informaticon/lib.nodejs.base.template/dist/stylesheets/layout/main.scss";

    It's recommended to use the compiled CSS and the CSS3 variables instead of the SCSS source though.

  • you can add more stylesheets for elements:

    //if you want to use the scss functions you have to import them as scss
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/util/mixins.scss';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/util/functions.scss';
    
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/input.css';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/datepicker.css';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/button.css';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/card.css';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/code.css';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/hr.css';
    @import '~@informaticon/lib.nodejs.base.template/dist/stylesheets/elements/tree.css';