Skip to content

Group Issue: refactoring  #10

@shlomiassaf

Description

@shlomiassaf

To provide an easy to use, productive and dev friendly seed here are some suggested refactoring.
Each suggestion has an issue attached, this issue is used for managing the issues:

The ES5 version will be used when importing the package, this is done by setting

    "main": "path-to-es5-bundle.js`

in package.json

The ES6 version is a modular option that a developer need to opt-in to use, however it also plays a part in the ES5 UMD bundle.

When developing, user will usually:

import { Something } from 'my-lib'

The UMD bundle is used, it has no type information but the ES6 version does. The ES6 version comes with d.ts files and they are referenced inside package.json

  "typings": "esm/index.d.ts",

The ES6 version also hold *.metadata.json files so it provides support for AoT compilation.
Since main property references the UMD bundle we use the module property to make sure ES6 module syntax code get the modular ES6 version and not the UMD bundle (so AoT can work)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions