6.0.1 • Published 7 years ago

ng-library-builder v6.0.1

Weekly downloads
183
License
-
Repository
github
Last release
7 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

7 years ago

0.0.30

7 years ago

0.0.29

7 years ago

0.0.28

7 years ago

0.0.25

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago