Last active
January 3, 2017 12:06
-
-
Save kitsuyui/bda30b3a25375559040feb6719507239 to your computer and use it in GitHub Desktop.
macOS で textlint を右クリックのメニューから呼べるようにする ref: http://qiita.com/kitsuyui/items/07beca9ff6f04692bff5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.run = (argv) => { | |
const app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
if (!argv[0]) { | |
app.displayAlert("OK"); | |
return; | |
} | |
app.displayAlert(argv[0]); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install -g textlint | |
$ textlint --init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install -g textlint-rule-no-mix-dearu-desumasu | |
$ cat <<EOF > ~/.textlintrc | |
{ | |
"rules": { | |
"no-mix-dearu-desumasu": true | |
} | |
} | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH='/usr/local/bin:/usr/bin:/bin' | |
/usr/bin/osascript -l JavaScript -e ' | |
this.run = (argv) => { | |
const app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
if (!argv[0]) { | |
app.displayAlert("OK"); | |
return; | |
} | |
app.displayAlert(argv[0]); | |
};' "$(cat - | /usr/local/bin/textlint --stdin 2>&1)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH='/usr/local/bin:/usr/bin:/bin' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat - | /usr/local/bin/textlint --stdin 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/osascript -l JavaScript -e '(JavaScript コード)' "$( textlint 部分 )" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
これはオレンジである。リンゴではないのです。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment