0.11.0-rc.8 • Published 3 years ago

bz-genome-angular v0.11.0-rc.8

Weekly downloads
258
License
-
Repository
-
Last release
3 years ago

Genome components

Install

Developers can easily install Bzg Components using NPM.

First install or update your global angular-cli tools:

# First install angular-cli tools:
npm uninstall -g angular-cli
npm cache clean
npm install -g @angular/cli@latest

Add the feed to your project, create a file next to package.json named .npmrc, and include this lines

use the appropriate token for this step

registry=https://bizagidev.pkgs.visualstudio.com/_packaging/angular-bzg-components/npm/registry/
always-auth=true
; Treat this auth token like a password.
; begin auth token
//bizagidev.pkgs.visualstudio.com/_packaging/angular-bzg-components/npm/registry/:_authToken=XXXXXX
//bizagidev.pkgs.visualstudio.com/_packaging/angular-bzg-components/npm/:_authToken=XXXXXX
; end auth token

Configure you local environment to authenticate with the feed

npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false

This step asks you for your credentials

vsts-npm-auth -config .npmrc

Install bzg-components with npm

npm install --save bz-genome-angular @angular/cdk masonry-layout

Include the Module in you project

import { BzgCommonsModule } from 'bz-genome-angular';
 imports: [
    BrowserModule,
    BzgComponentsModule.forRoot()
  ],

The module of your application should look like this

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import {BzgCommonsModule} from 'bz-genome-angular';

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

Finally you can use the different components offered by the library

<bzg-header [srcLogo]="'assets/sprite.svg#logo-bzg'"
            [srcIcon]="'assets/sprite.svg#clock'"
            [tagText]="'My App'"
            [styleConfig]="{}">
  <bzg-user [email]="'scott.austin@mail.com'"
            [fullName]="'Scott Austin'"
            [styleConfig]="{}">
  </bzg-user>
</bzg-header>


<bzg-icon [srcIcon]="'assets/sprite.svg#headphones'"
          [size]="100">
</bzg-icon>

<bzg-icon [nameIcon]="'align-middle'"
          [size]="100">  
</bzg-icon>


<bzg-button [text]="'This is my button'"
            [srcIcon]="'assets/sprite.svg#headphones'">
</bzg-button>


 <bzg-combo id="MyCombo"
            formControlName="MyCombo"
            [listData]="myOptions"
            [displayField]="'name'"
            [valueField]="'value'">
 </bzg-combo>

Parallel development setup

If you want to create more components in the library or make changes to the components, it may be useful to use the consumer application as a testing environment, with the help of a symbolic link you can use the components folder within the project of consumer application

1) Enable compilerOptions.paths in /src/tsconfig.app.json

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "baseUrl": "./",                //  <<<< add this
    "module": "es2015",
    "types": [],
    "paths": {
      "bzg-components": ["app/bzg-components/bzg-components.module"]         //  <<<< add this
    }
  },
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}

2) Create symbolic link with:

mklink /J "target folder" "{your-path}\genome-components\src\app\bzg-components"

3) Run your project, if something like "Module build failed: Error: {your path}/bzg-components.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property." error arises, you need to add the option preserveSymlinks to your build in your angular-cli.json (Angular 5) or angular.json (Angular 6) file.

//Angular 5 - angular-cli.json
"defaults": {
  "build": {
    "preserveSymlinks": true //   <<<< add this
  },
  "styleExt": "scss",
  "component": {
  }
}

//Angular 6 - angular.json
"architect": {
  "build": {
    "options": {
      "preserveSymlinks": true //   <<<< add this
    },
  },
}
0.11.0-rc.8

3 years ago

0.11.0-rc.7

3 years ago

0.11.0-rc.6

3 years ago

0.11.0-rc.5

3 years ago

0.11.0-rc.4

3 years ago

0.11.0-rc.2

3 years ago

0.11.0-rc.3

3 years ago

0.10.1-beta.6

3 years ago

0.10.1-beta.5

3 years ago

0.10.1-beta.4

3 years ago

0.11.0-rc.1

3 years ago

0.10.0

3 years ago

0.10.0-rc.9

3 years ago

0.10.0-rc.8

3 years ago

0.10.1-beta.2

3 years ago

0.10.1-beta.1

3 years ago

0.10.1-beta.3

3 years ago

0.10.0-rc.7

3 years ago

0.10.0-rc.5

3 years ago

0.10.0-rc.4

3 years ago

0.10.0-rc.3

4 years ago

0.10.0-rc.2

4 years ago

0.10.0-rc.1

4 years ago

0.9.0

4 years ago

0.9.0-rc.38

4 years ago

0.9.0-rc.36

4 years ago

0.9.0-rc.37

4 years ago

0.9.0-rc.35

4 years ago

0.9.0-rc.34

4 years ago

0.9.0-rc.33

4 years ago

0.9.0-rc.32

4 years ago

0.9.0-rc.31

4 years ago

0.9.0-rc.29

4 years ago

0.9.0-rc.30

4 years ago

0.9.0-rc.28

4 years ago

0.9.0-rc.27

4 years ago

0.9.0-rc.26

4 years ago

0.9.0-rc.25

4 years ago

0.9.0-rc.24

4 years ago

0.9.0-rc.23

4 years ago

0.9.0-rc.22

4 years ago

0.9.0-rc.21

4 years ago

0.9.0-rc.20

4 years ago

0.9.0-rc.19

4 years ago

0.9.0-rc.18

4 years ago

0.9.0-rc.16

4 years ago

0.9.0-rc.17

4 years ago

0.9.0-rc.14

4 years ago

0.9.0-rc.15

4 years ago

0.9.0-rc.11

4 years ago

0.9.0-rc.12

4 years ago

0.9.0-rc.13

4 years ago

0.9.0-rc.9

4 years ago

0.9.0-rc.10

4 years ago

0.9.0-rc.8

4 years ago

0.9.0-rc.7

4 years ago

0.9.0-rc.6

4 years ago

0.9.0-rc.5

4 years ago

0.9.0-rc.4

4 years ago

0.9.0-rc.2

4 years ago

0.9.0-rc.3

4 years ago

0.9.0-rc.1

4 years ago

0.8.0

4 years ago

0.8.0-rc.59

4 years ago

0.8.0-rc.58

4 years ago

0.8.0-rc.57

4 years ago

0.8.0-rc.56

4 years ago

0.8.0-rc.54

4 years ago

0.8.0-rc.52

4 years ago

0.8.0-rc.53

4 years ago

0.8.0-rc.51

4 years ago

0.8.0-rc.50

4 years ago

0.8.0-rc.49

4 years ago

0.8.0-rc.48

4 years ago

0.8.0-rc.47

4 years ago

0.8.0-rc.46

4 years ago

0.8.0-rc.45

4 years ago

0.8.0-rc.44

4 years ago

0.8.0-rc.43

4 years ago

0.8.0-rc.42

4 years ago

0.8.0-rc.41

4 years ago

0.8.0-rc.40

4 years ago

0.8.0-rc.39

4 years ago

0.8.0-rc.38

4 years ago

0.8.0-rc.37

4 years ago

0.8.0-rc.36

4 years ago

0.6.0-rc.11

5 years ago

0.6.0-rc.5

5 years ago

0.6.0-rc.4

5 years ago

0.6.0-rc.3

5 years ago