npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

miyojs

v2.0.3

Published

MiyoJS - SHIORI subsystem Miyo for JavaScript

Downloads

27

Readme

MiyoJS - SHIORIサブシステム「美代」 for JavaScript

Miyo(美代)とは

Miyo(美代)は伺か用のSHIORI(栞)サブシステムです。

標準でYAMLによる簡潔で記述し易い辞書形式MiyoDictionaryを用いつつ、フィルタによりあらゆるプログラムコードの実行をサポートします。

MiyoJSとは

Miyoの仕様を満たしたJavaScriptによる栞の実装です。

今のところ唯一の実装ですが、今後他言語版も作るかどうかは未定です。

以下で「Miyo」と記述してあるところはMiyo一般のことであり、JavaScript版であるMiyoJS特有のことではないということを示しています。 MiyoはMiyoJSに読み替えることが可能です。

コンセプト

新しい栞には新しいコンセプトが必要です。

Miyoは汎用言語の採用および簡潔かつ一貫した機能と徹底した役割分離により、プログラミング的に保守性の高いゴースト作成ができるSHIORIを目指しています。

Miyoが本質的にサポートするのは素のSHIORIプロトコルとの変換と辞書の制御程度の非常に限定的な部分です。

SHIORIサブシステムのrequestをSHIORI/3.0 ID別に分けて呼び出すことを基本としますが、普通干渉しないload、unloadをも制御できます。 一貫した動作を目指すことにより、多くのSHIORIサブシステムが内部で勝手に返すID: version等も全て辞書にゆだねられています。

さらに辞書から任意引数を渡せるフィルタ関数をサポートし、処理とデータを分離しつつ自由な処理ができる構造になっています。 これによってMiyoが辞書の枠組みに特化した基本的な機能のみを提供しつつ、その他の様々な機能は個別のフィルタとして随時選んで追加することが可能となり、透明性とメンテナンス性の高いゴースト制作が可能となります。

名前について

伺かのSHIORIサブシステムには伝統的に女性名をあてるので、拙作の漫画のキャラクターから名前を取り美代(みよ)と名づけました。

使用方法

栞として

ここではゴーストに組み込んで使用する方法を示します。

/ghost/masterディレクトリをカレントとして

npm install miyojs

を実行します。

次に、node.js実行環境のnode.exeを適当な場所に配置します。

さらにSHIOLINKを入手し、SHIOLINK.dllとSHIOLINK.iniを/ghost/masterディレクトリに配置します。

そしてSHIOLINK.iniを編集し、

commandline = path\to\node.exe .\node_modules\miyojs\bin\miyo-shiolink.js path\to\dictionaries

と設定します。

path\to\dictionariesはMiyoDictionary辞書ファイルを配置するディレクトリです。

この部分はアーカイブ済みサンプルゴーストを使うことでスキップできます。

ライブラリとしてのインストール

npm install miyojs

ライブラリとしての使用方法は後述の__MiyoJSリファレンス__を参照してください。

サンプルゴースト

ゴーストの機能プレビュー兼テンプレート代替として、サンプルゴーストMiyoPreviewを公開しています。

依存関係

SHIORIプロトコルの処理にShioriJK、SHIOLINKインターフェースにShiolinkJS、YAML形式の辞書の読み込みにjs-yamlを利用しています。

ドキュメント

関連リソース

公開されたフィルタの一覧はmiyojs-filtersにまとまっています。

ライセンス

MITライセンスの元で配布いたします。