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