3.0.0 • Published 4 years ago

stimulus-components v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Stimulus components

Donate npm.io npm.io npm.io npm.io npm.io Netlify Status

Getting started

This library is a set of multiple Stimulus controllers.

Installation

This library supports tree-shaking so you can import only the controllers you need.

$ yarn add stimulus-components

And use it in your JS file:

import { Application } from "stimulus"
import { Reveal } from "stimulus-components"

const application = Application.start()
application.register("reveal", Reveal)

Basic Usage

See Demo.

Documentation is available as README in controllers folders.

Extending Components

You can use inheritance to extend the functionality of any Stimulus components.

import { Reveal } from "stimulus-components"

export default class extends Reveal {
  connect() {
    super.connect()
    console.log("Do what you cant here.")
  }
}

These controllers will automatically have access to targets defined in the parent class.

If you override the connect, disconnect or any other methods from the parent, you'll want to call super.method() to make sure the parent functionality is executed.

Development

Project setup

$ yarn install
$ yarn dev

Tests

Jest and Puppeteer are responsible to test this component:

$ yarn test

Linter

Prettier and ESLint are responsible to lint and format this component:

$ yarn lint
$ yarn format

Contributing

Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.

License

This project is released under the MIT license.

3.0.0

4 years ago

2.0.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago