LoginSignup
0
1

More than 5 years have passed since last update.

Polymerのエディタープラグイン紹介(Atom/Visual Studio Code向け)

Last updated at Posted at 2017-05-03

Polymerのリントチェックやオートコンプリートをサポートするエディターのプラグインpolymer-editor-serviceを開発環境に導入しましょう。

(2017年5/3現在、サポートはAtomとVisual Studio Codeだけですが、今後Sublimeもサポートされるようです。最新の状況は、GitHubページで確認できます。)

何ができるか

  • インポートした要素のオートコンプリート入力(ドキュメント付)
  • カスタム要素の属性のオートコンプリート入力(ドキュメント付)
  • エラー箇所をアンダーバーで表示
  • マウスでホバーするとカスタム要素やその属性のドキュメントをエディター上で表示

どうやって入れるか

Atomの場合(Mac)
apm install polymer-ide
apm install linter # (任意オプション)エラー箇所に赤のアンダーライン
# コマンドパレットでWindow: reloadを実行するか、エディターを再起動
Visual_Studio_Editorの場合(Mac)
ext install polymer-ide

試すには

インストール後、以下コマンドでサンプルプロジェクト上でプラグインの動作を確認できます。

Atomの場合(Mac)
git clone https://github.com/Polymer/atom-plugin
cd atom-plugin/example_project
bower install
atom ./
Visual_Studio_Editorの場合(Mac)
git clone git@github.com:Polymer/vscode-plugin.git
cd vscode-plugin/example_project
bower install
code ./

おまけ

Polymer 2.0のシンタクスには対応していないようですが、PolymerSnippetsも併せて入れておくと便利だと思います。

詳しい情報

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1