Skip to content

Latest commit

 

History

History
149 lines (93 loc) · 3.26 KB

CONTRIBUTING.md

File metadata and controls

149 lines (93 loc) · 3.26 KB

Contributing to embroider-toolbox

Open source projects like embroider-toolbox live on your words of encouragement and contribution. Please give feedback, report issues, or submit pull requests!

Here are some guidelines to help you and everyone else.

Local development

Install dependencies
  1. Fork and clone this repo.

    git clone [email protected]:<your-github-handle>/embroider-toolbox.git
  2. Change directory.

    cd embroider-toolbox
  3. Use pnpm to install dependencies.

    pnpm install
Lint files
  1. When you write code, please check that it meets the linting rules.

    # From the workspace root
    pnpm lint
  2. You can run lint:fix to automatically fix linting errors.

    # From the workspace root
    pnpm lint:fix
Run tests
  1. When you write code, please check that all tests continue to pass.

    # From the workspace root
    pnpm test
Add changeset to pull request
  1. To record how a pull request affects packages, you will want to add a changeset.

    The changeset provides a summary of the code change. It also describes how package versions should be updated (major, minor, or patch) as a result of the code change.

    # From the workspace root
    pnpm changeset
Publish packages (for admins)
  1. Generate a personal access token in GitHub, with repo and read:user scopes enabled.

  2. Run the release:changelog script. This removes changesets, updates the package versions, and updates the CHANGELOG's.

    # From the workspace root
    GITHUB_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> pnpm release:changelog

    The release:changelog script also updated the workspace root's version (by following the highest version formula). We will use it to name the tag that will be published.

    # Highest version formula
    workspace root version = max(
      max(all package versions),
      workspace root version + 0.0.1,
    );
    
  3. Create a tag and provide release notes. The tag name should match the workspace root's version.

  4. Publish the packages.

    # From the workspace root
    pnpm release:publish
Sync reference repo for blueprints-v2-addon (for admins)
  1. Run the following commands in the blueprints-v2-addon-output repo.

    # Reset project
    git rm -r .
    
    # Downstream files
    git clone --no-checkout [email protected]:ijlee2/embroider-toolbox.git temp
    cd temp
    git sparse-checkout set packages/blueprints-v2-addon
    git checkout
    cd ..
    
    # Move files
    mv temp/packages/blueprints-v2-addon/* .
    mv temp/packages/blueprints-v2-addon/.* .
    rm -rf temp
    
    # Reset CHANGELOG
    echo "# blueprints-v2-addon" > CHANGELOG.md

💡 Have ideas for contribution? Reach out to @ijlee2 on Discord!