Skip to content

Commit

Permalink
パッケージのスリム化を進める/textlintをリポジトリからグローバルに #1231
Browse files Browse the repository at this point in the history
  • Loading branch information
kujirahand committed May 20, 2022
1 parent 150c90e commit cc6d1d8
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .npmignore
@@ -0,0 +1,5 @@
fukushi.yml
docs/
installer/
tmp/

40 changes: 40 additions & 0 deletions doc/textlint.md
@@ -0,0 +1,40 @@
# textlint について

配布パッケージのスリム化のために、必要性が低いパッケージについては、別途グローバルにインストールして、時々チェックするという方針にした。([参考#1231](https://github.com/kujirahand/nadesiko3/issues/1231))

そのため、textlint のセットアップ方法については、ここで別途書いておく。

## textlint のインストール

```shell
npm install -g textlint \
textlint-rule-abbr-within-parentheses \
textlint-rule-footnote-order \
textlint-rule-general-novel-style-ja \
textlint-rule-ja-hiragana-fukushi \
textlint-rule-ja-hiragana-hojodoushi \
textlint-rule-ja-hiragana-keishikimeishi \
textlint-rule-ja-unnatural-alphabet \
textlint-rule-ng-word \
textlint-rule-no-dead-link \
textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet \
textlint-rule-prefer-tari-tari \
textlint-rule-preset-ja-spacing \
textlint-rule-preset-ja-technical-writing \
textlint-rule-preset-jtf-style \
textlint-rule-spellcheck-tech-word \
```

## textlint の実行

textlintの実行

```shell
textlint *.md && textlint doc/*.md && textlint batch/*.md && textlint tools/*.md
```

textlintで自動修正

```shell
textlint --fix *.md && textlint --fix doc/*.md && textlint --fix batch/*.md && textlint --fix tools/*.md
```
24 changes: 2 additions & 22 deletions package.json
Expand Up @@ -33,8 +33,6 @@
"analyze": "webpack-bundle-analyzer release/stats.json",
"publish": "echo 'Please exec => npm run build && npm run test:all && npm publish && npm run publish:version'",
"publish:version": "node src/cnako3.mjs batch/publish_version.nako3",
"textlint": "textlint *.md && textlint doc/*.md && textlint batch/*.md && textlint tools/*.md",
"textlint:fix": "textlint --fix *.md && textlint --fix doc/*.md && textlint --fix batch/*.md && textlint --fix tools/*.md",
"eslint": "eslint . --ext mts,mjs",
"extlib:clean": "rm -f -r demo/extlib/*",
"extlib:install": "node src/cnako3.mjs batch/download-extlib.nako3",
Expand Down Expand Up @@ -170,38 +168,20 @@
"stylelint-config-standard": "^25.0.0",
"terser-webpack-plugin": "^5.3.1",
"testdouble": "^3.16.5",
"textlint": "^12.1.1",
"textlint-rule-abbr-within-parentheses": "^1.0.2",
"textlint-rule-footnote-order": "^1.0.3",
"textlint-rule-general-novel-style-ja": "^1.3.0",
"textlint-rule-ja-hiragana-fukushi": "^1.3.0",
"textlint-rule-ja-hiragana-hojodoushi": "^1.0.4",
"textlint-rule-ja-hiragana-keishikimeishi": "^1.1.0",
"textlint-rule-ja-unnatural-alphabet": "^2.0.1",
"textlint-rule-ng-word": "^1.0.0",
"textlint-rule-no-dead-link": "^4.8.0",
"textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet": "^1.0.1",
"textlint-rule-prefer-tari-tari": "^1.0.3",
"textlint-rule-preset-ja-spacing": "^2.2.0",
"textlint-rule-preset-ja-technical-writing": "^7.0.0",
"textlint-rule-preset-jtf-style": "^2.3.12",
"textlint-rule-spellcheck-tech-word": "^5.0.0",
"typescript": "^4.6.4",
"url-loader": "^4.1.1",
"util": "^0.12.4",
"uuid": "^8.3.2",
"webpack": "^5.72.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"ws": "^8.5.0"
"webpack-cli": "^4.9.2"
},
"dependencies": {
"nadesiko3core": "^3.3.21",
"nadesiko3core": "^3.3.22",
"body-parser": "^1.20.0",
"browserslist": "^4.20.2",
"caniuse-db": "^1.0.30001332",
"clipboardy": "^3.0.0",
"csv-lite-js": "^0.0.7",
"dayjs": "^1.11.1",
"express": "^4.17.3",
"form-data": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.mjs
Expand Up @@ -27,7 +27,7 @@ export default {
plugin_kansuji: [path.join(srcPath, 'plugin_kansuji.mjs')],
plugin_markup: [path.join(srcPath, 'plugin_markup.mjs')],
plugin_turtle: [path.join(srcPath, 'plugin_turtle.mjs')],
plugin_csv: [path.join(srcCorePath, 'plugin_csv.mjs')],
// plugin_csv: [path.join(srcCorePath, 'plugin_csv.mjs')],
plugin_datetime: [path.join(srcPath, 'plugin_datetime.mjs')],
plugin_caniuse: [path.join(srcPath, 'plugin_caniuse.mjs')],
plugin_webworker: [path.join(srcPath, 'plugin_webworker.mjs')],
Expand Down

0 comments on commit cc6d1d8

Please sign in to comment.