cursorless/CONTRIBUTING.md
Pokey Rule 4cf1c47e79
Add new hats and preprocessing script (#277)
* Add new hats and preprocessing script

* Add `play`

* Padded svgs

* Initial stuff

* New icons

* More tweaks

* Adjust base size

* Center align

* Working version

* Style adjustments

* Remove aspect ratio code

* Tweak

* more tweaks

* Cleanup math

* New icons

* Newer icons

* Renames

* More icon tweaks

* Final shapes

* Cleanup

* Docs

* red => black

* Some hats

* red to black script

* More shapes

* Tweak sizes

* Tweaks to measurements

* Keep both hat adjustment scripts

* Dock tweaks

* More size tweaks

* Update docs

* Remove unused hat

* shapeMeasurements => shapeAdjustments

* Expose enablements

* `star` => `crosshairs`

* Try to use post-install script

* Revert "Try to use post-install script"

This reverts commit 13c828e66c.

* Revert "Expose enablements"

This reverts commit 553f6bec67.
2021-10-05 18:38:32 +01:00

1.4 KiB

Contributing

Installation

yarn install

Running tests

yarn run test

Adding tests

See test-case-recorder.md.

Adding a new programming language

See docs.

Adding syntactic scope types to an existing language

See parse-tree-patterns.md.

Changing SVGs

SVG preprocessing script

You'll probably want to run the following to make sure the SVGs have everything they need:

yarn run compile && node ./out/scripts/preprocessSvgHats.js

This script will add dummy width, height and fill attributes as necessary to appease the regex in Decorations.ts

Adding hat adjustments at finish

While tweaking, the easiest approach is probably to use the cursorless.individualHatAdjustments setting in your settings.json to change size / alignment so you don't need to refresh every time. Once you're done, you can paste the settings into scripts/hatAdjustments/add.ts and run the following to get your updates:

yarn run compile && node ./out/scripts/hatAdjustments/add.js

If instead, you want to average your adjustments with those in main and see the differences to get to yours and main, you can paste the settings into scripts/hatAdjustments/average.ts and run:

yarn run compile && node ./out/scripts/hatAdjustments/average.js