Introducing `@discourse/update-skeleton`

We just published the @discourse/update-skeleton package on npm. This can be used to easily update existing themes and plugins to use the latest recommended config files for GitHub actions and linting.

To use it, open your theme/plugin directory, and then run

pnpx @discourse/update-skeleton@latest

This will pull the latest configs & dependency versions from discourse-theme-skeleton or discourse-plugin-skeleton, and apply them to your repository.

Output will look something like:

Updated package.json
Updated eslint.config.mjs
Updated .prettierrc.cjs
Updated stylelint.config.mjs
Updated tsconfig.json
Updated .rubocop.yml
Updated .streerc
Updated Gemfile
Updated .github/workflows/discourse-theme.yml
Updated .github/workflows/d-compat-branch.yml
Updated .gitignore
...
Done. Review the diff, then run:
  pnpm lint:fix
  pnpm lint
  bundle exec stree write Gemfile $(git ls-files '*.rb' '*.rake' '*.thor')
  bundle exec rubocop -A
  bundle exec rubocop

Once you’ve applied the updates and fixed any linting violations, create a commit on your repository as normal.

After your first update, you can use pnpm update-skeleton as a shortcut to run this tool.

5 לייקים