This PR adds the ability to define the endpoints you want to build so that if your working on a specific part of a project you can optimise performance/speed of builds for what your working on via defining the endpoints after @ symbol. For example for all projects you can use @frontend or if your working with multiple project and only want to build the frontend assets for one you can use test-plugin@frontend. Fixes #46
Change log
Add logic so that projects positional can have entrypoints defined after them by appened @ along with the entrypoint ie test-plugin@frontend or multiple via + such as test-plugin@frontend+editor.
Adds new property to project config called filteredEntrypoints which will contain the specified entrypoints if set, defaults to empty array.
Add cli test.
Add unit test for new util function (getFilteredEntryPoints).
Code reviewer(s)
Is filteredEntrypoints the right variable name?
Should some kind of validation be performed to ensure projects/filtered endpoints are following the correct format (plugin@fronted+editor, @frontend, etc)?
README.md will be updated once an initial review has been done and the above questions have been answered as things are subject to change.
Testing
Example Individual Projects build command: build-tools build my-plugin@frontend.
Example Site-wide build command: build-tools build @frontend.
Verify Individual Projects build command works without @ specified
Verify Individual Projects build command works with single @frontend specified
Verify Individual Projects build command works with multiple @frontend+editor specified
Verify Site-wide build command works without @ specified
Verify Site-wide build command works with single @frontend specified
Verify Site-wide build command works with multiple @frontend+editor specified
Description
This PR adds the ability to define the endpoints you want to build so that if your working on a specific part of a project you can optimise performance/speed of builds for what your working on via defining the endpoints after
@
symbol. For example for all projects you can use@frontend
or if your working with multiple project and only want to build the frontend assets for one you can usetest-plugin@frontend
. Fixes #46Change log
projects
positional can have entrypoints defined after them by appened@
along with the entrypoint ietest-plugin@frontend
or multiple via+
such astest-plugin@frontend+editor
.filteredEntrypoints
which will contain the specified entrypoints if set, defaults to empty array.getFilteredEntryPoints
).Code reviewer(s)
filteredEntrypoints
the right variable name?plugin@fronted+editor
,@frontend
, etc)?README.md
will be updated once an initial review has been done and the above questions have been answered as things are subject to change.Testing
Example Individual Projects build command:
build-tools build my-plugin@frontend
. Example Site-wide build command:build-tools build @frontend
.@
specified@frontend
specified@frontend+editor
specified@
specified@frontend
specified@frontend+editor
specified