0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Atom のプラグイン開発時に気をつけること

Last updated at Posted at 2017-10-25

概要

どうしても、解決のしかたがわからなかった。

Cannot import 'atom-linter'

まとめ

dependenciesに何か書いたあと、それを読み込む必要がある。

package.json に書いた後に、

  1. CTRL+SHIFT+p
  2. u p d u
  3. enterキー

リンク先をよく読んだら

atom -d .
apm install

でもよいようだ。
まだ試していない。

公開する

セマンティックバージョニングの、patchをあげるならば

git push
apm publish patch

開発者ツール、デベロッパーツールを起動する

キーボードショートカット

CTRL+SHIFT:i

メニューからたどるなら

  1. View
  2. Developer
  3. Toggle Developer Tool

開発用のパッケージを置くディレクトリ

以下のコメントを参考にすると
Load developing package

~/.atom/dev/packages/

におくようだ。

気をつけること

確実に開発版のパッケージがよまれていることを確認する

安定版をアンインストールしたら、開発版もきえることがある。

これは自分の運用の問題?

開発版が以下の場所にあって

~/github/あるパッケージ

これを、以下の場所にリンクしている

~/.atom/dev/packages/

はじめて publish するとき

apm publish patch

とか

apm publish minor

などでリリースできる

このとき、以下のようなメッセージがでるときがある。
これは、package.jsonrepository の値が、存在しないとか、間違えて書いているときにもおこります。
なので、ここをチェックしてみましょう。

Registering autocomplete-cwl ✗
Registering package in atom/autocomplete-cwl repository failed: That repo does not exist, isn't an atom package, or you do not have access

これがでたら、 git push しておくとよいかもしれない。

git push

atom-cwl-viewer のときのログ

$ apm publish patch
Registering atom-cwl-viewer ✗
Registering package in manabuishii/atom-cwl-viewer repository failed: That repo does not exist, isn't an atom package, or you do not have access
$ apm publish
A version, tag, or new package name is required
$ git push
Counting objects: 14, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (14/14), 4.48 KiB | 4.48 MiB/s, done.
Total 14 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
To https://github.com/manabuishii/atom-cwl-viewer
   3432280..679b993  master -> master
$ apm publish minor
Registering atom-cwl-viewer ✓
Preparing and tagging a new version ✓
Pushing v0.2.0 tag ✓
Publishing atom-cwl-viewer@v0.2.0 ✓
Congrats on publishing a new package!
Check it out at https://atom.io/packages/atom-cwl-viewer

コメントアウトの設定を変えたいとき

settings/language-cwl.cson

'.source.cwl':
  'editor':
    'commentStart': '# '

その他の言語の場合

YAML

perl

自分へのメモ

atomのページのなかで、パッケージを登録するページはない。

参考

そとのデータをとりにいく。サンプル。coffeescript。autocomplete-html で使っている。他のスクリプトもあるので、このレポジトリで、rawとかhttp,httpsで検索してみると良い

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?