6.0.1 • Published 6 years ago

ng-library-builder v6.0.1

Weekly downloads
183
License
-
Repository
github
Last release
6 years ago

Why not using ng-packagr?

ng-packagr has really cool features and it implements Angular Package Format. Sadly, i could not make it work with lazy loading. If you don't need lazy loading go ahead and use it.

Folder structure and required files

-- your_library
    --src
        --app
            --demo.module.ts
        --index.ts
        --public_api.ts
    --package.json

public_api.ts

export {DemoComponent} from './app/demo.component/demo.component';
export {DemoPipe} from './app/demo.pipe';
export {DemoModule} from './app/demo.module';

index.ts

export * from './public_api';

Build

  1. add the path to lazy module in your package.json (relative to src folder)
  "lazy-module": "app/demo.module.ts",
  1. build the module
    ng-lb --rootDir path/to/your/source --outDir path/to/dist

Lazy loading usage

  1. include the package in src/tsconfig.app.json
"include": [
    "./",
    "../node_modules/@ng-library-builder/**/*.ts"
  ]
  1. configure the lazy route
const routes: Routes = [{
  path: 'lazy',
  loadChildren: '@ng-library-builder/demo-web-lib/app/demo.module#DemoModule'
}];

Demo

see demo-web-app and demo-web-lib

Note

Only scss is currently supported. If you use another preprocessors, please transpile your style to css before the build.

Thanks

Special thanks to angular-library-builder and ng-packagr.

6.0.1

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.25

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago