New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@launchpadlab/lp-stimulus-components

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@launchpadlab/lp-stimulus-components

Stimulus components for Ruby on Rails projects

latest
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

lp-stimulus-components

Stimulus components for Ruby on Rails projects.

Contributing

Local Workflow

Apps using Importmaps

To test the package locally on another application, you can run a local server to make the package contents available

  • Run $ yarn start to serve index.js on port 4000
  • In the Rails application using import maps, pin lp-stimulus-components to http://localhost:4000/index.js:
# config/importmap.rb
pin "lp-stimulus-components", to: "http://localhost:4000/index.js"
  • Import and use functions provided by lp-stimulus-components in the JavaScript files for your Rails app
// application.js
import { helloWorld } from 'lp-stimulus-components'

Apps With a Build Step

For applications using a build step (e.g. esbuild) you can add a symlink to this package during development

  • Run yarn link in the lp-stimulus-components project root directory
  • Run yarn link lp-stimulus-components in your sample Rails application
  • You should see the package appear in the Rails app's node_modules/ folder
  • Import and register the stimulus controller you are testing
  • Connect the imported controller to your HTML element using the data-controller attribute
// app/javascript/controllers/index.js
import { SampleController } from "lp-stimulus-components"
application.register("sample", SampleController)
<div data-controller="sample">
  <!-- ... -->
</div>

FAQs

Package last updated on 14 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts