stimulus-parser
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

stimulus-parser

NPM Version NPM Downloads NPM Bundle Size

Installation

To add stimulus-parser to your project, run the following command in your terminal:

yarn add stimulus-parser

Usage

import { Project } from "stimulus-parser"

const project = new Project("/Users/user/path/to/project")

await project.initialize()

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: "" } }]

Playground

You can inspect parse results on the hosted playground at https://stimulus-parser.hotwire.io.

Development

To run the tests:

yarn install
yarn build
yarn test

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.038latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.038
0.2.2136
0.2.12
0.2.02
0.1.62
0.1.51
0.1.41
0.1.31
0.1.21
0.1.12
0.1.01
0.0.142
0.0.131
0.0.121
0.0.111
0.0.101
0.0.91
0.0.81
0.0.72
0.0.61
0.0.51
0.0.42
0.0.32
0.0.22
0.0.12

Package Sidebar

Install

npm i stimulus-parser

Weekly Downloads

207

Version

0.3.0

License

MIT

Unpacked Size

236 kB

Total Files

92

Last publish

Collaborators

  • marcoroth