Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 3.33 KB

File metadata and controls

73 lines (54 loc) · 3.33 KB

Developing vue-fontawesome with Vue 3

Tasks

The following commands are available through npm run:

Command Purpose
test Execute unit tests
test:types Type-check the public API (index.d.ts) with vitest/tsc
build Build a development version of the library using Rollup
dist Build a production version of the library using Rollup

Testing against multiple Font Awesome SVG Core versions

The library supports @fortawesome/fontawesome-svg-core v1 (Font Awesome 5), v6, and v7. The default devDependency is v7, but you can temporarily swap versions without modifying package.json. Note that package-lock.json will be updated — run git checkout -- package-lock.json when done to restore it.

# Test against v5
npm install --no-save @fortawesome/fontawesome-svg-core@~1 @fortawesome/free-solid-svg-icons@~5
npm run test

# Test against v6
npm install --no-save @fortawesome/fontawesome-svg-core@~6 @fortawesome/free-solid-svg-icons@~6
npm run test

# Restore v7
npm install --no-save @fortawesome/fontawesome-svg-core@~7 @fortawesome/free-solid-svg-icons@~7

# Clean up lockfile changes
git checkout -- package-lock.json

Each version runs a subset of the tests — blocks guarded by version feature flags are automatically skipped.

Release this project

During pre release, make sure and use --tag and --npm-dist-tag

  1. Run npm run test and npm run test:types and confirm both pass (do this first — npm publish builds via prepack, so verify before anything is built or published)
  2. Update package.json and change version
  3. Run npm install to sync package-lock.json
  4. Update README.md and package.json; adding any contributors
  5. Update the CHANGELOG.md
  6. Run npm run dist to build the production bundle (optional but recommended — surfaces build errors here instead of mid-publish, since npm publish runs it via prepack)
  7. npm publish --tag latest-3 --registry=https://registry.npmjs.org/
  8. npm dist-tag add --registry=https://registry.npmjs.org/ @fortawesome/vue-fontawesome@[VERSION_NUMBER] latest
  9. npm publish --tag latest-3 --registry=https://npm.fontawesome.com
  10. npm dist-tag add --registry=https://npm.fontawesome.com @fortawesome/vue-fontawesome@[VERSION_NUMBER] latest
  11. git add .
  12. git commit -a -m 'Release VERSION'
  13. git push
  14. Create a new release with CHANGELOG details

Authenticating with the npm.fontawesome.com registry

Contributors with authorization to publish to npm.fontawesome.com will receive an invite from a Font Awesome project owner.

  1. Respond to the invite in your email
  2. Let the owner know when you've setup your account
  3. Owner will add you to the team

You can then run:

npm login --registry https://npm.fontawesome.com
  • The username is the "slug" for your Cloudsmith account. For example mine is "rob-madole".
  • Enter the password that you setup just a few minutes ago.
  • It says the your email is PUBLIC. Pretty sure that's false since the auth is through Cloudsmith.
  • This doesn't overwrite your standard login, just adds to your ~/.npmrc