Skip to content

Commit 87722e7

Browse files
committed
feat(corpus): add build-web-application-with-golang
1 parent 7af876a commit 87722e7

10 files changed

+1739
-737
lines changed

.gitmodules

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "repo/JavaScript-Plugin-Architecture"]
22
path = repo/JavaScript-Plugin-Architecture
33
url = https://github.com/azu/JavaScript-Plugin-Architecture
4-
[submodule "repo/Introduction-to-Add-on-Development-in-Blender"]
5-
path = repo/Introduction-to-Add-on-Development-in-Blender
6-
url = https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender
74
[submodule "repo/The-Little-Book-on-CoffeeScript"]
85
path = repo/The-Little-Book-on-CoffeeScript
96
url = https://github.com/minghai/library
@@ -20,3 +17,9 @@
2017
[submodule "repo/Hatena-Textbook"]
2118
path = repo/Hatena-Textbook
2219
url = https://github.com/hatena/Hatena-Textbook
20+
[submodule "repo/build-web-application-with-golang"]
21+
path = repo/build-web-application-with-golang
22+
url = https://github.com/astaxie/build-web-application-with-golang.git
23+
[submodule "repo/Introduction-to-Addon-Development-in-Blender-Web"]
24+
path = repo/Introduction-to-Addon-Development-in-Blender-Web
25+
url = https://github.com/nutti/Introduction-to-Addon-Development-in-Blender-Web

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
## 利用目的
2020

2121
- [textlint](https://github.com/textlint/textlint "textlint")ルールのテストのfixtureとして
22-
- 文書は逐次更新されるため、自動テストには適していません
22+
- 文書は逐次更新されるため、自動テストには適していません
2323

2424
例) コーパスに含まれている文章に対してtextlintでチェックして意図しない結果がないかを確かめる
2525

@@ -39,7 +39,6 @@ npm i -g . textlint technological-book-corpus-ja
3939
technological-book-corpus-ja | xargs textlint --rule textlint-my-rule -f pretty-error --no-textlintrc
4040
```
4141

42-
4342
## Install
4443

4544
Install with [npm](https://www.npmjs.com/):
@@ -113,22 +112,24 @@ module.exports.get = function get(ext = ".*") {};
113112
- License: <https://github.com/asciidwango/js-primer/blob/master/LICENSE>
114113
- [JavaScript-Plugin-Architecture](https://github.com/azu/JavaScript-Plugin-Architecture)
115114
- License: <https://github.com/azu/JavaScript-Plugin-Architecture#license>
116-
- [Introduction-to-Add-on-Development-in-Blender](https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender)
117-
- License: <https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender/blob/release/LICENSE>
115+
- [Introduction-to-Addon-Development-in-Blender-Web](https://github.com/nutti/Introduction-to-Addon-Development-in-Blender-Web)
116+
- License: <https://github.com/nutti/Introduction-to-Addon-Development-in-Blender-Web/blob/master/LICENSE>
118117
- [The-Little-Book-on-CoffeeScript](https://github.com/minghai/library/tree/gh-pages)
119-
- License: <https://github.com/minghai/library/blob/gh-pages/coffeescript/LICENSE>
118+
- License: <https://github.com/minghai/library/tree/gh-pages>
120119
- [progit](https://github.com/progit/progit)
121120
- License: <https://git-scm.com/book/en/v2>
122121
- [what-is-maven](https://github.com/KengoTODA/what-is-maven)
123122
- License: <https://github.com/KengoTODA/what-is-maven/blob/master/preface.md#%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9>
124123
- [Hatena-Textbook](https://github.com/hatena/Hatena-Textbook)
125124
- License: <https://github.com/hatena/Hatena-Textbook#%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9>
125+
- [build-web-application-with-golang](https://github.com/astaxie/build-web-application-with-golang)
126+
- License: <https://github.com/astaxie/build-web-application-with-golang/blob/master/LICENSE.md>
126127

127128
## 文書の追加方法
128129

129130
1. `git submodule add <追加するGit URL> repo/<name>`
130-
1. `index.js``References`に定義を追加する
131-
1. `build.js``copyTask`に文書のみをコピーする処理を追加する
131+
2. `index.js``References`に定義を追加する
132+
3. `build.js``copyTask`に文書のみをコピーする処理を追加する
132133

133134
## Changelog
134135

build.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const sourceDir = path.join(__dirname, "source");
77
const fs = require("fs");
88
const addTextToMarkdown = require("add-text-to-markdown");
99
const Refs = require("./index").References;
10+
1011
/**
1112
*
1213
* @param {Object} repoObject リポジトリ情報
@@ -34,11 +35,12 @@ function copyTask() {
3435
return Promise.all([
3536
copy(Refs["js-primer"], "source/basic/**/*.md"),
3637
copy(Refs["JavaScript-Plugin-Architecture"], "ja/**/*.md"),
37-
copy(Refs["Introduction-to-Add-on-Development-in-Blender"], "body/chapter_**/*.md"),
38+
copy(Refs["Introduction-to-Addon-Development-in-Blender-Web"], "src/2.7/markdown/**/*.md"),
3839
copy(Refs["The-Little-Book-on-CoffeeScript"], "coffeescript/chapters/ja_JP/**/*.md"),
3940
copy(Refs["progit"], "ja/**/*.{md,markdown}"),
4041
copy(Refs["what-is-maven"], "{deploy,implement-plugin,module,primer}/**/*.md"),
4142
copy(Refs["Hatena-Textbook"], "/**/*.md"),
43+
copy(Refs["build-web-application-with-golang"], "ja/**/{0,1}*.md"),
4244
]);
4345
}
4446

@@ -56,6 +58,9 @@ ${refs}`;
5658
const newContent = addTextToMarkdown(README, addContent, "References");
5759
fs.writeFileSync(path.join(__dirname, "README.md"), newContent, "utf-8");
5860
}
61+
5962
// main
60-
copyTask();
61-
updateReference();
63+
(async function () {
64+
await copyTask();
65+
updateReference();
66+
})();

index.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const References = {
1313
url: "https://github.com/azu/JavaScript-Plugin-Architecture",
1414
license: "https://github.com/azu/JavaScript-Plugin-Architecture#license"
1515
},
16-
"Introduction-to-Add-on-Development-in-Blender": {
17-
name: "Introduction-to-Add-on-Development-in-Blender",
18-
url: "https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender",
19-
license: "https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender/blob/draft/LICENSE"
16+
"Introduction-to-Addon-Development-in-Blender-Web": {
17+
name: "Introduction-to-Addon-Development-in-Blender-Web",
18+
url: "https://github.com/nutti/Introduction-to-Addon-Development-in-Blender-Web",
19+
license: "https://github.com/nutti/Introduction-to-Addon-Development-in-Blender-Web/blob/master/LICENSE"
2020
},
2121
"The-Little-Book-on-CoffeeScript": {
2222
name: "The-Little-Book-on-CoffeeScript",
@@ -37,6 +37,11 @@ const References = {
3737
name: "Hatena-Textbook",
3838
url: "https://github.com/hatena/Hatena-Textbook",
3939
license: "https://github.com/hatena/Hatena-Textbook#%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9"
40+
},
41+
"build-web-application-with-golang": {
42+
name: "build-web-application-with-golang",
43+
url: "https://github.com/astaxie/build-web-application-with-golang",
44+
license: "https://github.com/astaxie/build-web-application-with-golang/blob/master/LICENSE.md"
4045
}
4146
};
4247

@@ -50,7 +55,7 @@ const sourceDir = path.join(__dirname, "source");
5055
function findByPattern(patterns) {
5156
return globby.sync(patterns, {
5257
root: sourceDir,
53-
nodir: true
58+
nodir: true,
5459
});
5560
}
5661
/**
@@ -60,7 +65,7 @@ function findByPattern(patterns) {
6065
* e.g) ".md"
6166
*/
6267
function get(ext = ".*") {
63-
return findByPattern(`/**/*${ext}`);
68+
return findByPattern(`**/*${ext}`);
6469
}
6570
module.exports.References = References;
6671
module.exports.findByPattern = findByPattern;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
},
3939
"homepage": "https://github.com/textlint-ja/technological-book-corpus-ja",
4040
"dependencies": {
41-
"globby": "^6.1.0"
41+
"globby": "^10.0.1"
4242
},
4343
"devDependencies": {
4444
"add-text-to-markdown": "^2.0.0",
4545
"cpx": "^1.5.0",
46-
"mocha": "^3.2.0"
46+
"mocha": "^6.2.2"
4747
}
4848
}
Lines changed: 0 additions & 1 deletion
This file was deleted.

test/index-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ describe("technological-book-corpus-ja", () => {
2727
});
2828
});
2929
});
30-
});
30+
});

0 commit comments

Comments
 (0)