-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(app): 最新のtextlintを取り込み、npmパッケージ化できるようにしました. #9
Conversation
|
||
var textlint = require("textlint").textlint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRの説明にも書きましたが、この方法では @textlint/linter-formatter
の初期化時に非Node環境でエラーが出てしまうため書き換えました。
@@ -2,7 +2,7 @@ | |||
"name": "maildown", | |||
"version": "1.2.0", | |||
"description": "", | |||
"main": "index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.jsには document
などブラウザーでしか動作しないものが含まれているため、ライブラリのメインとしては lib/convert.js
を指定しました。
}, | ||
"dependencies": { | ||
"textlint": "7.4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npmパッケージとしてconvert実行に必要なライブラリをdependenciesに移動しました。
@@ -114,32 +114,32 @@ function convert(input) { | |||
case Syntax.Code: | |||
break; | |||
|
|||
case "table": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Requestを投げてからindex.htmlを見直したところ、テーブルが変換できてなかったため修正いたしました。
https://github.com/textlint/textlint/blob/master/packages/%40textlint/markdown-to-ast/src/mapping/markdown-syntax-map.js
毎々お世話になっております。hashrockです。 PR確認させていただき、反映させていただきました。 以上、何卒宜しくお願い致します。 |
いつもお世話になっております。 この度は急なPull Requestにもかかわらず早急にマージしていただき、 npmへのリリースについてはお忙しいところ恐縮ですが、 以上、よろしくお願いいたします。 |
いろいろ解説いただきありがとうございます!おかげで弊法務部もニッコリでした。 以上、何卒宜しくお願いします。 |
日頃より、格別のお引き立てを賜り、ありがとうございます。 @hashrock 様のますますのご発展をお祈り申し上げます。 取り急ぎ、お礼まで申し上げます。 |
はじめまして。
突然のPull Request失礼いたします。
この度貴社のmaildownを拝見させていただきまして、非常に感銘を受けました。
弊社でもメモをMarkdownで書くことがあるのですが、そのあとメールやSlack、Wikiなどに書き起こす際にかかる手間を減らしてくれる大変有望なライブラリであるという声が(私から)上がっております。
その特性をChrome拡張やElectronアプリなどでライブラリとして利用できないかと思い、
不躾ではありますがNPMパッケージとして利用できるように対応を行いました。
なお、最新のtextlintを取り込んだことにより
fs.readdirSync
関数がない非Node.js環境で動かすことが難しくなったため、index.jsをtextlintの公式サイトのデモでも利用している https://github.com/textlint/playground の手法を利用し、@textlint/kernel
を呼び出す方法に変更しております。ご了承ください。(playground内のTextlintEditor.jsで使っている方法です)。
ちなみにブラウザで動くtextlintの検討は textlint/textlint#299 でされております。
もしよろしければNPMパッケージとしての公開につきましてもご検討いただけると幸いでございます。
NPMパッケージとしてはこのように利用できます(Pull Request元のブランチで
yarn add mtgto/maildown#npmize
して動作を確認しました)。以上、よろしくお願い致します。