Prerequisites
Amazon Toolbox, Brazil
https://docs.hub.amazon.dev/builder-toolbox/user-guide/getting-started/#installing-tools
macOS:
brew install nvm
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
nvm install --lts
nvm use --lts
nvm alias default node
Checkout and install:
mwinit -s && \
brazil ws create -r Vinyl && \
cd Vinyl && \
brazil ws use -p Vinyl -vs Vinyl/mainline && \
cd src/Vinyl && \
bb i
To start the local demo server and start watch build mode, run:
npm run start
For VSCode users, the conventional Jasmine plugin is buggy, showing a random subset of tests in the explorer. Here's a patched version that works for v1.90: vscode-jasmine-test-adapter
Install the Jasmine plugin for fast test iteration.
Advanced setup for iterating on big screen devices can be found here: DEVELOPER_SETUP_ADVANCED.md
Please refer to docs/STYLE_GUIDE.md.
Commits must use conventional commit.
Running git cz will start the commitizen wizard.
To ensure tree-shaking remains effective, this project includes an export size
validation step. It measures the minimum bundle size across all exports to
detect if tree-shaking was broken. After building the project, run
npm run analyzeExports:write to generate or update the reference size report (
packages/<package>/reports/treeShaking/<package>.json). To validate changes
without modifying the report, use npm run analyzeExports. If the minimum
bundle size has grown by more than 10%, validation will fail in check mode or
automatically continue in write mode. Release builds will run the validator
(npm run release).
The package.json exports / typesVersions maps can be written automatically
using: tsx buildSrc/writePackageJsonExports.ts
After validating that the output looks correct, use the --write flag to write.
A specific package can be supplied using -p
tsx buildSrc/writePackageJsonExports.ts -p vinyl-util [--write]
d.ts down-leveling is done via a fork of downlevel-dts located at: https://github.com/nbilyk/downlevel-dts/
Sometimes it is useful to iterate on a public host in order to test with 3P devices. Use the S3DevSync tool to synchronize your local workspace to vinyl dev.
Follow the instructions in that package and then run s3sync from the Vinyl
root directory.