stealjs / steal-tools

Build easy. Load fast.
https://stealjs.com/docs/steal-tools.html
MIT License
67 stars 23 forks source link

provide glob pattern for bundles #1036

Closed pYr0x closed 6 years ago

pYr0x commented 6 years ago

in steal you can add bundles that are loaded progressive see this HowTo: https://stealjs.com/docs/StealJS.guides.progressive_loading.html#build-a-progressive-loading-production-app

this adds feature for #507 and new version of #512 this is available in steal version 2.0

@matthewp this version is similar to #512. if we are with npm then it removes the package name, find the files, and adds back the package name. https://github.com/stealjs/steal-tools/blob/glob-bundle/lib/loader/find_bundle.js#L75 weird mapping is not supported. just simple globs like

this feature is fully backwards compatible

hopefully this lands on steal-tools. this save me a lot of writing bundle names

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 38.595% when pulling ca1f490d10abb6c1e46cac5cc9e33618cb49dd4d on glob-bundle into 5b3ad8e546859c5071929e430232edac6e6f8c30 on major.

matthewp commented 6 years ago

Awesome! Will definitely get this merged in.

matthewp commented 6 years ago

@pYr0x this needs to be documented, right?

pYr0x commented 6 years ago

Yep. I can write some docs. Under https://stealjs.com/docs/steal-tools.StealConfig.html ?

matthewp commented 6 years ago

Wouldn't it be here? https://stealjs.com/docs/config.bundle.html . Looks like there's already a glob example though. Did yours just improve the existing support?

pYr0x commented 6 years ago

globbing was only available if a plain string was provided. like the example shown.

i will update the docs and refer a link to StealConfig on https://stealjs.com/docs/config.bundle.html