platform/templates
Pete Anøther 916c499af3
TSK-1668: Survey plugin (#4174)
Signed-off-by: Petr Vyazovetskiy <develop.pit@gmail.com>
2023-12-14 23:33:38 +07:00
..
assets UBER-1074: Svelte 4 (#4014) 2023-11-20 17:01:43 +07:00
default Migrate to hcengineering and publish to github packages (#2273) 2022-09-21 14:08:25 +06:00
model UBER-1074: Svelte 4 (#4014) 2023-11-20 17:01:43 +07:00
node UBER-1074: Svelte 4 (#4014) 2023-11-20 17:01:43 +07:00
platform UBER-1074: Svelte 4 (#4014) 2023-11-20 17:01:43 +07:00
ui TSK-1668: Survey plugin (#4174) 2023-12-14 23:33:38 +07:00
webpack UBER-1074: Svelte 4 (#4014) 2023-11-20 17:01:43 +07:00
apply.js :Apply templates (#3799) 2023-10-07 16:38:21 +06:00
readme.md Enable linting build phase (#966) 2022-02-10 10:04:18 +01:00

Project templates

Folder contains a projeect templates and functionality to apply template values to all projects inside rush multi repo.

Any folder with package.json inside templates are template, so it is possible to apply it.

Templates will be matched using peerDependencies entries should be available inside dependencies of project template is matched against.

So ui template with peer dependency to svelte, will be matched to any UI plugin.

If no template is matched for project then default template will be used.

Explicit template selection

If package.json contains "template" field, template from templates with matched name will be selected.

Apply rules

  • If file in template folder is pressent and file in project folder is not, it will be copied.
    • If package.json contain '#replaces' section with filename, file will be overriten in any case.
    • If filename in template starts with ~ then file in project will be removed instead of add.
  • package.json
    • dependencies - will be updated to contain all values from template package.json dependencies with exact same versions.
    • devDependencies - will be updated to contain all values from template package.json dependencies with exact same versions.
    • scripts - will be updated to contain all values from template package.json dependencies with exact same versions.