locomotivemtl / locomotive-boilerplate

🚂 Front-end boilerplate for projects by Locomotive.
https://locomotivemtl-boilerplate.vercel.app/
MIT License
458 stars 71 forks source link

Add support for custom task labels #101

Closed mcaskill closed 2 years ago

mcaskill commented 2 years ago

If ever the basename from the outfile or outdir is an insufficient description.

For the boilerplate's currently available tasks, this feature is not very important but could be for future tasks. It at least serves as inspiration for custom tasks for specific projects. For example, in two client projects I have a custom tasks/copies.js that benefits from a custom label:

Example 1 ```json "copies": [ { "label": "flatpickr", "src": "./node_modules/flatpickr/dist", "dest": "./www/assets/admin/flatpickr" } ] ```
Example 2 ```json "concats": [ { "label": "third-parties", "includes": [ "{% paths.scripts.src %}/vendors/*.js" ], "outfile": "{% paths.scripts.dest %}/vendors.js" } ] ``` ![Screenshot showing custom task labels](https://user-images.githubusercontent.com/29353/144654066-fbdc65a3-282b-48e2-81f3-098e568b9548.jpg)