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

@jiayihu/bdi-ui

v3.0.11

Published

BDI Angular UI components

Downloads

48

Readme

Codeship

Table of contents

Usage

AngularUI is based on Bootstrap 4 and other vendor CSS. You must import the uikit-vendor.css file located in /dist/uikit-vendor.css.

For example with angular-cli add the following line to angular-cli.json:

"styles": [
  "../node_modules/@bdi/bdi-ui/dist/uikit-vendor.css"
]

Or if you use Webpack add the following line to your index.ts:

require('@bdi/bdi-ui/dist/uikit-vendor.css');

To use AngularUI components, please import it to the application’s module by specifying AngularUIModule.forRoot() at import parameter of @NgModule. AngularUI components will not render properly if AngularUIModule is not loaded.

AngularUIModule.forRoot() must be called only once in your application. Other NgModules in the application have to import only imports: [AngularUIModule].

import { BrowserModule } from '@angular/platform-browser';
import { NgModule} from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppComponent } from './app.component';
+ import { AngularUIModule } from 'angular-ui';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
+   AngularUIModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Modular usage

You can also import only used NgModules in your application, instead of full AngularUIModule, making the bundle size much smaller because only used modules will be included in the final bundle.
For instance, if you use only the BtnComponent, AccordionComponent and TabviewComponent you can do this in your app NgModule:

import { BDIBtnModule } from '@bdi/bdi-ui/dist/btn/btn.module';
import { BDIAccordionModule } from '@bdi/bdi-ui/dist/accordion/accordion.module';
import { BDITabViewModule } from '@bdi/bdi-ui/dist/tab-view/tab-view.module';

@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    BDIBtnModule.forRoot(),
    BDIAccordionModule.forRoot(),
    BDITabViewModule.forRoot()
  ]
})
export class AppModule { }

This usage does not dependend on tree-shaking and you can use the latter for even smaller bundles.


Development

Development of the UIKit requires npm@3 and [email protected] at least.

Run examples application

npm install

# This command will show a description for every available npm scripts
npm run info

npm start # This will just run the development server

An application with playground examples for AngularUI components will be available at http://localhost:3001/.

More info for development can be found at Guides.


Build and publish updates

Go to root folder:

npm version patch # Choose between major/minor/patch. Will also create a new git tag.
npm publish # The build script will be automatically ran before publishing
git push # Push the commits with the new version
git push --tags # Push the new git tag to the server