Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
/ lib-starter Public archive

📚 Universal, AOT, Web Worker ready lib starter. Use for your Angular libs

Notifications You must be signed in to change notification settings

AngularClass/lib-starter

Repository files navigation

Angular Lib Starter

Universal, AOT, Web Worker ready lib starter. Use for your Angular libs

Getting started

  • fork this
  • clear the git history git init .
  • add your source code in src.
  • change the entry in webpack.config.js
  • change the output filnames in package.json to match your src files and webpack
    • "main", "jsnext:main", "module", "types"
  • build your project yarn release or npm run release

Builds

This starter prepares 2 different types of builds of your lib

  • esm or ES2015 Modules
    • this build is a transpilation of your Typescript code to ES5 and ES2015 modules. Its' not bundled. This is needed for tree-shaking when users use your lib
  • UMD
    • this is a bundle of ES5 code. What you would typically get from webpack or rollup.

The build system generates AOT metadata too, so you're good.

Scripts

  • "test": runs the test in mocha on node
  • "lint": runs the linter
  • "build:esm": builds the esm versions
  • "build:bundle": builds the UMD version
  • "build:aot": makes it work for aot
  • "build": does all the above
  • "copy": copies over file to dist
  • "package": does all the above
  • "release": bumps the version, creates a tag, pushes to your master, builds then publishes to npm
  • "pack": produces a tarball
  • "coverage": runs the test then coverage

About

📚 Universal, AOT, Web Worker ready lib starter. Use for your Angular libs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published