rocjs / roc

🐦 Modern JavaScript Development Ecosystem
MIT License
425 stars 23 forks source link

Improve template pattern mechanism #78

Closed andreasrs closed 8 years ago

andreasrs commented 8 years ago

This ticket is a result of my idea-pitch + following discussion in person with DLMR. It is mostly to document these thoughts/findings so that we can act on them in the future.

Current solution: Roc has functionality-merge across extensions and a custom-made hooks+actions concept in place today.

The roc object with its settings + commands etc. provides an easy-to-use interface for customizing different types of behaviour when using Roc. The available settings are pre-defined by the current package and plugin selection and are really easy for the user to adjust in their project. These are also mapped out to the CLI so that they can be overriden using the command line easily.

Hooks+actions lets users or other packages/plugins perform custom operations at selected critical points in the ecosystem. It allows the injection of javascript functions to modify behaviour. For example adding loaders to a webpack configuration.

The Roc objects for all packages/extensions are merged using code provided by roc cli project to compose features from different packages.

Positives:

Negatives:

Proposed (new) solution:

Positives:

Negatives:

Suggestion to way onwards:

=> Evaluate how it works in practice on a small subset, and then consider a larger adjustment if it works really well in a PoC.

I can take responsibility of making this PoC, and will do it in the near future.

dlmr commented 8 years ago

I suggest we close this issue and revisit this at a later time, thought @andreasrs?