stimulus parser
v0.2.2
プロジェクトにstimulus-parserを追加するには、端末で次のコマンドを実行します。
yarn add stimulus-parser import { Project } from "stimulus-parser"
const project = new Project ( "/Users/user/path/to/project" )
const controllers = project . controllerDefinitions
const controller = controllers [ 0 ]
console . log ( controller . actionNames )
// => ["connect", "click", "disconnect"]
console . log ( controller . targetNames )
// => ["name", "output"]
console . log ( controller . classNames )
// => ["loading"]
console . log ( controller . values )
// => [{ url: { type: "String", default: "" } }] https://stimulus-parser.hotwire.ioのホストされた遊び場での解析結果を検査できます。
テストを実行するには:
yarn install
yarn build
yarn test