Package Angular libraries for npm distribution
+ +- +-++ ++
+
Overview
+-If all users of an Angular library use Bazel (e.g. internal usage in your company)
+-then you should simply add your library to the deps of the consuming application.
These rules exist for compatibility with non-Bazel consumers of your library.
+-It packages your library following the Angular Package Format, see the +-specification of this format at https://goo.gl/jB3GVv
+- +-++
++ If all users of an Angular library use Bazel (e.g. internal usage in
++ your company) then you should simply add your library to the
++ deps of the consuming application.
++
++ These rules exist for compatibility with non-Bazel consumers of your ++ library. ++
++++ It packages your library following the Angular Package Format, see ++ the specification of this format at ++ https://goo.gl/jB3GVv ++
++ +++ +
primary_entry_point_name
+ +primary_entry_point_name(name, entry_point, entry_point_name)+ +
This is not a public API.
+-Compute the name of the primary entry point in the library.
+-Returns: +- name of the entry point, which will appear in the name of generated bundles
+- ++Compute the name of the primary entry point in the library.
++++ Returns: name of the entry point, which will appear in the name of ++ generated bundles ++
+ +Attributes
+ +-name |
+-
+-
the name of the |
+-
entry_point |
+-
+-
The starting point of the application, see rollup_bundle. +- |
+-
entry_point_name |
+-
+-
if set, this is the returned value. +- |
+-
++
name |
++
++
++
++ the name of the |
++
entry_point |
++
++
++ The starting point of the application, see rollup_bundle. ++ ++ |
++
entry_point_name |
++
++
if set, this is the returned value. ++ |
++
+ +
ng_package
+ +ng_package(name, deps, data, srcs, entry_point, entry_point_name, globals, include_devmode_srcs, license_banner, ng_packager, readme_md, rollup, rollup_config_tmpl, terser, terser_config_file)+ +-
ng_package produces an npm-ready package from an Angular library.
+- ++++ ng_package produces an npm-ready package from an Angular library. ++
+ +Attributes
+ +-name |
+-
+-
A unique name for this rule. +- |
+- ||||||||||||||||||||||||||||||
deps |
+-
+-
Other rules that produce JavaScript outputs, such as |
+- ||||||||||||||||||||||||||||||
data |
+-
+-
Additional, non-Angular files to be added to the package, e.g. global CSS assets. +- |
+- ||||||||||||||||||||||||||||||
srcs |
+-
+-
JavaScript source files from the workspace. +- These can use ES2015 syntax and ES Modules (import/export) +- |
+- ||||||||||||||||||||||||||||||
entry_point |
+-
+-
The starting point of the application, passed as the |
++ ||||||||||||||||||||||||||||||
entry_point_name |
++
++
++ Name to use when generating bundle files for the primary ++ entry-point. ++ ++ |
++ ||||||||||||||||||||||||||||||
globals |
++
++
++
++ A dict of symbols that reference external scripts. The keys
++ are variable names that appear in the program, and the
++ values are the symbol to reference at runtime in a global
++ context (UMD bundles). For example, a program referencing
++ @angular/core should use ng.core as the global reference, so
++ Angular users should include the mapping
++ |
++ ||||||||||||||||||||||||||||||
include_devmode_srcs |
++
++
|
++ ||||||||||||||||||||||||||||||
license_banner |
++
++
++
++ A .txt file passed to the |
++ ||||||||||||||||||||||||||||||
ng_packager |
++
++
++ |
++ ||||||||||||||||||||||||||||||
readme_md |
++
++
++ |
++ ||||||||||||||||||||||||||||||
rollup |
++
++
++ |
++ ||||||||||||||||||||||||||||||
rollup_config_tmpl |
++
++
++ |
++ ||||||||||||||||||||||||||||||
terser |
++
++
++ |
++ ||||||||||||||||||||||||||||||
terser_config_file |
++
++
++ A JSON file containing Terser minify() options. ++++ This is the file you would pass to the --config-file ++ argument in terser's CLI. ++ https://github.com/terser-js/terser#minify-options ++ documents the content of the file. ++ ++
++ If |
++