ngx-library-builder
To produce FESM, ES5, UMD, SCSS compiled packages that allows production of packages which can be further consumed by TypeScript, ES6, SCSS (or CSS) based applications especially angular-cli library applications
Last updated 2 years ago by yogeshgadge .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ngx-library-builder 
SYNC missed versions from official npm registry.

ngx-library-builder

Custom build for angular library projects to produce FESM, ES5, ES6, Typings, inlined templates, resources URL

Prerequisites

--libDir must contain two files tsconfig.es5.json and tsconfig.lib.json

With the tsconfig.es5.json must have "target": "es5". And the tsconfig.lib.json must have "target": "es2015"

These must have angular compiler options flatModuleId and flatModuleOutFile as shown below.

"angularCompilerOptions": {
    "annotateForClosureCompiler": true,
    "strictMetadataEmit": true,
    "skipTemplateCodegen": true,
    "flatModuleOutFile": "example-lib.js",
    "flatModuleId": "example-lib",
    "genDir": "../../out-tsc/lib-gen-dir/"
  }  

Usage CLI

--rootDir - This is your project's root --libDir - This is where the library code is present -

ngx-library-builder --rootDir ./example --libDir ./example/src/lib

Usage Programmatic (recommended)

npm install ngx-library-builder --save-dev

Your build-lib.js that you can run.

var ngxLibraryBuilder = require('ngx-library-builder/lib/builder');
var path = require('path');
var process = require('process');


ngxLibraryBuilder.build({rootFolder: path.resolve('.'), srcFolder : path.resolve('src', 'app')}).then(() => {
    console.log('Build Completed Successfully ');
    process.exit(0);
}).catch((error) => {
    console.log('Build Failed ');
    console.log(error);
    process.exit(1);
});

Current Tags

  • 2.0.4                                ...           latest (2 years ago)

8 Versions

  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 2
Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |