Skip to content

Commit 3672e86

Browse files
committed
Install stimulus.
1 parent 89c6163 commit 3672e86

File tree

5 files changed

+167
-1
lines changed

5 files changed

+167
-1
lines changed

webpack/app/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './index.css'
22
import './scripts/turbolinks.js'
3+
import './scripts/stimulus.js'
34
import './scripts/gitterSidecar.js'
45
import './scripts/highlight.js'

webpack/app/scripts/stimulus.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { Application } from 'stimulus'
2+
import { definitionsFromContext } from 'stimulus/webpack-helpers'
3+
4+
const application = Application.start()
5+
const context = require.context('../controllers', true, /\.js$/)
6+
application.load(definitionsFromContext(context))

webpack/package-lock.json

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webpack/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"dependencies": {
66
"gitter-sidecar": "^1.4.2",
77
"highlight.js": "^9.13.1",
8+
"stimulus": "^1.1.1",
89
"tailwindcss": "^0.7.2",
910
"turbolinks": "^5.2.0"
1011
},
1112
"devDependencies": {
1213
"@babel/core": "^7.2.0",
14+
"@babel/plugin-proposal-class-properties": "^7.4.4",
1315
"@babel/preset-env": "^7.2.0",
1416
"babel-loader": "^8.0.4",
1517
"css-loader": "^1.0.1",

webpack/webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module.exports = {
2424
use: {
2525
loader: 'babel-loader',
2626
options: {
27-
presets: ['@babel/preset-env']
27+
presets: ['@babel/preset-env'],
28+
plugins: ['@babel/plugin-proposal-class-properties']
2829
}
2930
}
3031
},

0 commit comments

Comments
 (0)