`@discourse/update-skeleton` の紹介

私たちは @discourse/update-skeleton パッケージを npm に公開しました。これにより、既存のテーマやプラグインを、GitHub Actions やリンティング用の最新の推奨設定ファイルに簡単に更新できます。

使用方法は、テーマ/プラグインのディレクトリを開き、以下を実行することです。

pnpx @discourse/update-skeleton@latest

これにより、discourse-theme-skeleton または discourse-plugin-skeleton から最新の設定と依存関係のバージョンを取得し、リポジトリに適用します。

出力は以下のようになります。

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

更新を適用し、リンティングの違反を修正した後、通常通りリポジトリにコミットを作成してください。

最初の更新後、pnpm update-skeleton をショートカットとして使用して、このツールを実行できます。

「いいね!」 12