-
Notifications
You must be signed in to change notification settings - Fork 8
README.md
uupaa edited this page Oct 24, 2015
·
5 revisions
モジュールを公開する前に、~/workspace/MyExample.js/README.md を更新し、概要や使い方を簡単に説明しましょう。
サンプルコードや API Spec など、より詳細なドキュメントは README.md に直接かかず GitHub/wiki に記述し README からリンクしてください。
README.md に色々書いてしまうと、エディタで開けなくなる時があります。
node_modules 以下に設置されるモジュールは README.md の内容が package.json に埋め込まれます。 このような状況にあるため、README.md があまりに長いと package.json をエディタで開いた際にエディタがフリーズしてしまいます
以下は README.md の雛形です。
# <<REPOSITORY_FULLNAME>> [](https://travis-ci.org/<<GITHUB_USER_NAME>>/<<REPOSITORY_FULLNAME>>)
[](https://nodei.co/npm/<<GITHUB_USER_NAME>>.<<LOWER_REPOSITORY_FULLNAME>>/)
<<DESCRIPTION>>
This module made of [WebModule](https://github.com/uupaa/WebModule).
## Documentation
- [Spec](https://github.com/<<GITHUB_USER_NAME>>/<<REPOSITORY_FULLNAME>>/wiki/)
- [API Spec](https://github.com/<<GITHUB_USER_NAME>>/<<REPOSITORY_FULLNAME>>/wiki/<<REPOSITORY_NAME>>)
## Browser, NW.js and Electron
```js
<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/<<REPOSITORY_FULLNAME>>"></script>
<script>
...
</script>
```
## WebWorkers
```js
importScripts("<module-dir>lib/WebModule.js");
importScripts("<module-dir>lib/<<REPOSITORY_FULLNAME>>");
```
## Node.js
```js
require("<module-dir>lib/WebModule.js");
require("<module-dir>lib/<<REPOSITORY_FULLNAME>>");
```