abcnews / aunty

A toolkit for working with ABC News projects
https://www.npmjs.com/package/@abcnews/aunty
MIT License
32 stars 5 forks source link

Multiple entry point support #134

Closed colingourlay closed 3 years ago

colingourlay commented 3 years ago

This extends the build::entry config prop (previously used to change the expected entry filename from the default index) to also accept an array of strings. Each will be considered an entry point.

Now, renaming the default entry point (by setting build::entry to a different string, or a unit array, will ensure the output filename matches that entry filename, rather than it being renamed to index.js.

If you want to keep the default index around, just include it as one of your array items.

Closes #131 (see for reference implementation, and the existing hacks we plan to avoid).

drzax commented 3 years ago

Looks good. Just suggest adding a usage example somewhere?

colingourlay commented 3 years ago

usage example

There's examples in the linked issue (for this, and for the transpilable dependencies feature), but they won't suffice, going forward

Documentation for each command's config object(s) has been sorely missed since we adopted aunty. I definitely need to take the time to do it, rather than us continue the guesswork and queries amongst each other that we've repeated over the years.

I think I'll add it once these all of these changes (and cleanup) have landed. Do you think it should exist in README-style files in this repo, or should we add it to the command help output?

drzax commented 3 years ago

I'd probably go with readme-style just because it offers the ability to be more verbose in a more readable format.