All Projects → ng-packagr → Ng Packagr

ng-packagr / Ng Packagr

Licence: mit
Compile and package Angular libraries in Angular Package Format (APF)

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
HTML
75241 projects
shell
77523 projects
Sass
350 projects

Projects that are alternatives of or similar to Ng Packagr

Root Bootstrap 4 Admin Template With Angularjs Angular 2 Support
Root is Boostrap 4 Admin Template with Angular 2 and AngularJS support
Stars: ✭ 54 (-96.88%)
Mutual labels:  scss, angular-cli
Vertical Rhythm
Put some typographical vertical rhythm in your CSS. LESS, Stylus and SCSS/SASS versions included.
Stars: ✭ 83 (-95.2%)
Mutual labels:  scss, less
Stylelint
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
Stars: ✭ 9,350 (+440.46%)
Mutual labels:  scss, less
Wenk
😉 Lightweight pure CSS tooltip for the greater good
Stars: ✭ 694 (-59.88%)
Mutual labels:  scss, less
Prettier
Prettier is an opinionated code formatter.
Stars: ✭ 41,411 (+2293.7%)
Mutual labels:  scss, less
Metro Ui Css
Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
Stars: ✭ 6,843 (+295.55%)
Mutual labels:  component-library, less
Nx Packaged
Angular libraries with ng-packagr embedded in Nx Workspace.
Stars: ✭ 82 (-95.26%)
Mutual labels:  component-library, angular-cli
Prejss
Get the power of PostCSS with plugins in your JSS styles. 🎨 Just put CSS into JS and get it as JSS object.
Stars: ✭ 238 (-86.24%)
Mutual labels:  scss, less
Bootstrap 4 Utilities
Bootstrap 4 utility classes in LESS CSS for Bootstrap 3 or any other projects.
Stars: ✭ 105 (-93.93%)
Mutual labels:  scss, less
Webpack4.x
webpack4.x详细配置步骤
Stars: ✭ 103 (-94.05%)
Mutual labels:  scss, less
Universal
Seed project for Angular Universal apps featuring Server-Side Rendering (SSR), Webpack, CLI scaffolding, dev/prod modes, AoT compilation, HMR, SCSS compilation, lazy loading, config, cache, i18n, SEO, and TSLint/codelyzer
Stars: ✭ 669 (-61.33%)
Mutual labels:  scss, angular-cli
Rollup Plugin Styles
🎨 Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more.
Stars: ✭ 116 (-93.29%)
Mutual labels:  scss, less
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (-84.97%)
Mutual labels:  scss, less
Three Dots
🔮 CSS loading animations made by single element.
Stars: ✭ 912 (-47.28%)
Mutual labels:  scss, less
Blog Angular
Angular 笔记
Stars: ✭ 238 (-86.24%)
Mutual labels:  scss, angular-cli
Cessie
Transpile your CSS bundle to support CSS variables, calc, and future CSS for legacy browsers.
Stars: ✭ 81 (-95.32%)
Mutual labels:  scss, less
Compile Hero
🔰Visual Studio Code Extension For Compiling Language
Stars: ✭ 169 (-90.23%)
Mutual labels:  scss, less
Style Resources Loader
CSS processor resources loader for webpack
Stars: ✭ 214 (-87.63%)
Mutual labels:  scss, less
Clever Bootstrap 4 Admin Template With Angularjs Angular 2 Support
Clever is Boostrap 4 Admin Template with Angular 2 and AngularJS support
Stars: ✭ 98 (-94.34%)
Mutual labels:  scss, angular-cli
Lemonj
一个面向 CSS/LESS/SCSS 的分析、坏味道检查和自动化重构工具。
Stars: ✭ 112 (-93.53%)
Mutual labels:  scss, less

ng-packagr

Compile and package Angular libraries in Angular Package Format (APF)

npm npm License CircleCI

GitHub stars npm Downloads Renovate enabled

Credits

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Installation

npm install -D ng-packagr

Usage Example

Let's walk through a getting started that'll build an Angular library from TypeScript sources and create a distribution-ready npm package: create a package.json file, add the custom ngPackage property, and eventually run ng-packagr -p package.json – Here we go:

{
  "$schema": "./node_modules/ng-packagr/package.schema.json",
  "name": "@my/foo",
  "version": "1.0.0",
  "ngPackage": {
    "lib": {
      "entryFile": "public_api.ts"
    }
  }
}

Note 1: Paths in the ngPackage section are resolved relative to the location of the package.json file. In the above example, public_api.ts is the entry file to the library's sources and must be placed next to package.json (a sibling in the same folder).

Note 2: referencing the $schema enables JSON editing support (auto-completion for configuration) in IDEs like VSCode.

You can easily run ng-packagr through a npm/yarn script:

{
  "scripts": {
    "build": "ng-packagr -p package.json"
  }
}

Now, execute the build with the following command:

$ yarn build

The build output is written to the dist folder, containing all those binaries to meet the Angular Package Format specification. You'll now be able to go ahead and npm publish dist your Angular library to the npm registry.

Do you like to publish more libraries? Is your code living in a monorepo? Create one package.json per npm package, run ng-packagr for each!

Features

  • 🎁 Implements Angular Package Format
    • 🏁 Bundles your library in FESM2020
    • 🎒 npm package can be consumed by Angular CLI, Webpack, or SystemJS
    • 💃 Creates type definitions (.d.ts)
    • 🏆 Auto-discovers and bundles secondary entry points such as @my/foo, @my/foo/testing, @my/foo/bar
  • 🔎 Creates scoped and non-scoped packages for publishing to npm registry
  • 🏄 Inlines Templates and Stylesheets
  • CSS Features

How to…

Knowledge

Angular Package Format documentation

Packaging Angular Libraries - Jason Aden at Angular Mountain View Meetup (Jan 2018, 45min talk)

Create and publish Angular libs like a Pro - Juri Strumpflohner at NG-BE (Dec 2017, 30min talk)

Juri Strumpflohner - Create and publish Angular libs like a Pro

Packaging Angular - Jason Aden at ng-conf 2017 (28min talk)

Packaging Angular - Jason Aden

Create and publish Angular libs like a Pro - Juri Strumpflohner at ngVikings, this time demoing building Angular libraries with ng-packagr, with NX as well as Bazel (March 2018, 30min talk)

Juri Strumpflohner - Create & Publish Angular Libs like a PRO at ngVikings

Contributing to ng-packagr

General contribution guidelines

If you like to submit a pull request, you'll find it helpful to take a look at the initial design document where it all started.

To orchestrate the different tools, ng-packagr features a custom transformation pipeline. The transformation pipeline is built on top of RxJS and Angular Dependency Injection concepts.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].