Skip to content

New build system #30

@diegomura

Description

@diegomura

@devongovett We introduced lerna to be able to inject different module implementation into textkit core, which I think it's great. It give us great flexibility, specially if we want foliojs projects to run everywhere (textkit itself and other libs still has node dependencies that, even if shimmed, people may want to avoid).

But working with it I experience a lot of pain: publishing many packages in cascade, complex project layout, etc.

That's why I thought about switching into a new approach (exactly what nextjs does):

  • On build, create each module entry separately using rollup into a dist folder, including our current core module. Each module will have an entry js file at the root of the project (as nextjs does)
  • That would enable to require each module separately from textkit/core, textkit/linebreaker, etc. No more packages folder. We can have the whole code base together. Also, no more scoped package names
  • Export a default setup, so you can just require textkit and have a working solution. This internally will import the core and bind all default modules.
  • Alternatively, you can import textkit/core and the specific subset of textkit modules (or own modules) and create your custom TextLayout as you currently can

I'm very convinced we should do this. Would love to hear your thoughts!

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