aboutsummaryrefslogtreecommitdiff
path: root/app/javascript/controllers/index.js
blob: 9068264f9528eeef58367ebb3c84745b6783e080 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// SPDX-FileCopyrightText: 2021 IN COMMON Collective
//
// SPDX-License-Identifier: AGPL-3.0-or-later

// Load all the controllers within this directory and all subdirectories. 
// Controller files must be named *_controller.js.

import { Application } from "stimulus"
import { definitionsFromContext } from "stimulus/webpack-helpers"

const application = Application.start()
const context = require.context("controllers", true, /_controller\.js$/)
application.load(definitionsFromContext(context))