Problem
Starting with installation of dependencies ending with releasing our product to partners... we rely heavily on contents within scripts/ folder.
Historically functionality was added here adhoc without being compliant to any style-guide, tests coverage, type checking, out-dated files, which made scripts/ a kind of a black box.
This approach won't scale as we are going forward. Instead of continuing adding technical depth and making it hard to maintain we need to apply similar quality and structure to scripts/ as we apply for our component packages.
Solution
- enable strict type checking
- establish package boundaries within
scripts/
- move "packaged" scripts sub-folders to separate packages to establish explicit public API's contracts
Example (simplified):
Now:
|- scripts/
|- |- api-extractor/
|- |- beachball/
|- |- cypress/
|- |- screener/
import { someFn } from '@fluentui/scripts/cypress/one/two
After:
|- packages/
|- |- tools/
|- |- |- api-extractor/
|- |- |- beachball/
|- |- |- cypress/
|- |- |- screener/
import { someFn } from '@fluentui/cypress
Outlined steps will enable us to ship components with high confidence and also as a performance side-effect will improve our PR CI pipelines times as there wont be one monolithic scrips packages which affects whole monorepo.
Risks (Rabbit holes)
Out of scope (No-gos)
Tasks
Problem
Starting with installation of dependencies ending with releasing our product to partners... we rely heavily on contents within
scripts/folder.Historically functionality was added here adhoc without being compliant to any style-guide, tests coverage, type checking, out-dated files, which made
scripts/a kind of a black box.This approach won't scale as we are going forward. Instead of continuing adding technical depth and making it hard to maintain we need to apply similar quality and structure to
scripts/as we apply for our component packages.Solution
scripts/Example (simplified):
Now:
import { someFn } from '@fluentui/scripts/cypress/one/twoAfter:
import { someFn } from '@fluentui/cypressOutlined steps will enable us to ship components with high confidence and also as a performance side-effect will improve our PR CI pipelines times as there wont be one monolithic
scripspackages which affects whole monorepo.Risks (Rabbit holes)
Out of scope (No-gos)
Tasks
/jest#26100/scripts#26125/storybookand/webpackand introduce barrel api within/webpack#26072/monorepoto proper domain #26345